unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#591: 23.0.60; lisp-complete-symbol erases extra text
@ 2008-07-29 20:46 Chong Yidong
  2008-07-29 21:51 ` Drew Adams
  2008-07-29 22:07 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Chong Yidong @ 2008-07-29 20:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 591

> 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?






^ permalink raw reply	[flat|nested] 6+ messages in thread
* bug#591: 23.0.60; lisp-complete-symbol erases extra text
@ 2008-07-22  4:43 Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2008-07-22  4:43 UTC (permalink / raw)
  To: emacs-pretest-bug

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.

This is a regression from Emacs 22.
 

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-06-29 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
 







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-03 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 20:46 bug#591: 23.0.60; lisp-complete-symbol erases extra text Chong Yidong
2008-07-29 21:51 ` 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

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).