Thread View: news.software.nn
4 messages
4 total messages
Started by Chet Murthy
Thu, 10 May 1990 22:24
Trying to write a macro
Author: Chet Murthy
Date: Thu, 10 May 1990 22:24
Date: Thu, 10 May 1990 22:24
38 lines
1735 bytes
1735 bytes
I'm trying to write a macro that will do what the command sequence
'A' 'N' ' ' 'j'
will do.
To quote the manual,
N {next-group}
When used within an A or B command, it skips forward to the next group in
the sequence with unread articles or which has previously been visited.
So the command 'A' 'N' will skip forward to the next group in the
sequence with unread articles. Then, by hitting ' ', I select the
group proffered, and by hitting 'j' I "jump" to that group, which
means that when I'm finished with that group, I don't return to where
I'm at currently, but just go on to the next group in the presentation
sequence.
Now, my problem is that I can't define a macro to do all this.
I've tried lots of combinations, and the one that comes closest is:
define 1
advance-group 'N' ' ' 'j'
end
map menu I macro 1
with macro-debug set to true, this macro gets all the way thru what
it's supposed to, but at then end, it just dies.
Anybody got any ideas?
--chet--
--chet--
murthy@cs.cornell.edu
Re: Trying to write a macro
Author: Kim F. Storm
Date: Tue, 15 May 1990 13:26
Date: Tue, 15 May 1990 13:26
36 lines
1571 bytes
1571 bytes
murthy@algron.cs.cornell.edu (Chet Murthy) writes: >I'm trying to write a macro that will do what the command sequence >'A' 'N' ' ' 'j' >Now, my problem is that I can't define a macro to do all this. >I've tried lots of combinations, and the one that comes closest is: >define 1 >advance-group 'N' ' ' 'j' >end >map menu I macro 1 A "classic" problem with nn's macro language. What you enter from the keyboard is A N space j, but what nn is reading is: A command key: A A command key: N A command key: space A *string*: j So the proper definition of the macro is: map menu I ( advance-group 'N' ' ' "j" ) I general, even when a single keystroke *can* be used as the answer to a prompt, you must specify it as a string in a macro if the answer to the prompt is a string. -- Kim F. Storm storm@texas.dk Tel +45 429 174 00 Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark No news is good news, but nn is better!
Re: Trying to write a macro
Author: Chet Murthy
Date: Tue, 15 May 1990 17:02
Date: Tue, 15 May 1990 17:02
28 lines
1445 bytes
1445 bytes
storm@texas.dk (Kim F. Storm) writes: >murthy@algron.cs.cornell.edu (Chet Murthy) writes: >A "classic" problem with nn's macro language. What you enter from >the keyboard is A N space j, but what nn is reading is: > A command key: A > A command key: N > A command key: space > A *string*: j >So the proper definition of the macro is: > map menu I ( > advance-group 'N' ' ' "j" > ) >I general, even when a single keystroke *can* be used as the answer to a >prompt, you must specify it as a string in a macro if the answer to the >prompt is a string. Ah. I see. It worked as I needed it to work. One problem, though. I cannot rebind the "N" key to this function. Is there a way around this? --chet-- --chet-- murthy@cs.cornell.edu
Re: Trying to write a macro
Author: Kim F. Storm
Date: Fri, 18 May 1990 14:26
Date: Fri, 18 May 1990 14:26
18 lines
1265 bytes
1265 bytes
murthy@algron.cs.cornell.edu (Chet Murthy) writes:
>Ah. I see. It worked as I needed it to work. One problem, though.
>I cannot rebind the "N" key to this function. Is there a way around
>this?
There is a problem with some commands in 6.4.2 relying on the initial
binding of certain keys which are broken if the key is bound to a macro.
This is fixed by patch #3. It will also allow you to write the macro
without refering to any specific key bindings as:
map menu N (
advance-group next-group continue "j"
)
--
No news is good news, Kim F. Storm <storm@texas.dk>
but nn is better! Texas Instruments A/S, Denmark
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads