all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C-a in message.el with point between bol and :
@ 2005-01-18 18:59 Stefan Monnier
  2005-01-24 22:38 ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2005-01-18 18:59 UTC (permalink / raw)



When point is inside a header-field name (i.e. inside the header, somewhere
betwen the beginningof a line and the beginning of a header field value),
message-beginning-of-line moves *forward* to the beginning of the header
field's value.
I find that counter intuitive and would prefer it to always move backward
(except when repeated, obviously).

I.e. I suggest the patch below (against the current Emacs-CVS trunk).


        Stefan


--- orig/lisp/gnus/message.el
+++ mod/lisp/gnus/message.el
@@ -1,5 +1,5 @@
 ;;; message.el --- composing mail and news messages
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -800,7 +800,7 @@
 ;; is nil.  See: http://article.gmane.org/gmane.emacs.gnus.general/51138
 (defcustom message-generate-headers-first '(references)
   "Which headers should be generated before starting to compose a message.
-If `t', generate all required headers.  This can also be a list of headers to
+If t, generate all required headers.  This can also be a list of headers to
 generate.  The variables `message-required-news-headers' and
 `message-required-mail-headers' specify which headers to generate.
 
@@ -5282,7 +5282,7 @@
 
 (defcustom message-beginning-of-line t
   "Whether \\<message-mode-map>\\[message-beginning-of-line]\
- goes to beginning of header values."
+goes to beginning of header values."
   :version "21.4"
   :group 'message-buffers
   :link '(custom-manual "(message)Movement")
@@ -5297,10 +5297,10 @@
 is nil.
 
 If point is in the message header and on a (non-continued) header
-line, move point to the beginning of the header value.  If point
-is already there, move point to beginning of line.  Therefore,
-repeated calls will toggle point between beginning of field and
-beginning of line."
+line, move point to the beginning of the header value or the beginning of line,
+whichever is closer.  If point is already at beginning of line, move point to
+beginning of header value.  Therefore, repeated calls will toggle point
+between beginning of field and beginning of line."
   (interactive "p")
   (let ((zrs 'zmacs-region-stays))
     (when (and (interactive-p) (boundp zrs))
@@ -5311,9 +5311,9 @@
 	     (bol (progn (beginning-of-line n) (point)))
 	     (eol (gnus-point-at-eol))
 	     (eoh (re-search-forward ": *" eol t)))
-	(if (or (not eoh) (equal here eoh))
-	    (goto-char bol)
-	  (goto-char eoh)))
+	(goto-char
+	 (if (and eoh (or (< eoh here) (= bol here)))
+	     eoh bol)))
     (beginning-of-line n)))
 
 (defun message-buffer-name (type &optional to group)
@@ -6881,5 +6881,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0
+;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0
 ;;; message.el ends here

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-a in message.el with point between bol and :
  2005-01-18 18:59 C-a in message.el with point between bol and : Stefan Monnier
@ 2005-01-24 22:38 ` Katsumi Yamaoka
  2005-01-24 23:17   ` Miles Bader
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-01-24 22:38 UTC (permalink / raw)
  Cc: bugs, emacs-devel

>>>>> In <jwvd5w2wowb.fsf-monnier+emacs@gnu.org> Stefan Monnier wrote:

> When point is inside a header-field name (i.e. inside the header, somewhere
> betwen the beginningof a line and the beginning of a header field value),
> message-beginning-of-line moves *forward* to the beginning of the header
> field's value.
> I find that counter intuitive and would prefer it to always move backward
> (except when repeated, obviously).

> I.e. I suggest the patch below (against the current Emacs-CVS trunk).

No followup is no objection.  I like it very much.  Could you
write the ChangeLog entry?  I'll install your patch in the Gnus
trunk, and the branch synchronized with the Emacs trunk.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-a in message.el with point between bol and :
  2005-01-24 22:38 ` Katsumi Yamaoka
@ 2005-01-24 23:17   ` Miles Bader
  2005-01-25  0:05     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2005-01-24 23:17 UTC (permalink / raw)
  Cc: emacs-devel, Stefan Monnier, bugs

> No followup is no objection.  I like it very much.  Could you
> write the ChangeLog entry?  I'll install your patch in the Gnus
> trunk, and the branch synchronized with the Emacs trunk.

Note that the synching is bi-directional, so if Stefan commits his
patch to Emacs CVS, it will be propagated to the Gnus 5.10 branch and
the Gnus trunk.

-Miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-a in message.el with point between bol and :
  2005-01-24 23:17   ` Miles Bader
@ 2005-01-25  0:05     ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-01-25  0:05 UTC (permalink / raw)
  Cc: emacs-devel, Stefan Monnier, bugs, miles

>>>>> In <fc339e4a05012415177f25e85a@mail.gmail.com> Miles Bader wrote:

> Note that the synching is bi-directional, so if Stefan commits his
> patch to Emacs CVS, it will be propagated to the Gnus 5.10 branch and
> the Gnus trunk.

I forgot that changes in Emacs are propagated to the Gnus trunk,
not only the v5-10 branch.  Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-25  0:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-18 18:59 C-a in message.el with point between bol and : Stefan Monnier
2005-01-24 22:38 ` Katsumi Yamaoka
2005-01-24 23:17   ` Miles Bader
2005-01-25  0:05     ` Katsumi Yamaoka

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.