emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion: go to bottom of mail message


From: Ehud Karni
Subject: Re: Suggestion: go to bottom of mail message
Date: Wed, 19 Nov 2003 17:26:47 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 19 Nov 2003 20:55:07 +0900 (JST), Kenichi Handa <address@hidden> wrote:
>
> (1) How about also making the new command
> rmail-end-of-message in RMAIL mode.

OK. See new patch below.

> (2) I've just noticed that
> rmail-summary-beginning-of-message works slightly
> differently than rmail-beginnig-of-message.  The formar
> moves point to the really beginning of a message, but the
> latter moves point to the beginning of a BODY of a message.
> I think the latter is better because the former can be done
> by ESC <.  So, shouldn't we change
> rmail-summary-beginning-of-message?

The rmail-beginning-of-message does not do that. May be you have
something in your `rmail-show-message-hook'. I think that putting
point at the beginning of the BODY is a good idea, so I changed
my code to do this.

> (3) I prefer the key "/" than ";" for
> rmail[-summary]-end-of-message because "/" is usually just
> right of "." but ";" is usually right upper of ".".  As ".
> moves point to the beggining, it seems strange to type the
> upper key to move point to the end.  By the way, for me the
> ideal keys are:
>   "," go to the beginning
>   "." go to the end
> because my fingers already got used to "ESC <" and "ESC >",
> and "," and "<", "." and ">" are on the same keys.

I changed the ";" to "/", but I don't take it upon myself to change
old key bindings (besides, see Kim mail about keyboards layout).

Ehud.


2003-11-19  Ehud Karni  <address@hidden>

        * 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_org
*** /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 16:56:09


diff -c /lnx1/gnu/src/emacs/lisp/mail/rmail.el 
/lnx1/gnu/src/emacs/lisp/mail/rmail.el_org
*** /lnx1/gnu/src/emacs/lisp/mail/rmail.el      Wed Nov 19 16:29:56 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,2452 ****
  (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 ()
!                                (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 17:05:10


- --
 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 <http://www.keyserver.net/>    Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/u4u2LFvTvpjqOY0RAnkAAJ0S2uz4lRdhhHoHJYMaJ/U8gRlyCgCfeRdO
1Gg8Issf/sYnH2n03piO2L8=
=0Iz0
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]