From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66083 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Quoting the active region when doing `S W' ? Date: Tue, 08 Jan 2008 20:55:46 +0900 Organization: Emacsen advocacy group Message-ID: References: <87hcje31x0.fsf@bzg.ath.cx> <87lk8m80vw.fsf@bzg.ath.cx> <87tzmr8ja4.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1199793401 31509 80.91.229.12 (8 Jan 2008 11:56:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2008 11:56:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14576@lists.math.uh.edu Tue Jan 08 12:57:03 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JCD4j-0001fP-GG for ding-account@gmane.org; Tue, 08 Jan 2008 12:56:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JCD3p-00068q-6l; Tue, 08 Jan 2008 05:56:01 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JCD3n-00068b-Lm for ding@lists.math.uh.edu; Tue, 08 Jan 2008 05:55:59 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JCD3l-0002hQ-Pd for ding@lists.math.uh.edu; Tue, 08 Jan 2008 05:55:59 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JCD3l-0005Vk-00 for ; Tue, 08 Jan 2008 12:55:57 +0100 Original-Received: from [66.225.201.151] (port=33575 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1JCD3k-0004eO-SK for ding@gnus.org; Tue, 08 Jan 2008 05:55:57 -0600 X-Hashcash: 1:20:080108:ding@gnus.org::s3Kcmfss67fRv10E:000020mu X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:C4G6tGDc8OQ7LXnDFvKGau0GsH0= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66083 Archived-At: --=-=-= >>>>> Leo wrote: > On 2007-12-10 00:50 +0000, Bastien wrote: >> Does this have been taken care of? > This feature is very useful; hope someone get around to do it. `C-u R' in the article buffer runs wide reply (you can also use a numeric prefix like `1' instead of `C-u'): (info "(gnus)Article Keymap") ,---- | `R' | Send a reply to the current article and yank the current article | (`gnus-article-reply-with-original'). If given a prefix, make a | wide reply. If the region is active, only yank the text in the | region. `---- However, the prefix argument for the `R' command in the summary buffer has a different meaning. I'd like to suggest adding `SW' (gnus-article-wide-reply-with-original) and removing the prefix argument from `g-a-reply-with-original'. Objections? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Patch for the Gnus trunk --- lisp/gnus-art.el~ 2007-12-19 08:40:24 +0000 +++ lisp/gnus-art.el 2008-01-08 11:51:49 +0000 @@ -4225,6 +4225,13 @@ (substitute-key-definition 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) +(gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map) + "W" gnus-article-wide-reply-with-original) +(if (featurep 'xemacs) + (set-keymap-default-binding gnus-article-send-map + 'gnus-article-read-summary-send-keys) + (define-key gnus-article-send-map [t] 'gnus-article-read-summary-send-keys)) + (defun gnus-article-make-menu-bar () (unless (boundp 'gnus-article-commands-menu) (gnus-summary-make-menu-bar)) @@ -6243,8 +6250,9 @@ (save-excursion (set-buffer gnus-article-current-summary) (let (gnus-pick-mode) - (push (or key last-command-event) unread-command-events) - (setq keys (if (featurep 'xemacs) + (setq unread-command-events (nconc unread-command-events + (list (or key last-command-event))) + keys (if (featurep 'xemacs) (events-to-keys (read-key-sequence nil)) (read-key-sequence nil))))) @@ -6339,24 +6347,30 @@ (signal (car err) (cdr err)) (ding)))))))) +(defun gnus-article-read-summary-send-keys () + (interactive) + (let ((unread-command-events (list (if (featurep 'xemacs) + (character-to-event ?S) + ?S)))) + (gnus-article-read-summary-keys))) + (defun gnus-article-describe-key (key) "Display documentation of the function invoked by KEY. KEY is a string." (interactive "kDescribe key: ") (gnus-article-check-buffer) - (if (eq (key-binding key) 'gnus-article-read-summary-keys) + (if (memq (key-binding key t) '(gnus-article-read-summary-keys + gnus-article-read-summary-send-keys)) (save-excursion (set-buffer gnus-article-current-summary) (let (gnus-pick-mode) (if (featurep 'xemacs) - (progn - (push (elt key 0) unread-command-events) - (setq key (events-to-keys - (read-key-sequence "Describe key: ")))) + (setq unread-command-events (append key nil) + key (events-to-keys (read-key-sequence nil))) (setq unread-command-events (mapcar (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x)) (string-to-list key))) - (setq key (read-key-sequence "Describe key: ")))) + (setq key (read-key-sequence nil)))) (describe-key key)) (describe-key key))) @@ -6364,20 +6378,19 @@ "Display documentation of the function invoked by KEY. KEY is a string." (interactive "kDescribe key: \nP") (gnus-article-check-buffer) - (if (eq (key-binding key) 'gnus-article-read-summary-keys) + (if (memq (key-binding key t) '(gnus-article-read-summary-keys + gnus-article-read-summary-send-keys)) (save-excursion (set-buffer gnus-article-current-summary) (let (gnus-pick-mode) (if (featurep 'xemacs) - (progn - (push (elt key 0) unread-command-events) - (setq key (events-to-keys - (read-key-sequence "Describe key: ")))) + (setq unread-command-events (append key nil) + key (events-to-keys (read-key-sequence nil))) (setq unread-command-events (mapcar (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x)) (string-to-list key))) - (setq key (read-key-sequence "Describe key: ")))) + (setq key (read-key-sequence nil)))) (describe-key-briefly key insert)) (describe-key-briefly key insert))) @@ -6385,7 +6398,7 @@ "Start composing a reply mail to the current message. The text in the region will be yanked. If the region isn't active, the entire article will be yanked." - (interactive "P") + (interactive) (let ((article (cdr gnus-article-current)) contents) (if (not (gnus-region-active-p)) @@ -6400,6 +6413,13 @@ (gnus-summary-reply (list (list article contents)) wide))))) +(defun gnus-article-wide-reply-with-original () + "Start composing a wide reply mail to the current message. +The text in the region will be yanked. If the region isn't active, +the entire article will be yanked." + (interactive) + (gnus-article-reply-with-original t)) + (defun gnus-article-followup-with-original () "Compose a followup to the current article. The text in the region will be yanked. If the region isn't active, --- lisp/lpath.el~ 2007-12-10 01:18:01 +0000 +++ lisp/lpath.el 2008-01-08 11:51:49 +0000 @@ -51,13 +51,15 @@ show-trailing-whitespace temporary-file-directory timer-list tool-bar-mode transient-mark-mode))) (maybe-fbind '(bbdb-complete-name - delete-annotation delete-extent device-connection dfw-device - events-to-keys find-face font-lock-set-defaults frame-device - get-char-table glyph-height glyph-width ldap-search-entries + character-to-event delete-annotation delete-extent + device-connection dfw-device events-to-keys find-face + font-lock-set-defaults frame-device get-char-table + glyph-height glyph-width ldap-search-entries mail-aliases-setup make-annotation make-event make-glyph map-extents message-xmas-redefine put-char-table run-mode-hooks set-extent-property set-itimer-function - temp-directory valid-image-instantiator-format-p + set-keymap-default-binding temp-directory + valid-image-instantiator-format-p w3-coding-system-for-mime-charset w3-do-setup w3-prepare-buffer w3-region window-pixel-height window-pixel-width)) --- texi/gnus.texi~ 2008-01-06 22:51:28 +0000 +++ texi/gnus.texi 2008-01-08 11:51:49 +0000 @@ -11900,17 +11900,22 @@ @kindex R (Article) @findex gnus-article-reply-with-original Send a reply to the current article and yank the current article -(@code{gnus-article-reply-with-original}). If given a prefix, make a -wide reply. If the region is active, only yank the text in the -region. +(@code{gnus-article-reply-with-original}). If the region is active, +only yank the text in the region. + +@item S W +@kindex S W (Article) +@findex gnus-article-wide-reply-with-original +Send a wide reply to the current article and yank the current article +(@code{gnus-article-reply-with-original}). If the region is active, +only yank the text in the region. @item F @kindex F (Article) @findex gnus-article-followup-with-original Send a followup to the current article and yank the current article -(@code{gnus-article-followup-with-original}). If given a prefix, make -a wide reply. If the region is active, only yank the text in the -region. +(@code{gnus-article-followup-with-original}). If the region is active, +only yank the text in the region. @end table --=-=-=--