Gnus development mailing list
 help / color / mirror / Atom feed
* Macro suddenly broken
@ 2015-08-14 14:47 Peter Davis
  2015-08-14 15:01 ` Peter Davis
  2015-08-14 15:49 ` Tassilo Horn
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Davis @ 2015-08-14 14:47 UTC (permalink / raw)
  To: ding


I've been using gnus for months on Aquamacs on a Mac OS X 10.10 system,
but suddenly, the 'd' macro that I've designed to mark a message as
expirable and move to the next one is failing with:

    After 0 kbd macro iterations: undefined: Keyboard macro terminated by a command ringing the bell

I'm not aware of anything that's changed in my emacs or gnus setup. I
have defined a macro that use 'd' for delete/next:

    D runs the command [77 77 101 101 down 103], which is a keyboard macro.

    It is bound to D.


    Macro: 2*M 2*e <down> g

    Keyboard macro.

Any clues what might be going wrong here?

Thank you.

-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-14 14:47 Macro suddenly broken Peter Davis
@ 2015-08-14 15:01 ` Peter Davis
  2015-08-14 15:49 ` Tassilo Horn
  1 sibling, 0 replies; 15+ messages in thread
From: Peter Davis @ 2015-08-14 15:01 UTC (permalink / raw)
  To: ding

Peter Davis <pfd@pfdstudio.com> writes:

> I've been using gnus for months on Aquamacs on a Mac OS X 10.10 system,
> but suddenly, the 'd' macro that I've designed to mark a message as
> expirable and move to the next one is failing with:
>
>     After 0 kbd macro iterations: undefined: Keyboard macro terminated by a command ringing the bell
>
> I'm not aware of anything that's changed in my emacs or gnus setup. I
> have defined a macro that use 'd' for delete/next:
>
>     D runs the command [77 77 101 101 down 103], which is a keyboard macro.
>
>     It is bound to D.
>
>
>     Macro: 2*M 2*e <down> g
>
>     Keyboard macro.
>

Interestingly, the same macro is working on another Mac.

Thanks,
-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-14 14:47 Macro suddenly broken Peter Davis
  2015-08-14 15:01 ` Peter Davis
@ 2015-08-14 15:49 ` Tassilo Horn
  2015-08-14 16:17   ` Peter Davis
  1 sibling, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-14 15:49 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> writes:

> I've been using gnus for months on Aquamacs on a Mac OS X 10.10
> system, but suddenly, the 'd' macro that I've designed to mark a
> message as expirable and move to the next one is failing with:
>
>     After 0 kbd macro iterations: undefined: Keyboard macro terminated by a
> command ringing the bell
>
> I'm not aware of anything that's changed in my emacs or gnus setup. I
> have defined a macro that use 'd' for delete/next:
>
>     D runs the command [77 77 101 101 down 103], which is a keyboard macro.
>
>     It is bound to D.
>
>
>     Macro: 2*M 2*e <down> g
>
>     Keyboard macro.
>
> Any clues what might be going wrong here?

Not really but what happens when you run the keyboard macro manually,
i.e., just press the sequence of keys defining it?

The "ringing the bell" means that some error during movement occurred,
e.g., like pressing <down> when you are already on the last line of the
buffer.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  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
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Davis @ 2015-08-14 16:17 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
>> I've been using gnus for months on Aquamacs on a Mac OS X 10.10
>> system, but suddenly, the 'd' macro that I've designed to mark a
>> message as expirable and move to the next one is failing with:
>>
>>     After 0 kbd macro iterations: undefined: Keyboard macro terminated by a
>> command ringing the bell
>>
>> I'm not aware of anything that's changed in my emacs or gnus setup. I
>> have defined a macro that use 'd' for delete/next:
>>
>>     D runs the command [77 77 101 101 down 103], which is a keyboard macro.
>>
>>     It is bound to D.
>>
>>
>>     Macro: 2*M 2*e <down> g
>>
>>     Keyboard macro.
>>
>> Any clues what might be going wrong here?
>
> Not really but what happens when you run the keyboard macro manually,
> i.e., just press the sequence of keys defining it?
>
> The "ringing the bell" means that some error during movement occurred,
> e.g., like pressing <down> when you are already on the last line of the
> buffer.

Thank you. On the non-working system, I type:

M M e, but Emacs displays:

^M ^M E is undefined

(I used '^' for shift arrows)

The next 'e' puts the article in edit mode.

The definitions (and the .gnus.el files) are the same on the two systems:

(defun pm/alter-summary-map ()
  (local-set-key "d" [?M ?M ?e ?e down ?g]))

(defun pm/alter-article-map ()
  (local-set-key "d" "MMeen"))

Thanks,
-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-14 16:17   ` Peter Davis
@ 2015-08-15 13:06     ` Peter Davis
  2015-08-17  7:19     ` Tassilo Horn
  1 sibling, 0 replies; 15+ messages in thread
