[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
Re: [Q]completion policy
- To: emacspeak@xxxxxxxxxxx
- Subject: Re: [Q]completion policy
- From: Koichi INOUE <kinoue@xxxxxxxxxxx>
- Date: 02 Sep 2000 16:27:19 +0900
- In-Reply-To: <14768.9975.471835.24085@xxxxxxxxxxx>(T. V. Raman's message of "Fri, 1 Sep 2000 15:00:23 -0700 (PDT)")
- Old-Return-Path: <inopie@xxxxxxxxxxx>
- Resent-Date: Sat, 2 Sep 2000 03:28:23 -0400 (EDT)
- Resent-From: emacspeak@xxxxxxxxxxx
- Resent-Message-ID: <"tKXgG.A.QQE.6vKs5"@hub>
- Resent-Sender: emacspeak-request@xxxxxxxxxxx
- User-Agent: T-gnus/6.14.5 (based on Gnus v5.8.7) (revision 04) REMI/1.14.3(Matsudai) Chao/1.14.1 (Rokujizō) APEL/10.2 Emacs/20.7(i386--freebsd) MULE/4.0 (HANANOEN)
Hi,
"T. V. Raman" <ramantv@xxxxxxxxxxx> writes:
> You can fix this problem by making the advice on completion
> commands smarter.
I have written an advice for mew-complete(for mailer Mew) based on
minibuffer-complete like this; it may be the same approach as you
mentikoned:
--code begin
(defadvice mew-complete-address (around emacspeak pre act)
"Say what you completed."
(let* ((beg (save-excursion
(re-search-backward "[ ,:]")
(forward-char 1)
(point)))
(dtk-stop-immediately t)
(prior-key (buffer-substring beg (point)))
(prior (point)))
(emacspeak-kill-buffer-carefully "*Mew completions*")
ad-do-it
(let ((completions-buffer (get-buffer "*Mew completions*")))
(if (or (> (point) prior)
(not (string-equal prior-key (buffer-substring beg prior))))
(dtk-speak (buffer-substring beg (point )))
(when (and completions-buffer
(window-live-p (get-buffer-window completions-buffer )))
(save-excursion
(set-buffer completions-buffer )
(emacspeak-prepare-completions-buffer)
(dtk-speak (buffer-string ))))))
ad-return-value))
--code end
It is made for mail address completion so that it first
backward-searhces the address field separator.
It seems to work well, but, just like minibuffer-complete, user can't
know exactly whether
(a) characters left to the point is changed or
(b) simply new characters are added.
Do you think is it OK or have some idea about representing (1) or (b)?
Best regards.
--
Koichi Inoue
E-Mail: inopie@xxxxxxxxxxx
ICQ UIN: 74900690
-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"
Emacspeak Files |
Subscribe |
Unsubscribe