raju@gwusun.gwu.edu (D. Murali Raju) (04/17/89)
Greetings! Fellow Elmers! I just installed the new Elm 2.2 release. Works real nice so far. Many heartfelt thanks to the Elm development group and the original author for making this great software available. My co-worker John Kelso and I are both GNU emacs users, and had a small patch to add ^P and ^N commands to scroll up and down the messages. These commands work like the J and K (capitals) commands. It is a relatively benign patch (2 extra lines in one file). So, for all those Gnumacs lovers out there, the patch is at the end if this message. I don't know if there is any demand out there for putting it on the wish list for Elm 2.3, but count 2 votes over here. If there is enough demand, I have no idea how this would integrate with the other features. (One way would be translate the environment variable EDITOR used by many other unix programs and provide the same sort of cursor movement, depending on whether it's a vi or emacs like editor. Another way to figure this out would be to look at the "editor" variable in .elm/elmrc) For now, there is no conflict with any other elm commands, and the ^N and ^P keys integrate very simply and nicely. I don't know the official patch policy, so if I made a boo-boo by posting this here, please let me know by mail. In any case, count this as a "convenience" patch, not as anything even remotely "official!" Once again, our thanks to the Elm development group! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D. Murali Raju (raju@gwusun.gwu.edu || ..!uunet!gwusun!raju || 202-994-6853) System Programmer (SEAS-CF), GWU, 725 23rd Street N.W., Washington, DC 20052 #include <usual/stinkin/disclaimer.h> ... keeping my fingers in the pies ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here's the patch: *** src/elm.c.orig Thu Apr 13 08:56:22 1989 --- src/elm.c Mon Apr 17 10:56:02 1989 *************** *** 355,360 **** --- 355,361 ---- } else error("No mail to read!"); break; + case ctrl('N'): case 'J' : if(current > 0) { if((i=next_message(current-1, FALSE)) != -1) { current = i+1; *************** *** 378,383 **** --- 379,385 ---- } else error("No mail in folder!"); break; + case ctrl('P'): case 'K' : if(current > 0) { if((i=prev_message(current-1, FALSE)) != -1) { current = i+1;
rob@PacBell.COM (Rob Bernardo) (04/18/89)
+My co-worker John Kelso and I are both GNU emacs users, and had a +small patch to add ^P and ^N commands to scroll up and down the +messages. These commands work like the J and K (capitals) commands. +It is a relatively benign patch (2 extra lines in one file). So, for +all those Gnumacs lovers out there, the patch is at the end if this +message. A few things to be considered: 1. There is another place where command keystrokes are processed, src/showmsg_c.c, for processing a subset of the "index screen" commands while in "postpager mode". 2. You will need to update your help files to indicate the new command keystrokes, as well as help. c. 3. What are you going to do for emacs-like commands analogous to the existing 'j' and 'k' commands? (These are like the 'J' and 'K' commands but skip over deleted messages.) (And then, of course, is the Users.guide and Ref.guide.) -- Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library Email: ...![backbone]!pacbell!pbhyf!rob OR rob@pbhyf.PacBell.COM Office: (415) 823-2417 Room 4E850O San Ramon Valley Administrative Center Residence: (415) 827-4301 R Bar JB, Concord, California