From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15489 Path: main.gmane.org!not-for-mail From: Rajappa Iyer Newsgroups: gmane.emacs.gnus.general Subject: patch for pick-mode keymap to avoid shadowing. Date: 30 Jun 1998 16:27:08 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: <199806302027.QAA10563@placebo.ho.lucent.com> Reply-To: rsi@lucent.com NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035154511 22343 80.91.224.250 (20 Oct 2002 22:55:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:55:11 +0000 (UTC) Cc: bugs@gnus.org Return-Path: Original-Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by altair.xemacs.org (8.9.0/8.9.0) with ESMTP id OAA23606 for ; Tue, 30 Jun 1998 14:16:03 -0700 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id RAA26988 for ; Tue, 30 Jun 1998 17:13:46 -0400 Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id PAT02830; Tue, 30 Jun 1998 15:47:16 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 Jun 1998 16:05:55 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id QAA10142 for ; Tue, 30 Jun 1998 16:05:46 -0500 (CDT) Original-Received: (qmail 28789 invoked by uid 504); 30 Jun 1998 21:05:25 -0000 Original-Received: (qmail 28783 invoked from network); 30 Jun 1998 21:05:24 -0000 Original-Received: from ihgw2.lucent.com (207.19.48.2) by claymore.vcinet.com with SMTP; 30 Jun 1998 21:05:24 -0000 Original-Received: from placebo.ho.lucent.com by ihig2.firewall.lucent.com (SMI-8.6/EMS-L sol2) id PAA19165; Tue, 30 Jun 1998 15:14:17 -0500 Original-Received: (from rsi@localhost) by placebo.ho.lucent.com (8.8.8/8.8.8) id QAA10563; Tue, 30 Jun 1998 16:27:09 -0400 (EDT) Original-To: ding@gnus.org X-Mailer: Gnus v5.6.22/XEmacs 20.4 - "Emerald" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:15489 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15489 OK, Here's the cleaned up patch for the pick-mode keymap. I've added gnus-uu-unmark-thread to the autoload defs for gnus-uu and updated gnus.texi as well. Thanks, Rajappa == snip, snip == diff -ur gnus-5.6.22/lisp/gnus-salt.el gnus/lisp/gnus-salt.el --- gnus-5.6.22/lisp/gnus-salt.el Mon Jun 29 16:51:20 1998 +++ gnus/lisp/gnus-salt.el Tue Jun 30 14:14:55 1998 @@ -73,21 +73,10 @@ (gnus-define-keys gnus-pick-mode-map " " gnus-pick-next-page - "u" gnus-summary-unmark-as-processable - "." gnus-pick-article + "u" gnus-pick-unmark-article-or-thread + "." gnus-pick-article-or-thread gnus-down-mouse-2 gnus-pick-mouse-pick-region "\r" gnus-pick-start-reading - "t" gnus-uu-mark-thread - "T" gnus-uu-unmark-thread - "U" gnus-summary-unmark-all-processable - "v" gnus-uu-mark-over - "r" gnus-uu-mark-region - "R" gnus-uu-unmark-region - "e" gnus-uu-mark-by-regexp - "E" gnus-uu-mark-by-regexp - "b" gnus-uu-mark-buffer - "B" gnus-uu-unmark-buffer - "X" gnus-pick-start-reading )) (defun gnus-pick-make-menu-bar () @@ -172,21 +161,48 @@ (gnus-summary-next-group))) (error "No articles have been picked")))) +(defun gnus-pick-goto-article (arg) + "Go to the article number indicated by ARG. If ARG is an invalid +article number, then stay on current line." + (let (pos) + (save-excursion + (goto-char (point-min)) + (when (zerop (forward-line (1- (prefix-numeric-value arg)))) + (setq pos (point)))) + (if (not pos) + (gnus-error 2 "No such line: %s" arg) + (goto-char pos)))) + (defun gnus-pick-article (&optional arg) - "Pick the article on the current line. + "Pick the article on the current line. If ARG, pick the article on that line instead." (interactive "P") (when arg - (let (pos) - (save-excursion - (goto-char (point-min)) - (when (zerop (forward-line (1- (prefix-numeric-value arg)))) - (setq pos (point)))) - (if (not pos) - (gnus-error 2 "No such line: %s" arg) - (goto-char pos)))) + (gnus-pick-goto-article arg)) (gnus-summary-mark-as-processable 1)) +(defun gnus-pick-article-or-thread (&optional arg) + "If gnus-thread-hide-subtree is t, then pick the thread on the current line. +Otherwise pick the article on the current line. +If ARG, pick the article/thread on that line instead." + (interactive "P") + (when arg + (gnus-pick-goto-article arg)) + (if gnus-thread-hide-subtree + (gnus-uu-mark-thread) + (gnus-summary-mark-as-processable 1))) + +(defun gnus-pick-unmark-article-or-thread (&optional arg) + "If gnus-thread-hide-subtree is t, then unmark the thread on current line. +Otherwise unmark the article on current line. +If ARG, unmark thread/article on that line instead." + (interactive "P") + (when arg + (gnus-pick-goto-article arg)) + (if gnus-thread-hide-subtree + (gnus-uu-unmark-thread) + (gnus-summary-unmark-as-processable 1))) + (defun gnus-pick-mouse-pick (e) (interactive "e") (mouse-set-point e) diff -ur gnus-5.6.22/lisp/gnus.el gnus/lisp/gnus.el --- gnus-5.6.22/lisp/gnus.el Mon Jun 29 16:51:21 1998 +++ gnus/lisp/gnus.el Tue Jun 30 14:01:38 1998 @@ -1624,7 +1624,8 @@ gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view gnus-uu-decode-binhex-view) - ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh) + ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh + gnus-uu-unmark-thread) ("gnus-msg" (gnus-summary-send-map keymap) gnus-article-mail gnus-copy-article-buffer gnus-extended-version) ("gnus-msg" :interactive t diff -ur gnus-5.6.22/texi/gnus.texi gnus/texi/gnus.texi --- gnus-5.6.22/texi/gnus.texi Mon Jun 29 16:51:23 1998 +++ gnus/texi/gnus.texi Tue Jun 30 16:02:17 1998 @@ -6862,10 +6862,13 @@ @table @kbd @item . @kindex . (Pick) -@findex gnus-summary-mark-as-processable -Pick the article on the current line -(@code{gnus-summary-mark-as-processable}). If given a numerical prefix, -go to that article and pick it. (The line number is normally displayed +@findex gnus-pick-article-or-thread +Pick the article or thread on the current line +(@code{gnus-pick-article-or-thread}). If the variable +@code{gnus-thread-hide-subtree} is true, then this key selects the +entire thread when used at the first article of the thread. Otherwise, +it selects just the article. If given a numerical prefix, go to that +thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) @item SPACE @@ -6876,53 +6879,13 @@ @item u @kindex u (Pick) -@findex gnus-summary-unmark-as-processable -Unpick the article (@code{gnus-summary-unmark-as-processable}). - -@item U -@kindex U (Pick) -@findex gnus-summary-unmark-all-processable -Unpick all articles (@code{gnus-summary-unmark-all-processable}). - -@item t -@kindex t (Pick) -@findex gnus-uu-mark-thread -Pick the thread (@code{gnus-uu-mark-thread}). - -@item T -@kindex T (Pick) -@findex gnus-uu-unmark-thread -Unpick the thread (@code{gnus-uu-unmark-thread}). - -@item r -@kindex r (Pick) -@findex gnus-uu-mark-region -Pick the region (@code{gnus-uu-mark-region}). - -@item R -@kindex R (Pick) -@findex gnus-uu-unmark-region -Unpick the region (@code{gnus-uu-unmark-region}). - -@item e -@kindex e (Pick) -@findex gnus-uu-mark-by-regexp -Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). - -@item E -@kindex E (Pick) -@findex gnus-uu-unmark-by-regexp -Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). - -@item b -@kindex b (Pick) -@findex gnus-uu-mark-buffer -Pick the buffer (@code{gnus-uu-mark-buffer}). - -@item B -@kindex B (Pick) -@findex gnus-uu-unmark-buffer -Unpick the buffer (@code{gnus-uu-unmark-buffer}). +@findex gnus-pick-unmark-article-or-thread. +Unpick the thread or article +(@code{gnus-pick-unmark-article-or-thread}). If the variable +@code{gnus-thread-hide-subtree} is true, then this key unpicks the +thread if used at the first article of the thread. Otherwise it unpicks +just the article. You can give this key a numerical prefix to unpick +the thread or article at that line. @item RET @kindex RET (Pick) @@ -6934,6 +6897,11 @@ will still be visible when you are reading. @end table + +All the normal summary mode commands are still available in the +pick-mode, with the exception of @kbd{u}. However @kbd{!} is available +which is mapped to the same function +@code{gnus-summary-tick-article-forward}. If this sounds like a good idea to you, you could say: -- Rajappa Iyer #include We're too busy mopping the floor to turn off the faucet.