From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 591@emacsbugs.donarmstrong.com
Subject: bug#591: 23.0.60; lisp-complete-symbol erases extra text
Date: Tue, 29 Jul 2008 16:46:16 -0400 [thread overview]
Message-ID: <87ej5czaef.fsf@stupidchicken.com> (raw)
> emacs -Q
>
> In *scratch*, type this, and leave cursor after the final `for':
>
> format-decode-buffer
> forward-char
>
> for
>
> Then hit `M-TAB'. Choose one of the completions using mouse-2 in *Completions*.
>
> Only the final `for' should be completed, but instead all of the text
> in the buffer is replaced by the chosen completion.
Hi Stefan,
This bug was introduced by your patch:
2008-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
minibuffer.el (display-completion-list):
Handle all-completions's new base-size info to set completion-base-size.
(with-current-buffer standard-output
...
(insert "Possible completions are:\n")
(let ((last (last completions)))
;; Get the base-size from the tail of the list.
(set (make-local-variable 'completion-base-size) (or (cdr last) 0))
(setcdr last nil)) ;Make completions a properly nil-terminated list.
(completion--insert-strings completions))))
This sets completion-base-size to 0, which causes the completions buffer
to delete everything in the Lisp buffer when you make a selection.
I don't understand why we need the (completely undocumented) hack
introduced here, where the cdr of the last item on the completions list
gives completion-base-size. Does anything else in Emacs depend on this?
Why not simply add a new optional argument to display-completion-list?
next reply other threads:[~2008-07-29 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 20:46 Chong Yidong [this message]
2008-07-29 21:51 ` bug#591: 23.0.60; lisp-complete-symbol erases extra text Drew Adams
2008-07-29 22:07 ` Stefan Monnier
2008-07-30 4:36 ` Chong Yidong
2008-10-03 16:55 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2008-07-22 4:43 Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ej5czaef.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=591@emacsbugs.donarmstrong.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).