From: Peter Davis @ 2015-08-15 13:06 UTC (permalink / raw)
  To: ding

Peter Davis <pfd@pfdstudio.com> writes:

> Tassilo Horn <tsdh@gnu.org> writes:
>
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>>> I've been using gnus for months on Aquamacs on a Mac OS X 10.10
>>> system, but suddenly, the 'd' macro that I've designed to mark a
>>> message as expirable and move to the next one is failing with:
>>>
>>>     After 0 kbd macro iterations: undefined: Keyboard macro terminated by a
>>> command ringing the bell
>>>
>>> I'm not aware of anything that's changed in my emacs or gnus setup. I
>>> have defined a macro that use 'd' for delete/next:
>>>
>>>     D runs the command [77 77 101 101 down 103], which is a keyboard macro.
>>>
>>>     It is bound to D.
>>>
>>>
>>>     Macro: 2*M 2*e <down> g
>>>
>>>     Keyboard macro.
>>>
>>> Any clues what might be going wrong here?
>>
>> Not really but what happens when you run the keyboard macro manually,
>> i.e., just press the sequence of keys defining it?
>>
>> The "ringing the bell" means that some error during movement occurred,
>> e.g., like pressing <down> when you are already on the last line of the
>> buffer.
>
> Thank you. On the non-working system, I type:
>
> M M e, but Emacs displays:
>
> ^M ^M E is undefined
>
> (I used '^' for shift arrows)
>
> The next 'e' puts the article in edit mode.
>
> The definitions (and the .gnus.el files) are the same on the two systems:
>
> (defun pm/alter-summary-map ()
>   (local-set-key "d" [?M ?M ?e ?e down ?g]))
>
> (defun pm/alter-article-map ()
>   (local-set-key "d" "MMeen"))

Does anyone even have a suggestion for how to trouble-shoot this? I'm not lisp-savvy, but I know that same code running on two
identical Macs should behave the same way. I'm using the same .gnus.el file, and it works correctly on one, and used to work on the
other, but now suddenly started failing. I've restarted emacs and rebooted the system several times, but no joy.

Any clues?

Thank you,
-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-17  7:19 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> writes:

>> Not really but what happens when you run the keyboard macro manually,
>> i.e., just press the sequence of keys defining it?
>>
>> The "ringing the bell" means that some error during movement
>> occurred, e.g., like pressing <down> when you are already on the last
>> line of the buffer.
>
> Thank you. On the non-working system, I type:
>
> M M e, but Emacs displays:
>
> ^M ^M E is undefined

Same here: M M e is undefined

I guess, that's already the reason.  The keyboard macro fails because
the start of the macro's key sequence doesn't invoke any command.

> The definitions (and the .gnus.el files) are the same on the two systems:
>
> (defun pm/alter-summary-map ()
>   (local-set-key "d" [?M ?M ?e ?e down ?g]))
>
> (defun pm/alter-article-map ()
>   (local-set-key "d" "MMeen"))

Is is possible that you are running two different Gnus versions on the
two computers, i.e., in one version M M e is bound to something and in
one it is not?  (I use the latest Gnus version from Git, and there M M
e is not bound neither in the summary nor in the article buffer.)

Anyway, what does `C-h k M M e' show in a summary/article buffer on the
computer where your macro still works?

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-17  7:19     ` Tassilo Horn
@ 2015-08-17 12:18       ` Peter Davis
  2015-08-18  7:46         ` Tassilo Horn
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Davis @ 2015-08-17 12:18 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
>>> Not really but what happens when you run the keyboard macro manually,
>>> i.e., just press the sequence of keys defining it?
>>>
>>> The "ringing the bell" means that some error during movement
>>> occurred, e.g., like pressing <down> when you are already on the last
>>> line of the buffer.
>>
>> Thank you. On the non-working system, I type:
>>
>> M M e, but Emacs displays:
>>
>> ^M ^M E is undefined
>
> Same here: M M e is undefined
>
> I guess, that's already the reason.  The keyboard macro fails because
> the start of the macro's key sequence doesn't invoke any command.

