From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15474 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 10:50:05 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: <199806301450.KAA10288@placebo.ho.lucent.com> Reply-To: rsi@lucent.com NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035154498 22255 80.91.224.250 (20 Oct 2002 22:54:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:54:58 +0000 (UTC) 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 HAA17052 for ; Tue, 30 Jun 1998 07:52:48 -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 KAA16824 for ; Tue, 30 Jun 1998 10:50:31 -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 JAT01299; Tue, 30 Jun 1998 09:24:02 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 Jun 1998 09:48:36 -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 JAA29696 for ; Tue, 30 Jun 1998 09:48:28 -0500 (CDT) Original-Received: (qmail 27263 invoked by uid 504); 30 Jun 1998 14:48:04 -0000 Original-Received: (qmail 27260 invoked from network); 30 Jun 1998 14:48:03 -0000 Original-Received: from cbgw2.lucent.com (207.24.196.52) by claymore.vcinet.com with SMTP; 30 Jun 1998 14:48:03 -0000 Original-Received: from placebo.ho.lucent.com by cbig2.firewall.lucent.com (SMI-8.6/EMS-L sol2) id KAA12602; Tue, 30 Jun 1998 10:47:58 -0400 Original-Received: (from rsi@localhost) by placebo.ho.lucent.com (8.8.8/8.8.8) id KAA10288; Tue, 30 Jun 1998 10:50:05 -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:15474 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15474 Hello, I've made some changes to the pick-mode keymap so that it avoids shadowing the normal summary mode keymaps while still retaining some useful thread selection functions as single keystrokes. With these changes, the pick-mode behavior is as follows: 1. "." now marks a thread if gnus-thread-hide-subtree is t and it is hit at the first article of the thread. Otherwise it marks the individual article. 2. "u" now unmarks a thread if gnus-thread-hide-subtree is t and it is hit at the first article of the marked thread. Otherwise it unmarks the individual article. The following functions which were previously available as a single keystroke are now no-longer available as single keystroke. "t" gnus-uu-mark-thread (partially collapsed into ".", also available as T #) "T" gnus-uu-unmark-thread (partially collapsed into "u", also available as T M-# or M P T) "U" gnus-summary-unmark-all-processable "v" gnus-uu-mark-over (use M P v) "r" gnus-uu-mark-region (use M P r) "R" gnus-uu-unmark-region (use M P g) "e" gnus-uu-mark-by-regexp (use M P R) "E" gnus-uu-mark-by-regexp (use M P G) "b" gnus-uu-mark-buffer (use M P b) "B" gnus-uu-unmark-buffer "X" gnus-pick-start-reading (use "\r") The patch for the same is enclosed. Please test and send me comments. If no one has any problems with it, I'll clean up the patch (currently, there is some unnecessary code duplication) and send it to Lars for inclusion. 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 10:12:17 1998 @@ -73,21 +73,23 @@ (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 +; "u" gnus-summary-unmark-as-processable + "." gnus-pick-article-or-thread +; "." gnus-pick-article 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 +; "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,6 +174,24 @@ (gnus-summary-next-group))) (error "No articles have been picked")))) +(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 + (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)))) + (if gnus-thread-hide-subtree + (gnus-uu-mark-thread) + (gnus-summary-mark-as-processable 1))) + (defun gnus-pick-article (&optional arg) "Pick the article on the current line. If ARG, pick the article on that line instead." @@ -187,6 +207,24 @@ (goto-char pos)))) (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 + (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)))) + (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) -- Rajappa Iyer #include We're too busy mopping the floor to turn off the faucet.