unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* buffer-local add-log-mailing-address (was: change-log-mode)
       [not found] ` <yoijmzys5edq.fsf@frealaf.dd.chalmers.se>
@ 2004-10-12 19:09   ` Jochen Küpper
  2004-10-12 21:56     ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Jochen Küpper @ 2004-10-12 19:09 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 952 bytes --]

On Tue, 12 Oct 2004 14:07:13 +0200 Johan Bockgård wrote:

Johan> Jochen Küpper <usenet-W2i0oK7yYu0+t3nig+EZI7NAH6kLmebB@public.gmane.org> writes:

>> I have problems with add-change-log-entry using the "wrong"
>> user-mail-address for new entries.
Johan> [...]
>> However, a-c-l-e does seem to cache the value internally.

Johan> `add-log-mailing-address'

Thanks for the hint. However, that variable shows the same behavior.

Now I found out that the same issue was brought up before:
,----
| http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-04/msg00072.html
`----
I could not find a solution using google, and apparently add-log from
GNU Emacs 21.3.1 still shows the same problem. Any takers?

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

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

* Re: buffer-local add-log-mailing-address (was: change-log-mode)
  2004-10-12 19:09   ` buffer-local add-log-mailing-address (was: change-log-mode) Jochen Küpper
@ 2004-10-12 21:56     ` Kevin Rodgers
  2004-10-17 16:08       ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Rodgers @ 2004-10-12 21:56 UTC (permalink / raw)


Jochen K?pper wrote:
 > On Tue, 12 Oct 2004 14:07:13 +0200 Johan Bockg?rd wrote:
 > Johan> `add-log-mailing-address'
 >
 > Thanks for the hint. However, that variable shows the same behavior.
 >
 > Now I found out that the same issue was brought up before:
 > ,----
 > | http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-04/msg00072.html
 > `----
 > I could not find a solution using google, and apparently add-log from
 > GNU Emacs 21.3.1 still shows the same problem. Any takers?

