From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86111 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: Macro suddenly broken Date: Tue, 18 Aug 2015 16:10:05 +0200 Message-ID: <87egj01yde.fsf@gnu.org> References: <87tws1q39b.fsf@gnu.org> <6sw6c737zlyhdc.fsf@dhcp-6-148.hmco.com> <87r3n2xtzg.fsf@gnu.org> <6sw6c7vbcew1jj.fsf@dhcp-6-148.hmco.com> <87h9nx2g4z.fsf@gnu.org> <6sw6c7a8towzl5.fsf@dhcp-6-148.hmco.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439907074 14724 80.91.229.3 (18 Aug 2015 14:11:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2015 14:11:14 +0000 (UTC) Cc: ding@gnus.org To: Peter Davis Original-X-From: ding-owner+M34345@lists.math.uh.edu Tue Aug 18 16:11:01 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZRhbQ-00058W-Kb for ding-account@gmane.org; Tue, 18 Aug 2015 16:11:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1ZRhal-0001Td-GE; Tue, 18 Aug 2015 09:10:19 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZRhai-0001TL-OU for ding@lists.math.uh.edu; Tue, 18 Aug 2015 09:10:16 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZRhag-0006sf-Di for ding@lists.math.uh.edu; Tue, 18 Aug 2015 09:10:16 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by quimby.gnus.org with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZRhae-0007Jf-Hz for ding@gnus.org; Tue, 18 Aug 2015 16:10:12 +0200 Original-Received: from thinkpad-t440p (dhcp163.uni-koblenz.de [141.26.71.163]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 5F01D3D6007; Tue, 18 Aug 2015 16:10:05 +0200 (CEST) Mail-Followup-To: Peter Davis , ding@gnus.org In-Reply-To: <6sw6c7a8towzl5.fsf@dhcp-6-148.hmco.com> (Peter Davis's message of "Tue, 18 Aug 2015 08:28:06 -0400") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86111 Archived-At: Peter Davis writes: >>> On the working system, 'M M e' is nothing, but 'M M e e' is: >> >> What does "nothing" mean? I guess "the key sequence is not finished", >> right? > > Nothing means that if I type 'M M e', emacs immediately responds that > this is undefined, without waiting for any further keystrokes. Wow, this is really strange. If `M M e' is described as undefined, then actually `e' should be bound to `gnus-summary-put-mark-as-expirable'. >>> =E2=87=A7M =E2=87=A7M E E runs the command gnus-summary-put-mark-as-= expirable, >>> which is an interactive Lisp function in `gnus-sum.el'. Is that the literal output? I've never seen this key notation in emacs. Here, it would say `M M e e'. Is that something inherent to Aquamacs? >> Anyway. By default, `gnus-summary-put-mark-as-expirable' is not bound >> to a key, at least not in the current Gnus version. Is it possible that >> you've bound it, e.g., in ~/.gnus.el, on the machine where the macro >> works? > > It's not defined anywhere in my .emacs or .gnus.el file. In fact, the > sequence originally came from an example Peter M=C3=BCnster posted to this > list, so it evidently worked for him. Ok, I see. >> Well, what you can do of course is define your keyboard macro in such >> a way that it doesn't depend on key bindings, that is, the keyboard >> macro would do >> >> M-x gnus-summary-put-mark-as-expirable RET... >> >> instead of >> >> M M e e... > > Yes, I'd have to figure out how to do the rest of the behavior (moving > to and showing the next message in the group). As I mentioned, I'm not > lisp-savvy, but I could figure this out in time. Binding keys to vectors of keys is not the best way to persist keyboard macros. Basically, I'd recommend you re-record your macro using 1. Start recording with . 2. Perform the actions you want to record, e.g., expire the current message and move on to the next one. You can use key bindings for that but also the menu or tool bar or M-x ... 3. Finish recording of the macro with . 4. Give the last recently recorded keyboard macro a name, e.g., `pd/gnus-expire-and-move-on' using `C-x C-k n' =20=20 5. Open your ~/.emacs, move point to some empty line and do ` M-x insert-kbd-macro RET pd/gnus-expire-and-move-on RET'. This will insert a command definition for the given keyboard macro. Then you can bind that command rather than a plain key sequence in your `pm/alter-*-map' functions which I guess are run in `gnus-summary-mode-hook' and `gnus-article-mode-hook'. > I'm still puzzled about why it suddenly stopped working, after being > in use for months. Yes, me too. Is it possible that you are using different Aquamacs versions on the two computers? AFAIK, the current Aquamacs release is based on emacs 24.x whereas the previos version was based on emacs 23.x. It is possible that something in the handling of keyboard macros has changed between versions (although I cannot find a corresponding NEWS entry). Concretely, from what you are telling it seems as if the current version errors when a keyboard macro invokes an undefined key binding whereas the older version just ignores it and continues with the rest of the macro's keys. Bye, Tassilo