From unknown Mon Aug 18 00:03:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15599 <15599@debbugs.gnu.org> To: bug#15599 <15599@debbugs.gnu.org> Subject: Status: [PATCH] Inferior Lisp Mode Menu Reply-To: bug#15599 <15599@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:03:35 +0000 retitle 15599 [PATCH] Inferior Lisp Mode Menu reassign 15599 emacs submitter 15599 John Anthony severity 15599 wishlist tag 15599 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 13:16:35 2013 Received: (at submit) by debbugs.gnu.org; 12 Oct 2013 17:16:35 +0000 Received: from localhost ([127.0.0.1]:44578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV2nq-0006Fd-Q0 for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:16:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55789) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV2no-0006FT-Ue for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:16:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV2ng-0000WG-H5 for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:16:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:32930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2ng-0000WC-EC for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:16:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2na-0006Ki-DC for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV2nU-0000UV-9c for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:16:18 -0400 Received: from [198.46.132.138] (port=60058 helo=jo.hnanthony.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2nU-0000Ts-53 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:16:12 -0400 Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9CH8kq0000710 for ; Sat, 12 Oct 2013 18:08:46 +0100 Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9CH8kRG000709 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 18:08:46 +0100 Date: Sat, 12 Oct 2013 18:08:46 +0100 From: John Anthony To: bug-gnu-emacs@gnu.org Subject: [PATCH] Inferior Lisp Mode Menu Message-ID: <20131012170846.GA688@jo.hnanthony.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I have put together a menu for inferior-lisp mode, which is one of the two listed in etc/TODO (line 66, I already supplied a patch for text-mode). Please do let me know if there's anything I could have done better as I'm planning to make sure all major modes have appropriate menus. -- John Anthony --cNdxnHkX5QqsyA0e Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="inf-lisp-mode-menu.patch" diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index d73e948..4cda3fe 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -91,6 +91,19 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword (define-key map "\C-c\C-v" 'lisp-show-variable-documentation) map)) +(easy-menu-define + inferior-lisp-menu + inferior-lisp-mode-map + "Inferior Lisp Menu" + `("Inf-Lisp" + ["Eval Last Sexp" lisp-eval-last-sexp t] + ["Load File" lisp-load-file t] + ["Compile File" lisp-compile-file t] + ["Show Arglist" lisp-show-arglist t] + ["Describe Sym" lisp-describe-sym t] + ["Show Fucntion Doc" lisp-show-function-documentation t] + ["Show Variable Doc" lisp-show-variable-documentation t])) + ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. (define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; Gnu convention --cNdxnHkX5QqsyA0e-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 13:28:47 2013 Received: (at submit) by debbugs.gnu.org; 12 Oct 2013 17:28:47 +0000 Received: from localhost ([127.0.0.1]:44584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV2ze-0006XK-WE for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:28:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57558) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV2zc-0006XC-KS for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV2zT-0003Tu-VF for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:28:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2zT-0003To-Rg for submit@debbugs.gnu.org; Sat, 12 Oct 2013 13:28:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2zN-0007zr-Pt for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:28:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV2zE-0003Rk-GQ for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:28:29 -0400 Received: from [198.46.132.138] (port=34686 helo=jo.hnanthony.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV2zE-0003Rg-C5 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 13:28:20 -0400 Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9CHL0M8000776 for ; Sat, 12 Oct 2013 18:21:01 +0100 Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9CHL0Bn000775 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2013 18:21:00 +0100 Date: Sat, 12 Oct 2013 18:21:00 +0100 From: John Anthony To: bug-gnu-emacs@gnu.org Subject: Re: [PATCH] Inferior Lisp Mode Menu Message-ID: <20131012172100.GA738@jo.hnanthony.com> References: <20131012170846.GA688@jo.hnanthony.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <20131012170846.GA688@jo.hnanthony.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Oh, I'm terribly sorry. I used a quasiquote when a quote would have done. This is probably the worst thing that has ever happened and I am suitably embarrassed. -- John Anthony --G4iJoqBmSsgzjUCe Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="inf-lisp-mode-menu2.patch" diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index d73e948..eda7fda 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -91,6 +91,19 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword (define-key map "\C-c\C-v" 'lisp-show-variable-documentation) map)) +(easy-menu-define + inferior-lisp-menu + inferior-lisp-mode-map + "Inferior Lisp Menu" + '("Inf-Lisp" + ["Eval Last Sexp" lisp-eval-last-sexp t] + ["Load File" lisp-load-file t] + ["Compile File" lisp-compile-file t] + ["Show Arglist" lisp-show-arglist t] + ["Describe Sym" lisp-describe-sym t] + ["Show Fucntion Doc" lisp-show-function-documentation t] + ["Show Variable Doc" lisp-show-variable-documentation t])) + ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. (define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; Gnu convention --G4iJoqBmSsgzjUCe-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 14:57:32 2013 Received: (at 15599) by debbugs.gnu.org; 14 Oct 2013 18:57:32 +0000 Received: from localhost ([127.0.0.1]:49276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVnKd-00076v-Et for submit@debbugs.gnu.org; Mon, 14 Oct 2013 14:57:31 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:48999) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVnKb-00076N-Gd for 15599@debbugs.gnu.org; Mon, 14 Oct 2013 14:57:29 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r9EIvPpP006555; Mon, 14 Oct 2013 14:57:26 -0400 Received: by ceviche.home (Postfix, from userid 20848) id A2A6866238; Sat, 12 Oct 2013 15:16:30 -0400 (EDT) From: Stefan Monnier To: John Anthony Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-ID: References: <20131012170846.GA688@jo.hnanthony.com> <20131012172100.GA738@jo.hnanthony.com> Date: Sat, 12 Oct 2013 15:16:30 -0400 In-Reply-To: <20131012172100.GA738@jo.hnanthony.com> (John Anthony's message of "Sat, 12 Oct 2013 18:21:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4731=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4731> : inlines <142> : streams <1055822> : uri <1565255> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) > Oh, I'm terribly sorry. I used a quasiquote when a quote would have > done. This is probably the worst thing that has ever happened and I am > suitably embarrassed. This is sickening! I sentence you to a month of `vi'. Oh, wait, you misnamed "backquote" to add insult to injury. So that'll be a two months of `ed' instead! Stefan "I hope you'll learn your lesson" From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 18 22:48:17 2013 Received: (at 15599) by debbugs.gnu.org; 19 Oct 2013 02:48:17 +0000 Received: from localhost ([127.0.0.1]:57489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXMaO-00027e-En for submit@debbugs.gnu.org; Fri, 18 Oct 2013 22:48:16 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39523 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXMaK-00027Q-Tb for 15599@debbugs.gnu.org; Fri, 18 Oct 2013 22:48:13 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VXMaJ-0005wi-He; Fri, 18 Oct 2013 22:48:11 -0400 From: Glenn Morris To: John Anthony Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu References: <20131012170846.GA688@jo.hnanthony.com> X-Spook: SCUD missile national information infrastructure X-Ran: tX&+#e1ng)s,x0u[opKzr('\#":OK|Q-l8yetqci6]wakd8^o=+Xpzyf{^q!% X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 18 Oct 2013 22:48:11 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) Thanks. Please send a reminder when you hear your copyright assignment is complete. > ["Eval Last Sexp" lisp-eval-last-sexp t] Is it useful to have that appearing in the inferior lisp buffer's menu? Surely it's normally used with stuff in a Lisp Mode buffer? > ["Load File" lisp-load-file t] Should be "Load File..." Similarly for "Compile File...", and indeed for most of these menu items I think. > ["Show Fucntion Doc" lisp-show-function-documentation t] ^^^^^^^^ I think "Show Documentation for Function..." would be better. But again, isn't this a command more likely to be useful in a Lisp Mode buffer? IMO this applies to many of those menu items. But I never use inferior-lisp-mode, so I don't know. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 20:57:53 2013 Received: (at submit) by debbugs.gnu.org; 22 Oct 2013 00:57:53 +0000 Received: from localhost ([127.0.0.1]:33756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYQIC-0006Z7-P1 for submit@debbugs.gnu.org; Mon, 21 Oct 2013 20:57:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55428) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYQI9-0006Yq-W9 for submit@debbugs.gnu.org; Mon, 21 Oct 2013 20:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYQHw-0006M4-69 for submit@debbugs.gnu.org; Mon, 21 Oct 2013 20:57:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYQHw-0006Lz-1q for submit@debbugs.gnu.org; Mon, 21 Oct 2013 20:57:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYQHp-0005Fz-PZ for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2013 20:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYQHj-0006Kv-QN for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2013 20:57:29 -0400 Received: from [198.46.132.138] (port=55179 helo=jo.hnanthony.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYQHd-0006Ij-EM; Mon, 21 Oct 2013 20:57:17 -0400 Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9M0u6HO010629; Tue, 22 Oct 2013 01:56:06 +0100 Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9M0u60o010628; Tue, 22 Oct 2013 01:56:06 +0100 Date: Tue, 22 Oct 2013 01:56:06 +0100 From: John Anthony To: Glenn Morris Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-ID: <20131022005606.GA10573@jo.hnanthony.com> References: <20131012170846.GA688@jo.hnanthony.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) On Fri, Oct 18, 2013 at 10:48:11PM -0400, Glenn Morris wrote: > > Thanks. Please send a reminder when you hear your copyright assignment > is complete. I'll be sure to contact you as soon as I hear back. > > ["Eval Last Sexp" lisp-eval-last-sexp t] > > Is it useful to have that appearing in the inferior lisp buffer's menu? > Surely it's normally used with stuff in a Lisp Mode buffer? This was my initial though as well, although I have used it in an inferior lisp session as well - useful for checking the last sexp you wrote will give the correct result whilst working on a larger expression. > > ["Load File" lisp-load-file t] > > Should be "Load File..." > Similarly for "Compile File...", and indeed for most of these menu items > I think. I think you're quite correct. Before deciding to work on them I, like I think most Emacs users, always hid and never thought about the menus. It's taken me a while to really grok the style and filter out the inconsistent stuff from the good. > > ["Show Fucntion Doc" lisp-show-function-documentation t] > ^^^^^^^^ > I think "Show Documentation for Function..." would be better. > But again, isn't this a command more likely to be useful in a Lisp Mode > buffer? IMO this applies to many of those menu items. > But I never use inferior-lisp-mode, so I don't know. I've taken to spell-checking whilst I work on menu entries as well. There are lots of times I've looked at things and tried to decide if it should be in the menu entry. etc/TODO says inferior-lisp should have a menu entry but all of the functions seem to be better off in a Lisp Mode buffer. I'll also resist the urge for brevity and just use a proper sentence in future - I guess it makes sense to provide menu users with an informative menu item as they are less likely to have much experience. In future I'll append "..." to menu entries that require further input in accordance with style rules. The two entries you pointed out seem to be the most useful entries, actually, as I could see myself wanting to look up documentation (especially for the last-typed function) in an inferior-lisp. As always, style and implementation feedback is extremely welcome. I'm intending to do a lot of this and therefore early feedback will prevent me from doing a lot of extra work fixing things I've done wrong. -- John Anthony From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 22 10:23:33 2013 Received: (at 15599) by debbugs.gnu.org; 22 Oct 2013 14:23:33 +0000 Received: from localhost ([127.0.0.1]:35215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYcrs-0006kA-L4 for submit@debbugs.gnu.org; Tue, 22 Oct 2013 10:23:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56281) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYcrp-0006ju-93 for 15599@debbugs.gnu.org; Tue, 22 Oct 2013 10:23:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYVR/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kEwmICLEfkA6NBIQGA5FNj3yDMYFegxM X-IPAS-Result: Av4EABK/CFFFpYVR/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kEwmICLEfkA6NBIQGA5FNj3yDMYFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="36073717" Received: from 69-165-133-81.dsl.teksavvy.com (HELO pastel.home) ([69.165.133.81]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Oct 2013 10:23:22 -0400 Received: by pastel.home (Postfix, from userid 20848) id E84F160293; Tue, 22 Oct 2013 10:23:21 -0400 (EDT) From: Stefan Monnier To: John Anthony Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-ID: References: <20131012170846.GA688@jo.hnanthony.com> <20131022005606.GA10573@jo.hnanthony.com> Date: Tue, 22 Oct 2013 10:23:21 -0400 In-Reply-To: <20131022005606.GA10573@jo.hnanthony.com> (John Anthony's message of "Tue, 22 Oct 2013 01:56:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15599 Cc: Glenn Morris , 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) BTW, regarding inferior processes, it'd be really good to add a library that provides the "standard" link between a programming mode buffer and an inferior process, and then to adapt existing major modes to use that library. FWIW, I had started such a library (while working on sml-mode) but it's just a first attempt, which has not yet been used for anything else than sml-mode. You can check sml-mode.el (in elpa) to see an example of its use (tho sml-mode includes a copy of that prog-proc thingy, renamed to sml-prog-proc). Stefan ;;; prog-proc.el --- Interacting from a source buffer with an inferior process -*- lexical-binding: t; coding: utf-8 -*- ;; Copyright (C) 2012 Free Software Foundation, Inc. ;; Author: (Stefan Monnier) ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Prog-Proc is a package designed to complement Comint: while Comint was ;; designed originally to handle the needs of inferior process buffers, such ;; as a buffer running a Scheme repl, Comint does not actually provide any ;; functionality that links this process buffer with some source code. ;; ;; That's where Prog-Proc comes into play: it provides the usual commands and ;; key-bindings that lets the user send his code to the underlying repl. ;;; Code: (eval-when-compile (require 'cl)) (require 'comint) (require 'compile) (defvar prog-proc-mode-map (let ((map (make-sparse-keymap))) (define-key map [?\C-c ?\C-l] 'prog-proc-load-file) (define-key map [?\C-c ?\C-c] 'prog-proc-compile) (define-key map [?\C-c ?\C-z] 'prog-proc-switch-to) (define-key map [?\C-c ?\C-r] 'prog-proc-send-region) (define-key map [?\C-c ?\C-b] 'prog-proc-send-buffer) ;; FIXME: Add ;; (define-key map [?\M-C-x] 'prog-proc-send-defun) ;; (define-key map [?\C-x ?\C-e] 'prog-proc-send-last-sexp) ;; FIXME: Add menu. Now, that's trickier because keymap inheritance ;; doesn't play nicely with menus! map) "Keymap for `prog-proc-mode'.") (defvar prog-proc--buffer nil "The inferior-process buffer to which to send code.") (make-variable-buffer-local 'prog-proc--buffer) (defstruct (prog-proc-descriptor (:constructor prog-proc-make) (:predicate nil) (:copier nil)) (name nil :read-only t) (run nil :read-only t) (load-cmd nil :read-only t) (chdir-cmd nil :read-only t) (command-eol "\n" :read-only t) (compile-commands-alist nil :read-only t)) (defvar prog-proc-descriptor nil "Struct containing the various functions to create a new process, ...") (defmacro prog-proc--prop (prop) `(,(intern (format "prog-proc-descriptor-%s" prop)) (or prog-proc-descriptor ;; FIXME: Look for available ones and pick one. (error "Not a `prog-proc' buffer")))) (defmacro prog-proc--call (method &rest args) `(funcall (prog-proc--prop ,method) ,@args)) ;; The inferior process and his buffer are basically interchangeable. ;; Currently the code takes prog-proc--buffer as the main reference, ;; but all users should either use prog-proc-proc or prog-proc-buffer ;; to find the info. (defun prog-proc-proc () "Return the inferior process for the code in current buffer." (or (and (buffer-live-p prog-proc--buffer) (get-buffer-process prog-proc--buffer)) (when (derived-mode-p 'prog-proc-mode 'prog-proc-comint-mode) (setq prog-proc--buffer (current-buffer)) (get-buffer-process prog-proc--buffer)) (let ((ppd prog-proc-descriptor) (buf (prog-proc--call run))) (with-current-buffer buf (if (and ppd (null prog-proc-descriptor)) (set (make-local-variable 'prog-proc-descriptor) ppd))) (setq prog-proc--buffer buf) (get-buffer-process prog-proc--buffer)))) (defun prog-proc-buffer () "Return the buffer of the inferior process." (process-buffer (prog-proc-proc))) (defun prog-proc-run-repl () "Start the read-eval-print process, if it's not running yet." (interactive) (ignore (prog-proc-proc))) (defun prog-proc-switch-to () "Switch to the buffer running the read-eval-print process." (pop-to-buffer (prog-proc-buffer))) (defun prog-proc-send-string (proc str) "Send command STR to PROC, with an EOL terminator appended." (with-current-buffer (process-buffer proc) ;; FIXME: comint-send-string does not pass the string through ;; comint-input-filter-function, so we have to do it by hand. ;; Maybe we should insert the command into the buffer and then call ;; comint-send-input? (prog-proc-comint-input-filter-function nil) (comint-send-string proc (concat str (prog-proc--prop command-eol))))) (defun prog-proc-load-file (file &optional and-go) "Load FILE into the read-eval-print process. FILE is the file visited by the current buffer. If prefix argument AND-GO is used, then we additionally switch to the buffer where the process is running." (interactive (list (or buffer-file-name (read-file-name "File to load: " nil nil t)) current-prefix-arg)) (comint-check-source file) (let ((proc (prog-proc-proc))) (prog-proc-send-string proc (prog-proc--call load-cmd file)) (when and-go (pop-to-buffer (process-buffer proc))))) (defvar prog-proc--tmp-file nil) (defun prog-proc-send-region (start end &optional and-go) "Send the content of the region to the read-eval-print process. START..END delimit the region; AND-GO if non-nil indicate to additionally switch to the process's buffer." (interactive "r\nP") (if (> start end) (let ((tmp end)) (setq end start) (setq start tmp)) (if (= start end) (error "Nothing to send: the region is empty"))) (let ((proc (prog-proc-proc)) (tmp (make-temp-file "emacs-region"))) (write-region start end tmp nil 'silently) (when prog-proc--tmp-file (ignore-errors (delete-file (car prog-proc--tmp-file))) (set-marker (cdr prog-proc--tmp-file) nil)) (setq prog-proc--tmp-file (cons tmp (copy-marker start))) (prog-proc-send-string proc (prog-proc--call load-cmd tmp)) (when and-go (pop-to-buffer (process-buffer proc))))) (defun prog-proc-send-buffer (&optional and-go) "Send the content of the current buffer to the read-eval-print process. AND-GO if non-nil indicate to additionally switch to the process's buffer." (interactive "P") (prog-proc-send-region (point-min) (point-max) and-go)) (define-derived-mode prog-proc-mode prog-mode "Prog-Proc" "Major mode for editing source code and interact with an interactive loop." ) ;;; Extended comint-mode for Prog-Proc. (defun prog-proc-chdir (dir) "Change the working directory of the inferior process to DIR." (interactive "DChange to directory: ") (let ((dir (expand-file-name dir)) (proc (prog-proc-proc))) (with-current-buffer (process-buffer proc) (prog-proc-send-string proc (prog-proc--call chdir-cmd dir)) (setq default-directory (file-name-as-directory dir))))) (defun prog-proc-comint-input-filter-function (str) ;; `compile.el' doesn't know that file location info from errors should be ;; recomputed afresh (without using stale info from earlier compilations). (compilation-forget-errors) ;Has to run before compilation-fake-loc. (if (and prog-proc--tmp-file (marker-buffer (cdr prog-proc--tmp-file))) (compilation-fake-loc (cdr prog-proc--tmp-file) (car prog-proc--tmp-file))) str) (defvar prog-proc-comint-mode-map (let ((map (make-sparse-keymap))) (define-key map [?\C-c ?\C-r] 'prog-proc-run-repl) (define-key map [?\C-c ?\C-l] 'prog-proc-load-file) map)) (define-derived-mode prog-proc-comint-mode comint-mode "Prog-Proc-Comint" "Major mode for an inferior process used to run&compile source code." ;; Enable compilation-minor-mode, but only after the child mode is setup ;; since the child-mode might want to add rules to ;; compilation-error-regexp-alist. (add-hook 'after-change-major-mode-hook #'compilation-minor-mode nil t) ;; The keymap of compilation-minor-mode is too unbearable, so we ;; need to hide most of the bindings. (let ((map (make-sparse-keymap))) (dolist (keys '([menu-bar] [follow-link])) ;; Preserve some of the bindings. (define-key map keys (lookup-key compilation-minor-mode-map keys))) (add-to-list 'minor-mode-overriding-map-alist (cons 'compilation-minor-mode map))) (add-hook 'comint-input-filter-functions #'prog-proc-comint-input-filter-function nil t)) (defvar prog-proc--compile-command nil "The command used by default by `prog-proc-compile'.") (defun prog-proc-compile (command &optional and-go) "Pass COMMAND to the read-eval-loop process to compile the current file. You can then use the command \\[next-error] to find the next error message and move to the source code that caused it. Interactively, prompts for the command if `compilation-read-command' is non-nil. With prefix arg, always prompts. Prefix arg AND-GO also means to switch to the read-eval-loop buffer afterwards." (interactive (let* ((dir default-directory) (cmd "cd \".")) ;; Look for files to determine the default command. (while (and (stringp dir) (progn (dolist (cf (prog-proc--prop compile-commands-alist)) (when (file-exists-p (expand-file-name (cdr cf) dir)) (setq cmd (concat cmd "\"; " (car cf))) (return nil))) (not cmd))) (let ((newdir (file-name-directory (directory-file-name dir)))) (setq dir (unless (equal newdir dir) newdir)) (setq cmd (concat cmd "/..")))) (setq cmd (cond ((local-variable-p 'prog-proc--compile-command) prog-proc--compile-command) ((string-match "^\\s-*cd\\s-+\"\\.\"\\s-*;\\s-*" cmd) (substring cmd (match-end 0))) ((string-match "^\\s-*cd\\s-+\"\\(\\./\\)" cmd) (replace-match "" t t cmd 1)) ((string-match ";" cmd) cmd) (t prog-proc--compile-command))) ;; code taken from compile.el (list (if (or compilation-read-command current-prefix-arg) (read-from-minibuffer "Compile command: " cmd nil nil '(compile-history . 1)) cmd)))) ;; ;; now look for command's file to determine the directory ;; (setq dir default-directory) ;; (while (and (stringp dir) ;; (dolist (cf (prog-proc--prop compile-commands-alist) t) ;; (when (and (equal cmd (car cf)) ;; (file-exists-p (expand-file-name (cdr cf) dir))) ;; (return nil)))) ;; (let ((newdir (file-name-directory (directory-file-name dir)))) ;; (setq dir (unless (equal newdir dir) newdir)))) ;; (setq dir (or dir default-directory)) ;; (list cmd dir))) (set (make-local-variable 'prog-proc--compile-command) command) (save-some-buffers (not compilation-ask-about-save) nil) (let ((dir default-directory)) (when (string-match "^\\s-*cd\\s-+\"\\([^\"]+\\)\"\\s-*;" command) (setq dir (match-string 1 command)) (setq command (replace-match "" t t command))) (setq dir (expand-file-name dir)) (let ((proc (prog-proc-proc)) (eol (prog-proc--prop command-eol))) (with-current-buffer (process-buffer proc) (setq default-directory dir) (prog-proc-send-string proc (concat (prog-proc--call chdir-cmd dir) ;; Strip the newline, to avoid adding a prompt. (if (string-match "\n\\'" eol) (replace-match " " t t eol) eol) command)) (when and-go (pop-to-buffer (process-buffer proc))))))) (provide 'prog-proc) ;;; prog-proc.el ends here From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 23 17:47:06 2013 Received: (at 15599) by debbugs.gnu.org; 23 Oct 2013 21:47:06 +0000 Received: from localhost ([127.0.0.1]:38998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZ6Gf-0004N6-5e for submit@debbugs.gnu.org; Wed, 23 Oct 2013 17:47:05 -0400 Received: from [198.46.132.138] (port=47710 helo=jo.hnanthony.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZ6Gd-0004My-0l for 15599@debbugs.gnu.org; Wed, 23 Oct 2013 17:47:03 -0400 Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9NLl1QS008264; Wed, 23 Oct 2013 22:47:01 +0100 Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9NLl1aW008263; Wed, 23 Oct 2013 22:47:01 +0100 Date: Wed, 23 Oct 2013 22:47:01 +0100 From: John Anthony To: Glenn Morris Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-ID: <20131023214701.GA8211@jo.hnanthony.com> References: <20131012170846.GA688@jo.hnanthony.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 18, 2013 at 10:48:11PM -0400, Glenn Morris wrote: > > Thanks. Please send a reminder when you hear your copyright assignment > is complete. My copyright assignment is complete. A quick question of style before I submit a patch with your suggestions applied; should I check that a user is going to use a menu option correctly and, if not, disable it? Disabling it seems to improve tidiness but can also hide important feedback. To use a working example, should I disable "Eval Last Sexp" in the menu if the cursor is not positioned after a valid sexp? It feels like it would be better for a person to see the error (i.e. Scan error: "Unbalanced Parenthesis"). [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 18, 2013 at 10:48:11PM -0400, Glenn Morris wrote: > > Thanks. Please send a reminder when you hear your copyright assignment > is complete. My copyright assignment is complete. A quick question of style before I submit a patch with your suggestions applied; should I check that a user is going to use a menu option correctly and, if not, disable it? Disabling it seems to improve tidiness but can also hide important feedback. To use a working example, should I disable "Eval Last Sexp" in the menu if the cursor is not positioned after a valid sexp? It feels like it would be better for a person to see the error (i.e. Scan error: "Unbalanced Parenthesis"). [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS On Fri, Oct 18, 2013 at 10:48:11PM -0400, Glenn Morris wrote: > > Thanks. Please send a reminder when you hear your copyright assignment > is complete. My copyright assignment is complete. A quick question of style before I submit a patch with your suggestions applied; should I check that a user is going to use a menu option correctly and, if not, disable it? Disabling it seems to improve tidiness but can also hide important feedback. To use a working example, should I disable "Eval Last Sexp" in the menu if the cursor is not positioned after a valid sexp? It feels like it would be better for a person to see the error (i.e. Scan error: "Unbalanced Parenthesis"). -- John Anthony From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 03:20:24 2013 Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 07:20:24 +0000 Received: from localhost ([127.0.0.1]:40059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZFDS-0002zO-Rm for submit@debbugs.gnu.org; Thu, 24 Oct 2013 03:20:23 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46066 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZFDP-0002zF-Mk for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 03:20:20 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VZFDO-0006zU-MC; Thu, 24 Oct 2013 03:20:18 -0400 From: Glenn Morris To: John Anthony Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> X-Spook: White Water JSOFC3IP Majic Capricorn assassinate ASO X-Ran: \z;yso3|FeJeNX"aQQ*qF[rt75OVH#O(Al%IA#^LRW[!=Mfl/S:]#nXW{.=\1F_!m"Qb?7 X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 24 Oct 2013 03:20:18 -0400 In-Reply-To: <20131023214701.GA8211@jo.hnanthony.com> (John Anthony's message of "Wed, 23 Oct 2013 22:47:01 +0100") Message-ID: <561snf83x.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.7 (----) John Anthony wrote: > A quick question of style before I submit a patch with your > suggestions applied; should I check that a user is going to use a menu > option correctly and, if not, disable it? Sometimes yes, sometimes no. Eg it makes sense to me that "Cut" and "Copy" in the "Edit" menu are disabled when there is no active region. > To use a working example, should I disable "Eval Last Sexp" in the > menu if the cursor is not positioned after a valid sexp? But that seems like too much. I'd leave such an item always enabled. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 03:25:39 2013 Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 07:25:39 +0000 Received: from localhost ([127.0.0.1]:40079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZFIY-00038V-Bb for submit@debbugs.gnu.org; Thu, 24 Oct 2013 03:25:38 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46136 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZFIQ-00038I-Dj for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 03:25:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VZFIP-0007Ud-6M; Thu, 24 Oct 2013 03:25:29 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu References: <20131012170846.GA688@jo.hnanthony.com> <20131022005606.GA10573@jo.hnanthony.com> X-Spook: 9/11 Israel Fortezza industrial intelligence CIDA X-Ran: ~5BYC4RER]?flq#aj-LFRu$uxGa0Bb!G;v9WvoiQ;y&K-lRwfU.jZ"B'KX,x3FxR/_5B'3 X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 24 Oct 2013 03:25:29 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Oct 2013 10:23:21 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org, John Anthony X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Stefan Monnier wrote: > BTW, regarding inferior processes, it'd be really good to add > a library that provides the "standard" link between a programming mode > buffer and an inferior process, and then to adapt existing major modes > to use that library. Cloned as http://debbugs.gnu.org/15697 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 10:05:26 2013 Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 14:05:26 +0000 Received: from localhost ([127.0.0.1]:41127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLXR-0007vE-UN for submit@debbugs.gnu.org; Thu, 24 Oct 2013 10:05:26 -0400 Received: from [198.46.132.138] (port=46463 helo=jo.hnanthony.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLXO-0007v4-Sf for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 10:05:23 -0400 Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9OE5KoX010762; Thu, 24 Oct 2013 15:05:21 +0100 Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9OE5Khi010761; Thu, 24 Oct 2013 15:05:20 +0100 Date: Thu, 24 Oct 2013 15:05:18 +0100 From: John Anthony To: Glenn Morris Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-ID: <20131024140518.GA10721@jo.hnanthony.com> References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> <561snf83x.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561snf83x.fsf@fencepost.gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Glenn Morris wrote: > > To use a working example, should I disable "Eval Last Sexp" in the > > menu if the cursor is not positioned after a valid sexp? > > But that seems like too much. I'd leave such an item always enabled. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Glenn Morris wrote: > > To use a working example, should I disable "Eval Last Sexp" in the > > menu if the cursor is not positioned after a valid sexp? > > But that seems like too much. I'd leave such an item always enabled. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Glenn Morris wrote: > > To use a working example, should I disable "Eval Last Sexp" in the > > menu if the cursor is not positioned after a valid sexp? > > But that seems like too much. I'd leave such an item always enabled. I'll be honest - I was always expecting the answer to be "it depends on the context". Here's a patch with your style advice applied: diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index d73e948..a9953e2 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -91,6 +91,21 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword (define-key map "\C-c\C-v" 'lisp-show-variable-documentation) map)) +(easy-menu-define + inferior-lisp-menu + inferior-lisp-mode-map + "Inferior Lisp Menu" + '("Inf-Lisp" + ["Eval Last Sexp" lisp-eval-last-sexp t] + "--" + ["Load File..." lisp-load-file t] + ["Compile File..." lisp-compile-file t] + "--" + ["Show Arglist..." lisp-show-arglist t] + ["Describe Symbol..." lisp-describe-sym t] + ["Show Documentation for Function..." lisp-show-function-documentation t] + ["Show Documentation for Variable..." lisp-show-variable-documentation t])) + ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. (define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; Gnu convention -- John Anthony http://jo.hnanthony.com From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 10:33:38 2013 Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 14:33:38 +0000 Received: from localhost ([127.0.0.1]:41202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLyk-0000DM-It for submit@debbugs.gnu.org; Thu, 24 Oct 2013 10:33:38 -0400 Received: from relais.videotron.ca ([24.201.245.36]:42054) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLyi-0000DD-S4 for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 10:33:37 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([24.201.53.56]) by VL-VM-MR005.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MV6002NDGG05LI0@VL-VM-MR005.ip.videotron.ca> for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 10:33:36 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 64F5D6609A; Thu, 24 Oct 2013 10:33:31 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu Message-id: References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> <561snf83x.fsf@fencepost.gnu.org> Date: Thu, 24 Oct 2013 10:33:31 -0400 In-reply-to: <561snf83x.fsf@fencepost.gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org, John Anthony X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) >> To use a working example, should I disable "Eval Last Sexp" in the >> menu if the cursor is not positioned after a valid sexp? > But that seems like too much. I'd leave such an item always enabled. Agreed. I can see two reasons for it: - these "enabled" tests are run, pretty much all the time, so they need to be sufficiently "quick" not to disrupt normal work. Testing if the last sexp is properly balanced may have to scan megabytes of text (even if it usually is not the case), so it can slow things down noticeably. - it should be reasonably obvious to the user why a menu entry is disabled, and I think most users wouldn't find this one to be obvious. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 11:00:58 2013 Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 15:00:58 +0000 Received: from localhost ([127.0.0.1]:41240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZMPB-0000vR-Dy for submit@debbugs.gnu.org; Thu, 24 Oct 2013 11:00:57 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33544) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZMP9-0000vE-9T for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 11:00:55 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9OF0lTr025062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Oct 2013 15:00:48 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9OF0krW029429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Oct 2013 15:00:46 GMT Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9OF0kDB013317; Thu, 24 Oct 2013 15:00:46 GMT MIME-Version: 1.0 Message-ID: <69159453-2a43-42b8-b1a3-c9da282490c4@default> Date: Thu, 24 Oct 2013 08:00:45 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Glenn Morris Subject: RE: bug#15599: [PATCH] Inferior Lisp Mode Menu References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> <561snf83x.fsf@fencepost.gnu.org> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 15599 Cc: 15599@debbugs.gnu.org, John Anthony X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) > > I'd leave such an item always enabled. >=20 > Agreed. I can see two reasons for it: > - these "enabled" tests are run, pretty much all the time, so they > need to be sufficiently "quick" not to disrupt normal work. Testing > if the last sexp is properly balanced may have to scan megabytes of > text (even if it usually is not the case), so it can slow things down > noticeably. > - it should be reasonably obvious to the user why a menu entry is > disabled, and I think most users wouldn't find this one to be > obvious. Yes. The first reason is pretty important, and needs to be taken into consideration even when there are not megabytes to scan etc. Pretty much any :enable or :visible test needs to be simple & quick. Dunno whether this is mentioned in the manual, but I think it should be, as a useful guideline. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 22:36:14 2013 Received: (at 15599-done) by debbugs.gnu.org; 25 Oct 2013 02:36:14 +0000 Received: from localhost ([127.0.0.1]:42306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZXG2-0002hO-F5 for submit@debbugs.gnu.org; Thu, 24 Oct 2013 22:36:14 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36075 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZXG0-0002hE-C7 for 15599-done@debbugs.gnu.org; Thu, 24 Oct 2013 22:36:12 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VZXFz-0002C5-AJ; Thu, 24 Oct 2013 22:36:11 -0400 From: Glenn Morris To: 15599-done@debbugs.gnu.org Subject: Re: bug#15599: [PATCH] Inferior Lisp Mode Menu References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> <561snf83x.fsf@fencepost.gnu.org> <20131024140518.GA10721@jo.hnanthony.com> X-Spook: basement FBI undercover New World Order diwn csim ASO X-Ran: *t`]<%Wqw{HagWg6?=_`82v!-7'6f^q@~1XZV^p=\SLQVa&Y`d[*-_IzQi80L7sVZm[Hae X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 24 Oct 2013 22:36:11 -0400 In-Reply-To: <20131024140518.GA10721@jo.hnanthony.com> (John Anthony's message of "Thu, 24 Oct 2013 15:05:18 +0100") Message-ID: <19bo2evzz8.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 15599-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Version: 24.4 Applied. From unknown Mon Aug 18 00:03:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Nov 2013 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator