From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19250: elisp-mode.el: completion-at-point fails at M-: for some buffers Date: Tue, 02 Dec 2014 09:50:26 +0000 Message-ID: <87fvcyqt25.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1417513886 6479 80.91.229.3 (2 Dec 2014 09:51:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 09:51:26 +0000 (UTC) To: 19250@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 02 10:51:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xvk74-000514-MV for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 10:51:18 +0100 Original-Received: from localhost ([::1]:35821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvk74-0005a6-3x for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 04:51:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvk6x-0005Zv-4L for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 04:51:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xvk6q-0000ag-7X for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 04:51:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvk6o-0000aI-RN for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 04:51:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xvk6o-00017d-4h for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 04:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Dec 2014 09:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19250 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14175138434279 (code B ref -1); Tue, 02 Dec 2014 09:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Dec 2014 09:50:43 +0000 Original-Received: from localhost ([127.0.0.1]:51403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xvk6U-00016w-QO for submit@debbugs.gnu.org; Tue, 02 Dec 2014 04:50:43 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:43167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xvk6P-00016k-ET for submit@debbugs.gnu.org; Tue, 02 Dec 2014 04:50:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=IKTTYC9MpenPn4VSAwLKIPjffxBRtL7vDV32LFmmn2c=; b=ArYIsVxauYSEV042QOerPp5CjP6caRjMsd9og1KXX0yUCWgCPm2EMh4kRF6HN2x91lKH/YrYEGMc4oNDpUY9PRrETRs1P3uQ7OIgGPdLfWNMTTEpjlw1SsTCRGnR6W9NPdU8hYIS34SU2eckyQ0HRHwXFmlH1D7cBY6ghQL6ly0=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xvk6N-0004eD-3Q for submit@debbugs.gnu.org; Tue, 02 Dec 2014 09:50:35 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xvk6F-0005qn-GR for submit@debbugs.gnu.org; Tue, 02 Dec 2014 16:50:27 +0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96791 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=20 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) --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (invalid-read-syntax "#") read-from-string("(#elisp--witness--lisp)") elisp--local-variables() #[257 =E2=80=A6]("xx") #[771 =E2=80=A6]("xx" nil nil) try-completion("xx" #[771 =E2=80=A6] nil) #[257 =E2=80=A6](#[771 =E2=80=A6]) mapcar(#[257 =E2=80=A6] (#[771 =E2=80=A6] (closure (t) (&rest args) (appl= y (quote completion-table-with-predicate) =E2=80=A6)))) #[771 =E2=80=A6]("xx" nil nil) try-completion("xx" #[771 =E2=80=A6] nil) completion-basic-try-completion("xx" #[771 =E2=80=A6] nil 2) #[257 =E2=80=A6](basic) completion--some(#[257 =E2=80=A6] (basic partial-completion emacs22)) completion--nth-completion(1 "xx" #[771 =E2=80=A6] nil 2 (metadata)) completion-try-completion("xx" #[771 =E2=80=A6] nil 2 (metadata)) completion--do-completion(# 9) completion--in-region-1(# 9) #[1028 =E2=80=A6](# =E2=80=A6 nil) apply(#[1028 =E2=80=A6] (# =E2=80=A6 nil)) #[771 =E2=80=A6](nil nil (# =E2=80=A6 nil)) completion--in-region(# 9 #[771 =E2=80=A6] n= il) completion-in-region(# 9 #[771 =E2=80=A6] ni= l) 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 =E2=80=A6) t read-expression-hi= story) read--expression("Eval: ") byte-code(=E2=80=A6 [current-prefix-arg read--expression "Eval: "] 2) call-interactively(eval-expression nil nil) command-execute(eval-expression) --=-=-=--