From: Peter Davis <pfd@pfdstudio.com>
To: ding@gnus.org
Subject: Re: Macro suddenly broken
Date: Wed, 19 Aug 2015 19:23:36 -0400 [thread overview]
Message-ID: <m21teykglj.fsf@PFDStudio-Air.home> (raw)
In-Reply-To: <87egj01yde.fsf@gnu.org> (Tassilo Horn's message of "Tue, 18 Aug 2015 16:10:05 +0200")
On 8/18/15 10:10 AM, Tassilo Horn wrote:
>
> 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 <f3>.
>
> 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 <f4>.
>
> 4. Give the last recently recorded keyboard macro a name, e.g.,
> `pd/gnus-expire-and-move-on' using `C-x C-k n'
>
> 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'.
>
Thanks very much for the detailed instructions. This will certainly be useful in the future. However, ...
I did this, resulting in:
(fset 'pd/gnus-expire-and-show-next
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ("E " 0 "%d")) arg)))
(defun pm/alter-summary-map ()
; (local-set-key "d" [?M ?M ?e ?e down ?g])
(local-set-key "d" 'pd/gnus-expire-and-show-next)
(local-set-key "vj" "BmINBOX.Junk Mail")
)
Unfortunately, I'm *still* getting:
After 0 kbd macro iterations: undefined: Keyboard macro terminated by a command ringing the bell
Ah, well.
Thank you!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
next prev parent reply other threads:[~2015-08-19 23:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 14:47 Peter Davis
2015-08-14 15:01 ` Peter Davis
2015-08-14 15:49 ` Tassilo Horn
2015-08-14 16:17 ` Peter Davis
2015-08-15 13:06 ` Peter Davis
2015-08-17 7:19 ` Tassilo Horn
2015-08-17 12:18 ` Peter Davis
2015-08-18 7:46 ` Tassilo Horn
2015-08-18 12:28 ` Peter Davis
2015-08-18 14:10 ` Tassilo Horn
2015-08-19 23:23 ` Peter Davis [this message]
2015-08-20 5:01 ` Tassilo Horn
2015-08-20 12:11 ` Peter Davis
2015-08-20 12:31 ` Tassilo Horn
2015-08-20 12:57 ` Peter Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m21teykglj.fsf@PFDStudio-Air.home \
--to=pfd@pfdstudio.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).