Nicolas FRANCOIS <[EMAIL PROTECTED]> posted [EMAIL PROTECTED], excerpted below, on Tue, 01 Apr 2008 03:15:52 +0200:
> I saw this message about someone pressing the delete button while > thinking he was editing a message, and finding that he had deleted a > precious message. > > Well, I sympathize, because I do this about once a week. > > Pan is great, but it definitly lacks a trash convenience, or at least > some way to confirm the delete action to prevent it from being > definitive. Well, note that it should already be possible to remap something else, say shift-delete, to the "article delete" action, by editing the accels.txt file. It may or may not be possible to do it from the GUI, due to the special function of the delete key (which would normally delete any hotkey assigned to that menu action), but it should certainly be possible to edit accels.txt directly (with pan closed, of course). In the accels.txt file (found in pan's data dir, ~/.pan2 for pan > 0.90, by default, ~/.pan for old-pan, 0.14.x and previous) you'll find an unsorted list of all the menu items along with their assigned hotkeys, if any. Don't bother sorting it, or if you do, save the file to something else and copy it back every time you make a change, as pan just does an unsorted dump to the file every time it shuts down and that'll overwrite your sorting. An initial semicolon (;) on a line indicates a comment line. If you've never changed any of the accels from the defaults, the entire file will consist of comment lines, pans default menu accel scheme. To change any accel, simply remove the semicolon at the beginning to activate the line, and delete or change the accel to what you want. If two actions map to the same accel, pan will see one but not both. I don't know if it uses the first or the last one it sees, but since they are in no particular order anyway, it'll be essentially random which one is activated. Thus, before adding or changing an accel, you should search to see if the new one is already active for something else, deleting it or changing it first. Of course, that could lead to a whole chain of changes if the accel you want for the second one is also used for something else. If you are making just a single edit, it's simplest to use your text editor's search function and make the edit directly. If you're like me, however, and have a whole different accel scheme in mind, one which you may make further changes to from time to time, it's likely worthwhile to actually do the sort and save the file to something else (say accels.txt.bak or accels.txt.2008.0401 using the date as appropriate), then as I said copy it over pan's dump file any time you make a change. I also found it useful to keep a table of just which accels were used and which were free. Thus, changing something here means two changes, one to the accels used/free table and one to the actual accel mapping used by pan. Since an initial semicolon indicates a comment, I just included the table as a bunch of semicolon-ed comment lines. I posted my file here before, for anyone that wanted to try it, but it has been awhile, so I might as well post it again. I haven't changed the delete accel, so you'll need to do so if you choose to use this. In the below, the entries are sorted into menu order, just as they appear in pan (or did at the time, I /think/ it's still up to date). The accel table I mentioned above is at the end. My scheme is basically as follows. <modifiers> <letter>, where <letter> is associated with the action type. A=articles, T=threads, G=groups, H=headers. In most cases similar modifiers do similar things. Thus, G (by itself) is next group, T is next thread, and A is next article. H is slightly different as next header makes little sense as A is already next article. In this case, it's show headers, I believe maintaining the default mapping. As is common, Shift means reverse or previous, so Shift-T means previous thread, Shift-A means previous article, and Shift-G would be previous group only there's no such function. I used Alt for alternate, in this case "unread". (This is sort of the reverse of pan's default, since it works better for me that way. You may therefore wish to reverse my reverse. =8^) So Alt-A means next-unread article, Alt-T next-unread thread, and Alt-G next-unread group. I reserved the triple-modifier, Shift-Ctrl-Alt, for invoking various dialogs, with the various letters invoking the logically related dialog. L=log (event), T=task (manager), G=Group (prefs), N=Newsservers, P=Posting (profiles), etc. One exception is deselect all articles, Shift-Ctrl-Alt-A. Many other accels (F=followup, P=(new)post, C=char-monospace toggle, etc) remain at their defaults where possible. Others I deleted, watch and ignore, for instance, since the general scoring accels (S/ctrl-S) work. For reply to author, I found followup just as easy, deleting the newsgroups entry and adding the mail addresses I wanted. Notably, since I work from (an expanded, entry in preferences.xml) cache for binaries, D=download to cache (cache article), and since I normally view unread- only, R toggles that, with M mark-read (the default) and Shift-M mark unread (didn't used to be the default, don't know if it is now) to take another look at later. With that, I'm attacking the file below my sig (as identity/text, that is, just copied into the message), using the pan-attach-kd script I created to allow attaching files using pan's external editor functionality. (Ask if you'd like details. It's a script, nothing fancy and requiring kdialog from the kdebase package for the GUI, but it does make attacking files to pan's posts actually possible.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ; pan GtkAccelMap rc-file -*- scheme -*- ; this file is an automated accelerator map dump ;############################################################################### ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/file-menu" "") ; (gtk_accel_path "<Actions>/Actions/import-tasks" "<Control>o") ; (gtk_accel_path "<Actions>/Actions/cancel-last-task" "<Control>Delete") ; (gtk_accel_path "<Actions>/Actions/work-online" "l") (gtk_accel_path "<Actions>/Actions/show-task-window" "<Control><Alt><Shift>t") (gtk_accel_path "<Actions>/Actions/show-log-dialog" "<Control><Alt><Shift>l") ; (gtk_accel_path "<Actions>/Actions/quit" "<Control>q") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/edit-menu" "") (gtk_accel_path "<Actions>/Actions/select-all-articles" "<Control><Alt>a") (gtk_accel_path "<Actions>/Actions/add-subthreads-to-selection" "<Control><Shift>t") (gtk_accel_path "<Actions>/Actions/add-threads-to-selection" "<Control>t") (gtk_accel_path "<Actions>/Actions/add-similar-articles-to-selection" "") (gtk_accel_path "<Actions>/Actions/unselect-all-articles" "<Shift><Alt><Control>a") (gtk_accel_path "<Actions>/Actions/select-article-body" "<Control>a") (gtk_accel_path "<Actions>/Actions/show-servers-dialog" "<Control><Alt><Shift>n") (gtk_accel_path "<Actions>/Actions/show-profiles-dialog" "<Control><Alt><Shift>p") (gtk_accel_path "<Actions>/Actions/show-preferences-dialog" "<Control>p") (gtk_accel_path "<Actions>/Actions/show-group-preferences-dialog" "<Control><Alt><Shift>g") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/view-menu" "") ; (gtk_accel_path "<Actions>/Actions/show-toolbar" "") ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/view-layout-menu" "") ; (gtk_accel_path "<Actions>/Actions/tabbed-layout" "z") ; (gtk_accel_path "<Actions>/Actions/jump-to-group-tab" "1") ; (gtk_accel_path "<Actions>/Actions/jump-to-header-tab" "2") ; (gtk_accel_path "<Actions>/Actions/jump-to-body-tab" "3") ; (gtk_accel_path "<Actions>/Actions/show-group-pane" "<Control>1") ; (gtk_accel_path "<Actions>/Actions/show-header-pane" "<Control>2") ; (gtk_accel_path "<Actions>/Actions/show-body-pane" "<Control>3") ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/view-group-pane-menu" "") ; (gtk_accel_path "<Actions>/Actions/shorten-group-names" "b") ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/view-header-pane-menu" "") (gtk_accel_path "<Actions>/Actions/thread-headers" "<Control><Alt>t") ; (gtk_accel_path "<Actions>/Actions/show-matching-articles" "") ; (gtk_accel_path "<Actions>/Actions/show-matching-threads" "") ; (gtk_accel_path "<Actions>/Actions/show-matching-subthreads" "") (gtk_accel_path "<Actions>/Actions/match-only-unread-articles" "r") ; (gtk_accel_path "<Actions>/Actions/match-only-cached-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-only-binary-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-only-my-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-watched-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-high-scoring-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-medium-scoring-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-normal-scoring-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-low-scoring-articles" "") ; (gtk_accel_path "<Actions>/Actions/match-ignored-articles" "") ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/view-body-pane-menu" "") ; (gtk_accel_path "<Actions>/Actions/wrap-article-body" "w") ; (gtk_accel_path "<Actions>/Actions/mute-quoted-text" "q") ; (gtk_accel_path "<Actions>/Actions/show-all-headers" "h") (gtk_accel_path "<Actions>/Actions/rot13-selected-text" "") ; (gtk_accel_path "<Actions>/Actions/monospace-font-enabled" "c") ; (gtk_accel_path "<Actions>/Actions/show-smilies-as-graphics" "") ; (gtk_accel_path "<Actions>/Actions/show-text-markup" "") ; (gtk_accel_path "<Actions>/Actions/size-pictures-to-fit" "") ; (gtk_accel_path "<Actions>/Actions/smooth-scrolling" "") ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/character-encoding-menu" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-4" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-13" "") ; (gtk_accel_path "<Actions>/Actions/charset-windows-1257" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-2" "") ; (gtk_accel_path "<Actions>/Actions/charset-windows-1250" "") ; (gtk_accel_path "<Actions>/Actions/charset-gb2312" "") ; (gtk_accel_path "<Actions>/Actions/charset-big5" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-5" "") ; (gtk_accel_path "<Actions>/Actions/charset-windows-1251" "") ; (gtk_accel_path "<Actions>/Actions/charset-KOI8-R" "") ; (gtk_accel_path "<Actions>/Actions/charset-KOI8-U" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-7" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-2022-jp" "") ; (gtk_accel_path "<Actions>/Actions/charset-euc-kr" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-9" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-1" "") ; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-15" "") ; (gtk_accel_path "<Actions>/Actions/charset-windows-1252" "") ; (gtk_accel_path "<Actions>/Actions/charset-UTF-8" "") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/go-menu" "") ; (gtk_accel_path "<Actions>/Actions/read-more" "space") ; (gtk_accel_path "<Actions>/Actions/read-less" "BackSpace") (gtk_accel_path "<Actions>/Actions/read-next-unread-group" "<Alt>g") (gtk_accel_path "<Actions>/Actions/read-next-group" "g") (gtk_accel_path "<Actions>/Actions/read-next-unread-article" "<Alt>a") (gtk_accel_path "<Actions>/Actions/read-next-article" "a") (gtk_accel_path "<Actions>/Actions/read-next-watched-article" "") (gtk_accel_path "<Actions>/Actions/read-previous-article" "<Shift>a") (gtk_accel_path "<Actions>/Actions/read-parent-article" "<Alt><Shift>a") (gtk_accel_path "<Actions>/Actions/read-next-unread-thread" "<Alt>t") (gtk_accel_path "<Actions>/Actions/read-next-thread" "t") (gtk_accel_path "<Actions>/Actions/read-previous-thread" "<Shift>t") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/group-actions-menu" "") ; (gtk_accel_path "<Actions>/Actions/read-selected-group" "") (gtk_accel_path "<Actions>/Actions/mark-groups-read" "") ; (gtk_accel_path "<Actions>/Actions/download-headers" "") (gtk_accel_path "<Actions>/Actions/get-new-headers-in-selected-groups" "<Alt><Control>h") (gtk_accel_path "<Actions>/Actions/get-new-headers-in-subscribed-groups" "<Control>h") ; (gtk_accel_path "<Actions>/Actions/subscribe" "") ; (gtk_accel_path "<Actions>/Actions/unsubscribe" "") ; (gtk_accel_path "<Actions>/Actions/refresh-group-list" "") (gtk_accel_path "<Actions>/Actions/delete-groups-articles" "") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/article-actions-menu" "") ; (gtk_accel_path "<Actions>/Actions/save-articles" "<Shift>s") ; (gtk_accel_path "<Actions>/Actions/read-selected-article" "") (gtk_accel_path "<Actions>/Actions/download-selected-article" "d") ; (gtk_accel_path "<Actions>/Actions/mark-article-read" "m") (gtk_accel_path "<Actions>/Actions/mark-article-unread" "<Shift>m") (gtk_accel_path "<Actions>/Actions/view-article-score" "s") (gtk_accel_path "<Actions>/Actions/add-article-score" "<Control>s") ; (gtk_accel_path "<Actions>/Actions/watch-thread" "") ; (gtk_accel_path "<Actions>/Actions/ignore-thread" "") ; (gtk_accel_path "<Actions>/Actions/plonk" "") (gtk_accel_path "<Actions>/Actions/print" "") ; (gtk_accel_path "<Actions>/Actions/delete-article" "Delete") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/posting-actions-menu" "") ; (gtk_accel_path "<Actions>/Actions/post" "p") ; (gtk_accel_path "<Actions>/Actions/followup" "f") (gtk_accel_path "<Actions>/Actions/reply-to" "") ; (gtk_accel_path "<Actions>/Actions/supersede-article" "") ; (gtk_accel_path "<Actions>/Actions/cancel-article" "") ;############################################################################### ;############################################################################### ; (gtk_accel_path "<Actions>/Actions/help-menu" "") ; (gtk_accel_path "<Actions>/Actions/pan-web-page" "") ; (gtk_accel_path "<Actions>/Actions/tip-jar" "") ; (gtk_accel_path "<Actions>/Actions/bug-report" "") ; (gtk_accel_path "<Actions>/Actions/about-pan" "") ;############################################################################### ;############################################################################### ;############################################################################### ; ********* Used Accel table ********* ; Char Pln Ctl Shf CtlShf Alt CtlAlt AltShf CtlAltSh ; a a c-a s-a a-a ca-a as-a cas-a ; b b ; c c ; d d ; e ; f f ; g g a-g cas-g ; h h c-h ca-h ; i ; j ; k ; l l cas-l ; m m s-m ; n cas-n ; o c-o ; p p c-p cas-p ; q q c-q ; r r ; s s c-s s-s ; t t c-t s-t cs-t a-t ca-t cas-t ; u u ; v v ; w w ; x ; y ; z z ; backtick doesn't work ; 1 1 c-1 ; 2 2 c-2 ; 3 3 c-3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 0 ; - ; = ; home home ; end end ; pgup pgup ; pgdn pgdn ; ins ; del del c-del ; spc spc ; bs bs ; tab tab ; cr cr ; esc esc ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; [ ; ] ; \ ; ; ; ' ; , ; . ; / _______________________________________________ Pan-users mailing list Pan-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/pan-users