On the working system, 'M M e' is nothing, but 'M M e e' is:

    ⇧M ⇧M E E runs the command gnus-summary-put-mark-as-expirable, which
   is an interactive Lisp function in `gnus-sum.el'.

    It is bound to ⇧M ⇧M E E.

    (gnus-summary-put-mark-as-expirable N)


    Mark the current article as expirable.
    If N, the prefix, then repeat N times.
    If N is negative, move in reverse order.
    The difference between N and the actual number of articles marked is
    returned.

>
>> The definitions (and the .gnus.el files) are the same on the two systems:
>>
>> (defun pm/alter-summary-map ()
>>   (local-set-key "d" [?M ?M ?e ?e down ?g]))
>>
>> (defun pm/alter-article-map ()
>>   (local-set-key "d" "MMeen"))
>
> Is is possible that you are running two different Gnus versions on the
> two computers, i.e., in one version M M e is bound to something and in
> one it is not?  (I use the latest Gnus version from Git, and there M M
> e is not bound neither in the summary nor in the article buffer.)
>
> Anyway, what does `C-h k M M e' show in a summary/article buffer on the
> computer where your macro still works?

As above, 'M M e e' is (gnus-summary-put-mark-as-expirable N)

So it appears something is causing the failing emacs to think 'M M e' is the whole sequence, and it's undefined. That gets me a
little closer.

Thank you, Tassilo!

-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-17 12:18       ` Peter Davis
@ 2015-08-18  7:46         ` Tassilo Horn
  2015-08-18 12:28           ` Peter Davis
  0 siblings, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-18  7:46 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> writes:

>>>> Not really but what happens when you run the keyboard macro
>>>> manually, i.e., just press the sequence of keys defining it?
>>>>
>>>> The "ringing the bell" means that some error during movement
>>>> occurred, e.g., like pressing <down> when you are already on the last
>>>> line of the buffer.
>>>
>>> Thank you. On the non-working system, I type:
>>>
>>> M M e, but Emacs displays:
>>>
>>> ^M ^M E is undefined
>>
>> Same here: M M e is undefined
>>
>> I guess, that's already the reason.  The keyboard macro fails because
>> the start of the macro's key sequence doesn't invoke any command.
>
> 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?

>     ⇧M ⇧M E E runs the command gnus-summary-put-mark-as-expirable, which
>    is an interactive Lisp function in `gnus-sum.el'.

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?

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...

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-18  7:46         ` Tassilo Horn
@ 2015-08-18 12:28           ` Peter Davis
  2015-08-18 14:10             ` Tassilo Horn
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Davis @ 2015-08-18 12:28 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
>>>>> Not really but what happens when you run the keyboard macro
>>>>> manually, i.e., just press the sequence of keys defining it?
>>>>>
>>>>> The "ringing the bell" means that some error during movement
>>>>> occurred, e.g., like pressing <down> when you are already on the last
>>>>> line of the buffer.
>>>>
>>>> Thank you. On the non-working system, I type:
>>>>
>>>> M M e, but Emacs displays:
>>>>
>>>> ^M ^M E is undefined
>>>
>>> Same here: M M e is undefined
>>>
>>> I guess, that's already the reason.  The keyboard macro fails because
>>> the start of the macro's key sequence doesn't invoke any command.
>>
>> 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.

>
>>     ⇧M ⇧M E E runs the command gnus-summary-put-mark-as-expirable, which
>>    is an interactive Lisp function in `gnus-sum.el'.
>
> 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ünster posted
to this list, so it evidently worked for him.

> 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.

I'm still puzzled about why it suddenly stopped working, after being in use for months.

