* display-completion-list
@ 2003-05-30 11:53 Roland Winkler
2003-05-30 13:22 ` display-completion-list Kai Großjohann
0 siblings, 1 reply; 3+ messages in thread
From: Roland Winkler @ 2003-05-30 11:53 UTC (permalink / raw)
Suppose I have the function
(defun foo ()
(interactive)
(with-output-to-temp-buffer "*Completions*"
(display-completion-list '("a" "b" "d"))))
This will open a completion buffer. If I select a completion in this
buffer by clicking <mouse-2> on a completion, the selection will be
inserted in the active buffer at the position of point. How does the
insertion happen in detail?
After the selection has been inserted in the active buffer
I would like to execute a function that takes as arguments, say,
the buffer positions of beginning and end of the text that was
inserted. How can I do that?
Is there something like a display-completion-post-insertion-hook?
Thanks a lot,
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: display-completion-list
2003-05-30 11:53 display-completion-list Roland Winkler
@ 2003-05-30 13:22 ` Kai Großjohann
2003-05-30 16:28 ` display-completion-list Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2003-05-30 13:22 UTC (permalink / raw)
Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:
> Suppose I have the function
>
> (defun foo ()
> (interactive)
> (with-output-to-temp-buffer "*Completions*"
> (display-completion-list '("a" "b" "d"))))
>
> This will open a completion buffer. If I select a completion in this
> buffer by clicking <mouse-2> on a completion, the selection will be
> inserted in the active buffer at the position of point. How does the
> insertion happen in detail?
I don't know. Here is how I find out:
I run the code. I position point on one of the completions and do
C-h k RET. It tells me that it runs the command choose-completions.
I have a wild hunch that there might be a variable with a similar
name, so I type C-h v choos TAB... Bingo!
--
This line is not blank.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: display-completion-list
2003-05-30 13:22 ` display-completion-list Kai Großjohann
@ 2003-05-30 16:28 ` Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-05-30 16:28 UTC (permalink / raw)
Kai Großjohann wrote:
> Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:
>
>
>>Suppose I have the function
>>
>>(defun foo ()
>> (interactive)
>> (with-output-to-temp-buffer "*Completions*"
>> (display-completion-list '("a" "b" "d"))))
>>
>>This will open a completion buffer. If I select a completion in this
>>buffer by clicking <mouse-2> on a completion, the selection will be
>>inserted in the active buffer at the position of point. How does the
>>insertion happen in detail?
>>
>
> I don't know. Here is how I find out:
>
> I run the code. I position point on one of the completions and do
> C-h k RET. It tells me that it runs the command choose-completions.
> I have a wild hunch that there might be a variable with a similar
> name, so I type C-h v choos TAB... Bingo!
In Emacs 21.3 I get
Describe variable: choos [No match]
But there's always
(defadvice choose-completion (after ...) ...)
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-30 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-30 11:53 display-completion-list Roland Winkler
2003-05-30 13:22 ` display-completion-list Kai Großjohann
2003-05-30 16:28 ` display-completion-list Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).