* change-log-mode
@ 2004-10-10 11:31 Jochen Küpper
2004-10-12 12:07 ` change-log-mode Johan Bockgård
0 siblings, 1 reply; 6+ messages in thread
From: Jochen Küpper @ 2004-10-10 11:31 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --]
I have problems with add-change-log-entry using the "wrong"
user-mail-address for new entries.
I have made user-mail-address local using
,----[.emacs]
| (make-variable-buffer-local 'user-mail-address)
`----
When I set it locally in some buffer (i.e. via a local variables
section) that works perfectly, as I can check by C-h k C-h v.
However, a-c-l-e does seem to cache the value internally. It always
does the right thing [1] when called for the first time in a session,
but the keeps using exactly that mail address for the whole session.
Is there a way to tell it to re-assemble the name/email string every
time? Or can I provide it the string automatically in some way? I have
tried playing around with add-change-log-entry, but I could not find a
way to programatically set the name/email string to use.
I.e. how could I modify the following to get what I want?
,----
| (defun jk/add-change-log-entry ()
| "*Add change-log entry without asking for filename."
| (interactive)
| (add-change-log-entry nil change-log-default-name))
`----
Thank you for your help in advance.
Greetings,
Jochen
Footnotes:
[1] Uses a buffer local value if it exists, the global otherwise.
--
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: 173 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: change-log-mode
2004-10-10 11:31 change-log-mode Jochen Küpper
@ 2004-10-12 12:07 ` Johan Bockgård
2004-10-12 19:09 ` buffer-local add-log-mailing-address (was: change-log-mode) Jochen Küpper
2004-10-12 19:09 ` Jochen Küpper
0 siblings, 2 replies; 6+ messages in thread
From: Johan Bockgård @ 2004-10-12 12:07 UTC (permalink / raw)
Jochen Küpper <usenet@jochen-kuepper.de> writes:
> I have problems with add-change-log-entry using the "wrong"
> user-mail-address for new entries.
[...]
> However, a-c-l-e does seem to cache the value internally.
`add-log-mailing-address'
--
Johan Bockgård
^ permalink raw reply [flat|nested] 6+ messages in thread
* buffer-local add-log-mailing-address (was: change-log-mode)
2004-10-12 12:07 ` change-log-mode Johan Bockgård
@ 2004-10-12 19:09 ` Jochen Küpper
2004-10-12 21:56 ` Kevin Rodgers
2004-10-12 19:09 ` Jochen Küpper
1 sibling, 1 reply; 6+ 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] 6+ messages in thread
* buffer-local add-log-mailing-address (was: change-log-mode)
2004-10-12 12:07 ` change-log-mode Johan Bockgård
2004-10-12 19:09 ` buffer-local add-log-mailing-address (was: change-log-mode) Jochen Küpper
@ 2004-10-12 19:09 ` Jochen Küpper
1 sibling, 0 replies; 6+ 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: 173 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 6+ 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; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread
end of thread, other threads:[~2004-10-17 16:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-10 11:31 change-log-mode Jochen Küpper
2004-10-12 12:07 ` change-log-mode Johan Bockgård
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
2004-10-12 19:09 ` Jochen Küpper
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.