Thanks,
-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-18 12:28           ` Peter Davis
@ 2015-08-18 14:10             ` Tassilo Horn
  2015-08-19 23:23               ` Peter Davis
  0 siblings, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-18 14:10 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> 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'.

>>>    ⇧M ⇧M 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ünster 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 <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'.

> 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



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-18 14:10             ` Tassilo Horn
@ 2015-08-19 23:23               ` Peter Davis
  2015-08-20  5:01                 ` Tassilo Horn
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Davis @ 2015-08-19 23:23 UTC (permalink / raw)
  To: ding


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



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-19 23:23               ` Peter Davis
@ 2015-08-20  5:01                 ` Tassilo Horn
  2015-08-20 12:11                   ` Peter Davis
  0 siblings, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-20  5:01 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> writes:

Hi Peter,

> 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

Strange.  I can use that here and it works, i.e., it marks the current
article as expirable and then selects the next one if there's any.  No
errors.

Sorry, now I'm running out of ideas...

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-20  5:01                 ` Tassilo Horn
@ 2015-08-20 12:11                   ` Peter Davis
  2015-08-20 12:31                     ` Tassilo Horn
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Davis @ 2015-08-20 12:11 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
> Hi Peter,
>
>> 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
>
> Strange.  I can use that here and it works, i.e., it marks the current
> article as expirable and then selects the next one if there's any.  No
> errors.

So that suggests that the problem is not in the macro definition at all, but in some function that's getting invoked by it. Maybe I
need to completely remove and re-install gnus or Aquamacs or both.

I notice, though, from my limited understanding of lisp, it appears the recorded macro still depends on the definition of the "E"
key, rather than invoking a lisp function directly. I can try re-recording it just using function calls.

> Sorry, now I'm running out of ideas...

I was out of ideas when I started this thread, so thank you for keeping this alive, and for the wealth of information you've provided
along the way.

Cheers,
-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-20 12:11                   ` Peter Davis
@ 2015-08-20 12:31                     ` Tassilo Horn
  2015-08-20 12:57                       ` Peter Davis
  0 siblings, 1 reply; 15+ messages in thread
From: Tassilo Horn @ 2015-08-20 12:31 UTC (permalink / raw)
  To: Peter Davis; +Cc: ding

Peter Davis <pfd@pfdstudio.com> writes:

>> Strange.  I can use that here and it works, i.e., it marks the
>> current article as expirable and then selects the next one if there's
>> any.  No errors.
>
> So that suggests that the problem is not in the macro definition at
> all, but in some function that's getting invoked by it.

It means that `E' is not bound to a command when the macro is executed,
and I have no clue how that can happen because you said that `E' works
when you do it manually, i.e., press just `E' in the summary buffer.

> Maybe I need to completely remove and re-install gnus or Aquamacs or
> both.

I don't think this is or can be caused by a broken Gnus install but of
course try.  And let us know if you could fix the issue.

> I notice, though, from my limited understanding of lisp, it appears
> the recorded macro still depends on the definition of the "E" key,
> rather than invoking a lisp function directly. I can try re-recording
> it just using function calls.

Yes, it does.  A keyboard macro just does exactly what you have been
recording, so when you press `E', it'll record that.  When you do `M-x
gnus-summary-mark-as-expirable RET', it'll record that.  Both macros
have the same effect but the former will break if the binding changes
(unlikely), and the second one will break if the command name changes
(even more unlikely).

>> Sorry, now I'm running out of ideas...
>
> I was out of ideas when I started this thread, so thank you for
> keeping this alive, and for the wealth of information you've provided
> along the way.

You're welcome!

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Macro suddenly broken
  2015-08-20 12:31                     ` Tassilo Horn
@ 2015-08-20 12:57                       ` Peter Davis
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Davis @ 2015-08-20 12:57 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
>>> Strange.  I can use that here and it works, i.e., it marks the
>>> current article as expirable and then selects the next one if there's
>>> any.  No errors.
>>
>> So that suggests that the problem is not in the macro definition at
>> all, but in some function that's getting invoked by it.
>
> It means that `E' is not bound to a command when the macro is executed,
> and I have no clue how that can happen because you said that `E' works
> when you do it manually, i.e., press just `E' in the summary buffer.

I pressed 'E' when I was recording the macro, and it did expire the message.

>> Maybe I need to completely remove and re-install gnus or Aquamacs or
>> both.
>
> I don't think this is or can be caused by a broken Gnus install but of
> course try.  And let us know if you could fix the issue.

I'll try re-recording the macro using the gnus-summary-mark-as-expirable function and see if that helps.

>
> You're welcome!

And thank you again!

-pd



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-08-20 12:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 14:47 Macro suddenly broken 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
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

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).