all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Arnold Schwaighofer" <arnold.schwaighofer@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: HEAD: Bug in simple.el/minibuffer.el causing display-completion-list to delete not only word to be completed but everything in file before it
Date: Mon, 28 Apr 2008 14:22:25 +0200	[thread overview]
Message-ID: <b8c6f2610804280522o68256194yb99e57eef4c33aee@mail.gmail.com> (raw)

Problem:
In current HEAD display-completion-list deletes not only word to be
completed but everything in file before it.

example:
(defun my-complete-test ()
  (interactive)
  (with-output-to-temp-buffer "*Completions*"
    (display-completion-list
       '("test1" "test2" "test345")
       "test")))

and call that function in a buffer on the word "test" (M-x
my-complete-test) with some text preceeding "test". deletes everything
before word "test" instead of just replacing it.

This also happens when using the complete-tag function :(.

My interpretation of the problem :).

minibuffer.el: display-completion-list
 (set (make-local-variable 'completion-base-size) (or (cdr last) 0))
sets completion-base-size to 0
which causes everything to be deleted before the word to be completed.

the problem
seems to be related to completion-setup-function in simple.el checking
for completion-base-size where i believe it should check for
completion-all-completions-with-base-size
is it possible that it should read:

Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.924
diff -r1.924 simple.el
5527c5527
<       (unless completion-base-size
---
>       (unless completion-all-completions-with-base-size

after applying that patch completion works for me.




             reply	other threads:[~2008-04-28 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ljyzuo8q.fsf@stupidchicken.com>
2008-04-28 12:22 ` Arnold Schwaighofer [this message]
2008-08-15  0:25   ` bug#163: marked as done (HEAD: Bug in simple.el/minibuffer.el causing display-completion-list to delete not only word to be completed but everything in file before it) Emacs bug Tracking System
2008-07-22  4:43 ` bug#591: 23.0.60; lisp-complete-symbol erases extra text Drew Adams
2008-08-15  0:25   ` bug#591: marked as done (23.0.60; lisp-complete-symbol erases extra text) Emacs bug Tracking System

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=b8c6f2610804280522o68256194yb99e57eef4c33aee@mail.gmail.com \
    --to=arnold.schwaighofer@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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.