emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19250: closed (elisp-mode.el: completion-at-point


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19250: closed (elisp-mode.el: completion-at-point fails at M-: for some buffers )
Date: Wed, 03 Dec 2014 19:40:03 +0000

Your message dated Wed, 03 Dec 2014 14:39:31 -0500
with message-id <address@hidden>
and subject line Re: bug#19250: elisp-mode.el: completion-at-point fails at M-: 
for some buffers
has caused the debbugs.gnu.org bug report #19250,
regarding elisp-mode.el: completion-at-point fails at M-: for some buffers 
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19250: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19250
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: elisp-mode.el: completion-at-point fails at M-: for some buffers Date: Tue, 02 Dec 2014 09:50:26 +0000 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Package:  emacs
Severity: minor

        With a recently-built Emacs (287740d6; 2014-11-29 13:56:59Z),
        the following sequence results in the backtrace MIMEd
        (redacted.)  I do not observe the issue with 24.3.1, so it
        appears to be a regression.

$ emacs -Q 
C-x b *xxx* RET
(#
M-: xx TAB

        This seems to happen because elisp--local-variables tries to
        gather variable names for completion from the contents of the
        buffer M-: is invoked from, while such buffer does not
        necessarily hold any (valid) Emacs Lisp code.

        My suggestion would be to either make elisp--local-variables
        fail more gracefully (say, using with-demoted-errors), or to
        introduce a (derived-mode-p 'emacs-lisp-mode) guard to the code.

        As a workaround, the following seems to help:

(setq elisp--local-variables-completion-table nil)

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
Debugger entered--Lisp error: (invalid-read-syntax "#")
  read-from-string("(#elisp--witness--lisp)")
  elisp--local-variables()
  #[257 …]("xx")
  #[771 …]("xx" nil nil)
  try-completion("xx" #[771 …] nil)
  #[257 …](#[771 …])
  mapcar(#[257 …] (#[771 …] (closure (t) (&rest args) (apply (quote 
completion-table-with-predicate) …))))
  #[771 …]("xx" nil nil)
  try-completion("xx" #[771 …] nil)
  completion-basic-try-completion("xx" #[771 …] nil 2)
  #[257 …](basic)
  completion--some(#[257 …] (basic partial-completion emacs22))
  completion--nth-completion(1 "xx" #[771 …] nil 2 (metadata))
  completion-try-completion("xx" #[771 …] nil 2 (metadata))
  completion--do-completion(#<marker at 7 in  *Minibuf-1*> 9)
  completion--in-region-1(#<marker at 7 in  *Minibuf-1*> 9)
  #[1028 …](#<marker at 7 in  *Minibuf-1*> … nil)
  apply(#[1028 …] (#<marker at 7 in  *Minibuf-1*> … nil))
  #[771 …](nil nil (#<marker at 7 in  *Minibuf-1*> … nil))
  completion--in-region(#<marker at 7 in  *Minibuf-1*> 9 #[771 …] nil)
  completion-in-region(#<marker at 7 in  *Minibuf-1*> 9 #[771 …] nil)
  completion-at-point()
  funcall-interactively(completion-at-point)
  call-interactively(completion-at-point nil nil)
  command-execute(completion-at-point)
  read-from-minibuffer("Eval: " nil (keymap …) t read-expression-history)
  read--expression("Eval: ")
  byte-code(… [current-prefix-arg read--expression "Eval: "] 2)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

--- End Message ---
--- Begin Message --- Subject: Re: bug#19250: elisp-mode.el: completion-at-point fails at M-: for some buffers Date: Wed, 03 Dec 2014 14:39:31 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
> The second bug is trivial to fix, the first is a bit more delicate
> because the buffer-switching is done by completion-table-dynamic and I'm
> pretty sure it's done for a good reason (i.e. while it's undesirable
> here, it's desirable in some other case(s)), so we'll first have to

It looks like all the cases where buffer-switching was needed happened
to be going through lazy-completion-table, so I incompatibly changed the
behavior of completion-table-dynamic and adjusted
lazy-completion-table accordingly.

Crossing fingers,


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]