From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: go to bottom of mail message Date: Wed, 19 Nov 2003 18:10:07 +0200 Organization: Mivtach-Simon Insurance agencies Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200311191610.hAJGA7TM004244@beta.mvs.co.il> References: <200311191126.hAJBQY6C008722@beta.mvs.co.il> <200311191155.UAA15601@etlken.m17n.org> <200311191526.hAJFQlMx014626@beta.mvs.co.il> Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8-i Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1069258529 31834 80.91.224.253 (19 Nov 2003 16:15:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2003 16:15:29 +0000 (UTC) Cc: emacs-devel@gnu.org, storm@cua.dk, handa@m17n.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Nov 19 17:15:24 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMUzE-0007Cv-00 for ; Wed, 19 Nov 2003 17:15:24 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMUzD-0007AB-00 for ; Wed, 19 Nov 2003 17:15:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMVwK-0006Wq-6w for emacs-devel@quimby.gnus.org; Wed, 19 Nov 2003 12:16:28 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AMVug-0006W3-LA for emacs-devel@gnu.org; Wed, 19 Nov 2003 12:14:46 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AMVsa-0005ey-F5 for emacs-devel@gnu.org; Wed, 19 Nov 2003 12:13:08 -0500 Original-Received: from [192.114.178.12] (helo=unix.mvs.co.il) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMVsZ-0005e2-CP for emacs-devel@gnu.org; Wed, 19 Nov 2003 12:12:35 -0500 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.12.10/8.12.10) with ESMTP id hAJGA8qL007612 for ; Wed, 19 Nov 2003 18:10:09 +0200 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.10/8.12.10) with ESMTP id hAJGA8Qs004248 for ; Wed, 19 Nov 2003 18:10:08 +0200 Original-Received: (from root@localhost) by beta.mvs.co.il (8.12.10/8.12.10/Submit) id hAJGA7TM004244; Wed, 19 Nov 2003 18:10:07 +0200 Original-To: ehud@unix.mvs.co.il In-reply-to: <200311191526.hAJFQlMx014626@beta.mvs.co.il> (message from Ehud Karni on Wed, 19 Nov 2003 17:26:47 +0200) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17924 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17924 My last post had a possible bug. Here is the fixed patch. I also turned off the GPG signing because it distorts the patches. Ehud. 2003-11-19 Ehud Karni * mail/rmailsum.el (rmail-summary-end-of-message): New command to go to the bottom of the mail message. Added to `rmail-summary-mode-map' with key "/". (rmail-summary-show-message) New (internal) function for use by both `rmail-summary-beginning/end-of-message'. (rmail-summary-beginning-of-message) Changed to use the new function and put the point at the beginning of the message BODY. * mail/rmail.el (rmail-end-of-message): New command to go to the end of the current message. Added to `rmail-mode-map' with key "/". (rmail-beginning-of-message): Changed to position point to the beginning of the BODY. (rmail-mode): change documentation. diff -c /lnx1/gnu/src/emacs/lisp/mail/rmailsum.el /lnx1/gnu/src/emacs/lisp/mail/rmailsum.el.\~1.131.\~ *** /lnx1/gnu/src/emacs/lisp/mail/rmailsum.el Wed Nov 19 15:03:15 2003 --- /lnx1/gnu/src/emacs/lisp/mail/rmailsum.el.~1.131.~ Wed Nov 19 12:48:01 2003 *************** *** 890,896 **** (define-key rmail-summary-mode-map "x" 'rmail-summary-expunge) (define-key rmail-summary-mode-map "w" 'rmail-summary-output-body) (define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message) - (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message) (define-key rmail-summary-mode-map "<" 'rmail-summary-first-message) (define-key rmail-summary-mode-map ">" 'rmail-summary-last-message) (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) --- 890,895 ---- *************** *** 1181,1196 **** (defun rmail-summary-beginning-of-message () "Show current message from the beginning." (interactive) - (rmail-summary-show-message 'BEG)) - - (defun rmail-summary-end-of-message () - "Show bottom of current message." - (interactive) - (rmail-summary-show-message 'END)) - - (defun rmail-summary-show-message (where) - "Show current mail message. - Position it according to WHERE which can be BEG or END" (if (and (one-window-p) (not pop-up-frames)) ;; If there is just one window, put the summary on the top. (let ((buffer rmail-view-buffer)) --- 1180,1185 ---- *************** *** 1202,1215 **** (or (eq buffer (window-buffer (next-window (frame-first-window)))) (delete-other-windows))) (pop-to-buffer rmail-view-buffer)) ! (cond ! ((eq where 'BEG) ! (goto-char (point-min)) ! (search-forward "\n\n")) ! ((eq where 'END) ! (goto-char (point-max)) ! (recenter (1- (window-height)))) ! ) (pop-to-buffer rmail-summary-buffer)) (defun rmail-summary-bury () --- 1191,1197 ---- (or (eq buffer (window-buffer (next-window (frame-first-window)))) (delete-other-windows))) (pop-to-buffer rmail-view-buffer)) ! (beginning-of-buffer) (pop-to-buffer rmail-summary-buffer)) (defun rmail-summary-bury () Diff finished at Wed Nov 19 18:07:29 diff -c /lnx1/gnu/src/emacs/lisp/mail/rmail.el /lnx1/gnu/src/emacs/lisp/mail/rmail.el.\~1.376.\~ *** /lnx1/gnu/src/emacs/lisp/mail/rmail.el Wed Nov 19 18:01:13 2003 --- /lnx1/gnu/src/emacs/lisp/mail/rmail.el.~1.376.~ Wed Nov 19 12:48:00 2003 *************** *** 848,854 **** (define-key rmail-mode-map "w" 'rmail-output-body-to-file) (define-key rmail-mode-map "x" 'rmail-expunge) (define-key rmail-mode-map "." 'rmail-beginning-of-message) - (define-key rmail-mode-map "/" 'rmail-end-of-message) (define-key rmail-mode-map "<" 'rmail-first-message) (define-key rmail-mode-map ">" 'rmail-last-message) (define-key rmail-mode-map " " 'scroll-up) --- 848,853 ---- *************** *** 993,1000 **** All normal editing commands are turned off. Instead, these commands are available: ! \\[rmail-beginning-of-message] Move point to front of this message body. ! \\[rmail-end-of-message] Move point to bottom of this message. \\[scroll-up] Scroll to next screen of this message. \\[scroll-down] Scroll to previous screen of this message. \\[rmail-next-undeleted-message] Move to Next non-deleted message. --- 992,998 ---- All normal editing commands are turned off. Instead, these commands are available: ! \\[rmail-beginning-of-message] Move point to front of this message (same as \\[beginning-of-buffer]). \\[scroll-up] Scroll to next screen of this message. \\[scroll-down] Scroll to previous screen of this message. \\[rmail-next-undeleted-message] Move to Next non-deleted message. *************** *** 2429,2450 **** (defun rmail-beginning-of-message () "Show current message starting from the beginning." (interactive) ! (let ((rmail-show-message-hook ! (append rmail-show-message-hook ! (list (function (lambda () ! (goto-char (point-min)) ! (search-forward "\n\n"))))))) ! (rmail-show-message rmail-current-message))) ! ! (defun rmail-end-of-message () ! "Show bottom of current message." ! (interactive) ! (let ((rmail-show-message-hook ! (append rmail-show-message-hook ! (list (function (lambda () ! (goto-char (point-max)) ! (recenter (1- (window-height))))))))) ! (rmail-show-message rmail-current-message))) (defun rmail-show-message (&optional n no-summary) "Show message number N (prefix argument), counting from start of file. --- 2427,2433 ---- (defun rmail-beginning-of-message () "Show current message starting from the beginning." (interactive) ! (rmail-show-message rmail-current-message)) (defun rmail-show-message (&optional n no-summary) "Show message number N (prefix argument), counting from start of file. Diff finished at Wed Nov 19 18:01:44 -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry