emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request : Tab-completion for 'shell-comand'


From: Juri Linkov
Subject: Re: Feature request : Tab-completion for 'shell-comand'
Date: Thu, 13 Mar 2008 04:14:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu)

>> But it seems impossible to add an overlay *after* the cursor at the
>> end of the minibuffer, like `minibuffer-message' already does
>> inserting the message after the cursor at the end of the minibuffer.
>
> Try
>
>     (setq ov (make-overlay (point-max) (point-max)))
>     (overlay-put ov 'insert-in-front-hooks
>                  (list (lambda (o &rest ignore)
>                          (move-overlay o (point-max) (point-max)))))
>     (overlay-put ov 'after-string (concat (propertize " " 'cursor t)
>                                            "[No match]"))

Yes, this would work.  But it seems putting overlays at
(point-max) might have some negative consequences,
e.g. `(remove-overlays)' won't remove it because it can't
find this overlay in (overlays-in (point-min) (point-max)).
But (mapcar 'delete-overlay (overlays-in (point-min) (1+ (point-max))))
will do.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]