From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
<591@emacsbugs.donarmstrong.com>,
"'Chong Yidong'" <cyd@stupidchicken.com>
Subject: bug#591: 23.0.60; lisp-complete-symbol erases extra text
Date: Fri, 3 Oct 2008 09:55:07 -0700 [thread overview]
Message-ID: <003a01c92578$ca9586b0$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <jwv7ib4xs7p.fsf-monnier+emacsbugreports@gnu.org>
> From: Stefan Monnier Sent: Tuesday, July 29, 2008 3:08 PM
> > Hi Stefan, This bug was introduced by your patch:
>
> Yes, I know.
>
> > This sets completion-base-size to 0, which causes the completions
> > buffer to delete everything in the Lisp buffer when you make a
> > selection.
>
> The problem is that leaving it nil will revert to the use of
> a heuristic. Fixing it right is a bit more difficult.
>
> > 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?
>
> Yes the base-size in the cdr is a hack, and we be able to get
> rid of it now that I've added the new `boundaries' action. But
> passing it as an additional argument won't make any difference for
> the bug at hand.
This hack still seems to be present in the code from a build today:
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-10-03 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'
The cdr still seems to be used for the base size.
From completion-all-completions:
(let ((completion-all-completions-with-base-size t))
From completion-table-with-context:
;; In case of non-empty all-completions,
;; add the prefix size to the base-size.
((consp comp)
(let ((last (last comp)))
(when completion-all-completions-with-base-size
(setcdr last (+ (or (cdr last) 0) (length prefix))))
comp))
From completion--file-name-table:
(if (and completion-all-completions-with-base-size (consp all))
;; Add base-size, but only if the list is non-empty.
(nconc all base-size)
all)
This hack prevents code from treating the list as a true list - e.g. applying
`length' to it. If, as you say, the hack is no longer needed and we are "able to
get rid of it now", could you please remove it?
Also, there is still no doc string for some of the more important functions in
this library - e.g. completion-table-with-context,
completion-table-with-terminator, completion-all-sorted-completions,
completion-hilit-commonality, completion-basic-try-completion,
completion-basic-all-completions, completion-pcm-all-completions,
completion-pcm-try-completion.
Likewise, no doc string for less important functions - e.g.
completion--try-word-completion, minibuffer--bitset,
completion--flush-all-sorted-completions, minibuffer--double-dollars,
completion--make-envvar-table, completion--embedded-envvar-table,
completion-emacs21-try-completion, completion-emacs21-all-completions,
completion-emacs22-try-completion, completion-emacs22-all-completions,
completion-pcm--prepare-delim-re, completion-pcm--pattern-trivial-p,
completion-pcm--pattern->regex, completion-pcm--hilit-commonality,
completion-pcm--pattern->string, completion-pcm--merge-try.
Likewise, no doc string for variables - e.g. completion-all-sorted-completions,
completion-common-substring, completion--embedded-envvar-re,
completion-pcm--delim-wild-regex.
Thx.
next prev parent reply other threads:[~2008-10-03 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003a01c92578$ca9586b0$0200a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=591@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.