From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#27819: invoking `artist-mouse-choose-operation' gives "if: Wrong type argument: listp, 110" Date: Fri, 28 Jul 2017 14:27:16 +0200 Message-ID: <87tw1whhln.fsf@rosalinde> References: <87zibsk8k0.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501244923 30338 195.159.176.226 (28 Jul 2017 12:28:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2017 12:28:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: tab@lysator.liu.se, 27819@debbugs.gnu.org To: Shiyao Ma Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 28 14:28:37 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db4Nd-0007PE-8b for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jul 2017 14:28:33 +0200 Original-Received: from localhost ([::1]:48097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db4Ni-0006tr-RY for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jul 2017 08:28:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db4NC-0006dW-PV for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2017 08:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db4N8-000374-AF for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2017 08:28:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1db4N8-00036r-70 for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2017 08:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1db4N7-0003jn-Ul for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2017 08:28:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 12:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27819-submit@debbugs.gnu.org id=B27819.150124484714317 (code B ref 27819); Fri, 28 Jul 2017 12:28:01 +0000 Original-Received: (at 27819) by debbugs.gnu.org; 28 Jul 2017 12:27:27 +0000 Original-Received: from localhost ([127.0.0.1]:59312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db4MY-0003iq-U9 for submit@debbugs.gnu.org; Fri, 28 Jul 2017 08:27:27 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:62019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db4MX-0003id-C3 for 27819@debbugs.gnu.org; Fri, 28 Jul 2017 08:27:26 -0400 Original-Received: from rosalinde ([83.135.17.177]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MSdRI-1dBnjV1m6u-00RVdG; Fri, 28 Jul 2017 14:27:17 +0200 X-Provags-ID: V03:K0:Cv8PZCu2ktStk5FO7VvtqNOCVZsmDER2HUzLNWdlAXAX9B7Pyul pZByLZDT7RyU+P90Z07drN9qG6yZwbapVqhlOL6CVzil2vtDGKU3F58BPtAPQb7Ujy28P+K 61jeJs5L/a/cFmY1iKoJy64OBtBglJpxh24Tgo2gkTKCJzmUKlIsV5QOeeHqtCOOmVVqDvN h/yulH5Vhc7cGGuY9LoUw== X-UI-Out-Filterresults: notjunk:1;V01:K0:M1HHzbo4nZY=:XzA+OjJX5kPJAwudFDvLzQ R/lhOiTdXmx6jtJSbwscLkhBnnKUwduz+OsmSwmapFVdyrsaBwcQ3ojUMCpj2zZfSss03vd7C 89jYydRGO9ehP28EUAElIHrz5I41sThcPPe6TAXPYrsLHdxEoc2aLIRpARh3xeY/x9aYJ7YIc a/bPF0H8rn197gWUpkFTZKkrSfLd0briZIehoXlaDxv5TvppAncq3BcjkogNmmv5uhvxXRGQg YDZhEEAofM7V/ldMaQhoTKcDqozT7Nm7UJpkpzs9v9LHJ24ggeyH6ONRV1ZtGoqYCGvjC9NNZ 85w1VSZLdyeKmxtWC56VH3n9X8vs3Mhu0rpxEAghC/8ofxGf7omy4vwY9ttTJdwvoLjAdVIOW hVBlBZtqytaefh3YjeJNHUv5TuTqf40VNimJZJq6wQFPKAhlKnv0OCVSBE0PfphHoxxzFrrLD jOYoTkKxnUzOReCrBQrIXpCI7cEipTJ4RP/ogwT4DUQnUcVa3AHfPH7MENCKjiOwtTArIsriA hIuyQMdk7NpUxHg6ngsVDQNO9gQ1lU/4teaNG0FM5KHaM/UYQLPeuJ4OEuleegknRR2u/02XZ 6X1qlBPRT9JI7SSJ4DVUvxkL7HGLrL0ca1CU4GYfS2rYCSzvANas8gsksxQ/TReEiVulSE7Iz j9ZBTdlcV61f5ChDY461l9V1mA3CI31jbmzWudhcb0fvDKQmMEkxVIM8tNkMB7nIoKTliyLp5 eV6+AuI0OTQ/AUMtYMUdV2mRpd5QWSAEWAGOAHKKGVBLwi25z5g2xIlhgtvjsV08E37u3Reu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:135080 Archived-At: On Tue, 25 Jul 2017 14:25:19 +0200 Stephen Berman wrote: > On Tue, 25 Jul 2017 18:49:08 +0800 Shiyao Ma wrote: > >> Hi, >> >> I am on macOS emacs25, and using artist-mode. >> >> when invoking `artist-mouse-choose-operation', I got this error message: if: >> Wrong type argument: listp. > > I can reproduce the error by invoking the command like this: > `M-x artist-mouse-choose-operation'. Actually, I overlooked the last piece of the error message in the Subject line "if: Wrong type argument: listp, 110". What I see with `M-x artist-mouse-choose-operation RET' is "if: Wrong type argument: listp, 13", where 13 is the character code for RET. 110 is the character code of the `n' key; the only way I can see that this specific error occurred is if `artist-mouse-choose-operation' was bound to `n'. So to Shiyao Ma: Did you making such a binding? If not, what exactly did you do to get the error in the Subject line? > The command is intended to be invoked with down-mouse-2 (that's what > it's bound to in artist-mode-map). > >> How to solve this? > > This is one way: > > diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el > index 596570ca4e..cdc2af4a7a 100644 > --- a/lisp/textmodes/artist.el > +++ b/lisp/textmodes/artist.el > @@ -4889,7 +4889,7 @@ artist-mouse-choose-operation > (select-window (posn-window (event-start last-input-event))) > (list last-input-event > (if (display-popup-menus-p) > - (x-popup-menu last-nonmenu-event artist-popup-menu-table) > + (x-popup-menu t artist-popup-menu-table) > 'no-popup-menus)))) > > (if (eq op 'no-popup-menus) > > > A possible disadvantage of this fix is that typing `M-x > artist-mouse-choose-operation' will pop up the menu wherever the mouse > pointer is, which on a graphical display could be anywhere on the > screen, not necessarily within the Emacs window or even frame displaying > the artist-mode buffer. I think this is less disturbing that getting the error, and since, when invoking the command with down-mouse-2 as intended, passing last-nonmenu-event has the same effect as passing t (i.e., popping up the menu where the mouse pointer is), I see no problem with making this change. (It also DTRT if `artist-mouse-choose-operation' is rebound, though if that isn't how the error message showed 110, then something else must be going on.) So if there are no objections, I'll push it to master. Steve Berman