* Re: setting email and name for Changelogs in vc mode
[not found] <mailman.0.1140907218.18076.help-gnu-emacs@gnu.org>
@ 2006-02-26 0:10 ` Thien-Thi Nguyen
2006-03-01 9:51 ` Angelina Carlton
0 siblings, 1 reply; 9+ messages in thread
From: Thien-Thi Nguyen @ 2006-02-26 0:10 UTC (permalink / raw)
Angelina Carlton <brat@magma.ca> writes:
> I can't find this in my customize menu's, does someone know
> the correct way?
here is a fragment from the bindings block of a `let' form in
the function `vc-default-update-changelog' (which eventually
is called when you do `C-x v a'):
(login-name (or user-login-name
(format "uid%d" (number-to-string (user-uid)))))
(full-name (or add-log-full-name
(user-full-name)
(user-login-name)
(format "uid%d"
(number-to-string (user-uid)))))
(mailing-address (or add-log-mailing-address
user-mail-address))
for leggibility, i have added a blank line between each of the
three forms. the car of each form is the name of a temporary
variable that is used elsewhere in the function. we cannot
set those values directly, only indirectly by munging the
values of variables referenced in the `(or ...)' part of each
binding.
the value of `(or A B C)' depends on which of A, B or C (in
that order) first evaluates to a non-nil value. evaluation is
done arg by arg; it is a search.
all this means is that we can influence the temporary
variables in several ways in the `(or ...)' form, depending on
where in the search we want the answer to be found. in a
nutshell: a "naked" symbol is a variable reference -- you can
setq that variable directly. a symbol surrounded by parens is
evaluated by calling a function by that name w/ no args.
w/ these two guidelines, we can, for example, influence the
`full-name' temporary variable by any of:
(setq add-log-full-name "J.R.Hacker")
(defun user-full-name () "J.R.Hacker")
(defun user-login-name () "J.R.Hacker")
(defun user-id () 42) ;; assuming J.R.Hacker has uid 42
likewise w/ the other temporary variables. the thing to
remember is that `or' stops when it finds a form that
evaluates to non-nil. so if you defun both `user-full-name'
and `user-login-name', the former takes precedence. (so what
happens if `user-full-name' returns nil? <-- bonus question)
anyway, these are my thoughts browsing the source.
thi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-02-26 0:10 ` setting email and name for Changelogs in vc mode Thien-Thi Nguyen
@ 2006-03-01 9:51 ` Angelina Carlton
2006-03-02 21:59 ` Peter Dyballa
2006-03-03 5:41 ` Ian Zimmerman
0 siblings, 2 replies; 9+ messages in thread
From: Angelina Carlton @ 2006-03-01 9:51 UTC (permalink / raw)
Thien-Thi Nguyen <ttn@glug.org> writes:
> (setq add-log-full-name "J.R.Hacker")
> (defun user-full-name () "J.R.Hacker")
> (defun user-login-name () "J.R.Hacker")
> (defun user-id () 42) ;; assuming J.R.Hacker has uid 42
>
> likewise w/ the other temporary variables. the thing to
> remember is that `or' stops when it finds a form that
> evaluates to non-nil. so if you defun both `user-full-name'
> and `user-login-name', the former takes precedence. (so what
> happens if `user-full-name' returns nil? <-- bonus question)
I think in your example if user-full-name returned nil the function
would use the value of user-login-name, and if it thought that was nil I
suppose it would use some coded default like "author" which is what I am
seeing currently.
> anyway, these are my thoughts browsing the source.
Thanks, I actually understand that snippet of source now :-)
Sadly though using your method still gives me
2006-03-01 author <author@morcheeba>
(defun user-full-name() "Angelina Carlton")
(defun user-mail-address() "brat@magma.ca")
(setq add-log-full-name "Angelina Carlton")
(setq add-log-mailing-address "brat@maga.ca")
either pair of these should work according to the code.
I have checked my custom file to make sure nothing is being reset after
my .emacs is loaded and it looks OK to me.
--
-----Angelina Carlton-----
orchid on irc.freenode.net
brat@magma.ca
web:bzgirl.bakadigital.com
--------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-03-01 9:51 ` Angelina Carlton
@ 2006-03-02 21:59 ` Peter Dyballa
2006-03-03 5:41 ` Ian Zimmerman
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-03-02 21:59 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 01.03.2006 um 10:51 schrieb Angelina Carlton:
> (defun user-full-name() "Angelina Carlton")
> (defun user-mail-address() "brat@magma.ca")
> (setq add-log-full-name "Angelina Carlton")
> (setq add-log-mailing-address "brat@maga.ca")
I have entered through the customisation interface these two lines,
that appear among the "custom-set-variables" in .emacs:
'(user-full-name "Peter Dyballa")
'(user-mail-address "Peter_Dyballa@Web.DE")
Invoke 'M-x cust <TAB> -var <TAB> <RET> add <TAB> <TAB>' etc. and
make your choices and settings!
--
Greetings
Pete
The box said "Use Windows 95 or better," so I got a Macintosh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-03-01 9:51 ` Angelina Carlton
2006-03-02 21:59 ` Peter Dyballa
@ 2006-03-03 5:41 ` Ian Zimmerman
2006-03-06 1:54 ` Angelina Carlton
1 sibling, 1 reply; 9+ messages in thread
From: Ian Zimmerman @ 2006-03-03 5:41 UTC (permalink / raw)
Angelina> Sadly though using your method still gives me 2006-03-01
Angelina> author <author@morcheeba>
Looking at what vc-default-update-changelog actually does, it just
executes rcs2log with the appropriate -u argument. And according to
the rcs2log manpage,
-u "LOGIN\tFULLNAME\tMAILADDR"
Assume LOGIN has FULLNAME and MAILADDR.
i.e. the first part doesn't override what the login name is, it serves
as a key to associate the real full name and address (It makes sense
that it works this way, it makes it harder to lie about who checked in
the changes.)
So, what you need to do is set (temporarily, if you don't want future
changes as "author" too)
vc-user-login-name to "author"
user-full-name to "Angelina Carlton"
user-mail-address to "brat@magma.ca"
Confused? That'll teach you to lie :-)
--
A true pessimist won't be discouraged by a little success.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-03-03 5:41 ` Ian Zimmerman
@ 2006-03-06 1:54 ` Angelina Carlton
0 siblings, 0 replies; 9+ messages in thread
From: Angelina Carlton @ 2006-03-06 1:54 UTC (permalink / raw)
Ian Zimmerman <nobrowser@gmail.com> writes:
> So, what you need to do is set (temporarily, if you don't want future
> changes as "author" too)
>
> vc-user-login-name to "author"
> user-full-name to "Angelina Carlton"
> user-mail-address to "brat@magma.ca"
>
> Confused? That'll teach you to lie :-)
:-)
I tried this also and just tested it tonight, but with the same result,
its not a big deal, just an annoyance but I can use replace-string to
fix it for now.
--
-----Angelina Carlton-----
orchid on irc.freenode.net
brat@magma.ca
web:bzgirl.bakadigital.com
--------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* setting email and name for Changelogs in vc mode
@ 2006-02-25 22:39 Angelina Carlton
2006-02-26 10:17 ` Reiner Steib
2006-02-27 15:39 ` David Hansen
0 siblings, 2 replies; 9+ messages in thread
From: Angelina Carlton @ 2006-02-25 22:39 UTC (permalink / raw)
Hello,
When working on files under cvs revision I make some commits inside
Emacs and the update the Changelog with C-x v a
The problem is my user name and email address are wrong:
2006-02-25 author <author@morcheeba>
(morcheeba being the hostname) I would rather see:
2006-02-25 Angelina Carlton <brat@mgma.ca>
I was told in irc to try this in my .emacs:
,----
| (setq change-log-default-name "ChangeLog"
| user-full-name "Angelina Carlton"
| user-mail-address "brat@magma.ca")
`----
But after restarting Emacs, commiting something and then doing C-x v a I
get the same string:
2006-02-25 author <author@morcheeba>
I can't find this in my customize menu's, does someone know the correct
way?
GNU Emacs 22.0.50.1
--
-----Angelina Carlton-----
orchid on irc.freenode.net
brat@magma.ca
web:bzgirl.bakadigital.com
--------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-02-25 22:39 Angelina Carlton
@ 2006-02-26 10:17 ` Reiner Steib
2006-03-01 9:09 ` Angelina Carlton
2006-02-27 15:39 ` David Hansen
1 sibling, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2006-02-26 10:17 UTC (permalink / raw)
On Sat, Feb 25 2006, Angelina Carlton wrote:
> ,----
> | (setq change-log-default-name "ChangeLog"
> | user-full-name "Angelina Carlton"
> | user-mail-address "brat@magma.ca")
> `----
>
> But after restarting Emacs, commiting something and then doing C-x v a I
> get the same string:
>
> 2006-02-25 author <author@morcheeba>
Please verify that the settings in your .emacs are processed
successfully with `<f1> v user-full-name RET' and `<f1> v
user-mail-address RET'.
BTW, there's also...
,----
| add-log-full-name
| Variable: *Full name of user, for inclusion in ChangeLog daily headers.
| add-log-mailing-address
| Variable: *Email addresses of user, for inclusion in ChangeLog headers.
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-02-26 10:17 ` Reiner Steib
@ 2006-03-01 9:09 ` Angelina Carlton
0 siblings, 0 replies; 9+ messages in thread
From: Angelina Carlton @ 2006-03-01 9:09 UTC (permalink / raw)
Reiner Steib <reinersteib+gmane@imap.cc> writes:
> Please verify that the settings in your .emacs are processed
> successfully with `<f1> v user-full-name RET' and `<f1> v
> user-mail-address RET'.
"Angelina Carlton"
"brat@magma.ca"
So both of these are correct.
> BTW, there's also...
>
> ,----
> | add-log-full-name
> | Variable: *Full name of user, for inclusion in ChangeLog daily headers.
> | add-log-mailing-address
> | Variable: *Email addresses of user, for inclusion in ChangeLog headers.
> `----
These two variables according to the documentation, default to the value
returned by the functions `user-full-name' and `user-mail-address'
However I set them just to make sure, but still am getting
2006-03-01 author <author@morcheeba>
I will keep digging.
--
-----Angelina Carlton-----
orchid on irc.freenode.net
brat@magma.ca
web:bzgirl.bakadigital.com
--------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: setting email and name for Changelogs in vc mode
2006-02-25 22:39 Angelina Carlton
2006-02-26 10:17 ` Reiner Steib
@ 2006-02-27 15:39 ` David Hansen
1 sibling, 0 replies; 9+ messages in thread
From: David Hansen @ 2006-02-27 15:39 UTC (permalink / raw)
On Sat, 25 Feb 2006 17:39:42 -0500 Angelina Carlton wrote:
> When working on files under cvs revision I make some commits inside
> Emacs and the update the Changelog with C-x v a
> The problem is my user name and email address are wrong:
Setting `add-log-mailing-address' and `add-log-full-name'
should work.
David
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-03-06 1:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.0.1140907218.18076.help-gnu-emacs@gnu.org>
2006-02-26 0:10 ` setting email and name for Changelogs in vc mode Thien-Thi Nguyen
2006-03-01 9:51 ` Angelina Carlton
2006-03-02 21:59 ` Peter Dyballa
2006-03-03 5:41 ` Ian Zimmerman
2006-03-06 1:54 ` Angelina Carlton
2006-02-25 22:39 Angelina Carlton
2006-02-26 10:17 ` Reiner Steib
2006-03-01 9:09 ` Angelina Carlton
2006-02-27 15:39 ` David Hansen
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).