Is it as easy as setting add-log-mailing-address (and -full-name, while
we're at it) after visiting the ChangeLog file (instead of before)?

*** emacs-21.3/lisp/add-log.el~	Tue Oct 12 15:49:37 2004
--- emacs-21.3/lisp/add-log.el	Tue Oct 12 15:47:48 2004
***************
*** 416,434 ****
   non-nil, otherwise in local time."
     (interactive (list current-prefix-arg
   		     (prompt-for-change-log-name)))
-   (or add-log-full-name
-       (setq add-log-full-name (user-full-name)))
-   (or add-log-mailing-address
-       (setq add-log-mailing-address user-mail-address))
-   (if whoami
-       (progn
- 	(setq add-log-full-name (read-input "Full name: " add-log-full-name))
- 	 ;; Note that some sites have room and phone number fields in
- 	 ;; full name which look silly when inserted.  Rather than do
- 	 ;; anything about that here, let user give prefix argument so that
- 	 ;; s/he can edit the full name field in prompter if s/he wants.
- 	(setq add-log-mailing-address
- 	      (read-input "Mailing address: " add-log-mailing-address))))

     (let* ((defun (add-log-current-defun))
   	 (version (and change-log-version-info-enabled
--- 416,421 ----
***************
*** 449,454 ****
--- 436,454 ----
         (find-file file-name))
       (or (eq major-mode 'change-log-mode)
   	(change-log-mode))
+   (or add-log-full-name
+       (setq add-log-full-name (user-full-name)))
+   (or add-log-mailing-address
+       (setq add-log-mailing-address user-mail-address))
+   (if whoami
+       (progn
+ 	(setq add-log-full-name (read-input "Full name: " add-log-full-name))
+ 	 ;; Note that some sites have room and phone number fields in
+ 	 ;; full name which look silly when inserted.  Rather than do
+ 	 ;; anything about that here, let user give prefix argument so that
+ 	 ;; s/he can edit the full name field in prompter if s/he wants.
+ 	(setq add-log-mailing-address
+ 	      (read-input "Mailing address: " add-log-mailing-address))))
       (undo-boundary)
       (goto-char (point-min))
       (let ((new-entry (concat (funcall add-log-time-format)

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

* Re: buffer-local add-log-mailing-address (was: change-log-mode)
  2004-10-12 21:56     ` Kevin Rodgers
@ 2004-10-17 16:08       ` Richard Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2004-10-17 16:08 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Here's my idea of how to fix this.  Does it work right?

*** add-log.el	25 Jun 2004 13:29:53 -0400	1.151
--- add-log.el	17 Oct 2004 08:07:51 -0400	
***************
*** 471,490 ****
  non-nil, otherwise in local time."
    (interactive (list current-prefix-arg
  		     (prompt-for-change-log-name)))
-   (or add-log-full-name
-       (setq add-log-full-name (user-full-name)))
-   (or add-log-mailing-address
-       (setq add-log-mailing-address user-mail-address))
-   (if whoami
-       (progn
- 	(setq add-log-full-name (read-input "Full name: " add-log-full-name))
- 	 ;; Note that some sites have room and phone number fields in
- 	 ;; full name which look silly when inserted.  Rather than do
- 	 ;; anything about that here, let user give prefix argument so that
- 	 ;; s/he can edit the full name field in prompter if s/he wants.
- 	(setq add-log-mailing-address
- 	      (read-input "Mailing address: " add-log-mailing-address))))
- 
    (let* ((defun (add-log-current-defun))
  	 (version (and change-log-version-info-enabled
  		       (change-log-version-number-search)))
--- 471,476 ----
***************
*** 495,501 ****
  	 (file-name (expand-file-name (find-change-log file-name buffer-file)))
  	 ;; Set ITEM to the file name to use in the new item.
  	 (item (add-log-file-name buffer-file file-name))
! 	 bound)
  
      (unless (equal file-name buffer-file-name)
        (if (or other-window (window-dedicated-p (selected-window)))
--- 481,499 ----
  	 (file-name (expand-file-name (find-change-log file-name buffer-file)))
  	 ;; Set ITEM to the file name to use in the new item.
  	 (item (add-log-file-name buffer-file file-name))
! 	 bound
! 	 (full-name (or add-log-full-name (user-full-name)))
! 	 (mailing-address (or add-log-mailing-address user-mail-address)))
! 
!     (if whoami
! 	(progn
! 	  (setq full-name (read-input "Full name: " full-name))
! 	  ;; Note that some sites have room and phone number fields in
! 	  ;; full name which look silly when inserted.  Rather than do
! 	  ;; anything about that here, let user give prefix argument so that
! 	  ;; s/he can edit the full name field in prompter if s/he wants.
! 	  (setq mailing-address
! 		(read-input "Mailing address: " mailing-address))))
  
      (unless (equal file-name buffer-file-name)
        (if (or other-window (window-dedicated-p (selected-window)))
***************
*** 515,525 ****
      ;; Advance into first entry if it is usable; else make new one.
      (let ((new-entries (mapcar (lambda (addr)
  				 (concat (funcall add-log-time-format)
! 					 "  " add-log-full-name
  					 "  <" addr ">"))
! 			       (if (consp add-log-mailing-address)
! 				   add-log-mailing-address
! 				 (list add-log-mailing-address)))))
        (if (and (not add-log-always-start-new-record)
                 (let ((hit nil))
  		 (dolist (entry new-entries hit)
--- 513,523 ----
      ;; Advance into first entry if it is usable; else make new one.
      (let ((new-entries (mapcar (lambda (addr)
  				 (concat (funcall add-log-time-format)
! 					 "  " full-name
  					 "  <" addr ">"))
! 			       (if (consp mailing-address)
! 				   mailing-address
! 				 (list mailing-address)))))
        (if (and (not add-log-always-start-new-record)
                 (let ((hit nil))
  		 (dolist (entry new-entries hit)

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

end of thread, other threads:[~2004-10-17 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m3is9in72a.fsf@jochen-kuepper.de>
     [not found] ` <yoijmzys5edq.fsf@frealaf.dd.chalmers.se>
2004-10-12 19:09   ` buffer-local add-log-mailing-address (was: change-log-mode) Jochen Küpper
2004-10-12 21:56     ` Kevin Rodgers
2004-10-17 16:08       ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).