unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Proposal] Retrieve MAILADDRESS as user-mail-address default value.
@ 2006-07-19 11:54 Michaël Cadilhac
  2006-07-20 15:33 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Michaël Cadilhac @ 2006-07-19 11:54 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 401 bytes --]

Hi!

A  guy  on the  list  screwed  its ChangeLog  entry  by  making it  in
emacs -Q, well, I'm not the last one that would make the error :-)

I started to write him « Maybe we can set environment variables to fix
that once and for  all! Let's see, for the full name,  we just have to
use NAME. And for the email, we... Oh, what the heck ! »

Hum... Well, I propose the following change.


[-- Attachment #1.1.2: startup.patch --]
[-- Type: text/x-patch, Size: 2746 bytes --]

Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.9820
diff -c -0 -r1.9820 ChangeLog
*** lisp/ChangeLog	17 Jul 2006 04:07:48 -0000	1.9820
--- lisp/ChangeLog	19 Jul 2006 11:21:17 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2006-07-19  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* startup.el (user-mail-address): Initialize with `MAILADDRESS'
+ 	environment variable first. Document it.
+ 	(command-line): Ditto.
+ 
Index: lisp/startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.409
diff -c -r1.409 startup.el
*** lisp/startup.el	24 May 2006 13:22:12 -0000	1.409
--- lisp/startup.el	19 Jul 2006 11:44:05 -0000
***************
*** 247,260 ****
    :group 'mail)
  
  (defcustom user-mail-address (if command-line-processed
! 				 (concat (user-login-name) "@"
! 					 (or mail-host-address
! 					     (system-name)))
  			       ;; Empty string means "not set yet".
  			       "")
    "*Full mailing address of this user.
! This is initialized based on `mail-host-address',
! after your init file is read, in case it sets `mail-host-address'."
    :type 'string
    :group 'mail)
  
--- 247,262 ----
    :group 'mail)
  
  (defcustom user-mail-address (if command-line-processed
! 				 (or (getenv "MAILADDRESS")
! 				     (concat (user-login-name) "@"
! 					     (or mail-host-address
! 						 (system-name))))
  			       ;; Empty string means "not set yet".
  			       "")
    "*Full mailing address of this user.
! This is initialized with environment variable `MAILADDRESS' or,
! as a fallback, using `mail-host-address'. This is done after your
! init file is read, in case it sets `mail-host-address'."
    :type 'string
    :group 'mail)
  
***************
*** 977,985 ****
  
      ;; Do this here in case the init file sets mail-host-address.
      (if (equal user-mail-address "")
! 	(setq user-mail-address (concat (user-login-name) "@"
! 					(or mail-host-address
! 					    (system-name)))))
  
      ;; Originally face attributes were specified via
      ;; `font-lock-face-attributes'.  Users then changed the default
--- 979,988 ----
  
      ;; Do this here in case the init file sets mail-host-address.
      (if (equal user-mail-address "")
! 	(setq user-mail-address (or (getenv "MAILADDRESS")
! 				    (concat (user-login-name) "@"
! 					    (or mail-host-address
! 						(system-name))))))
  
      ;; Originally face attributes were specified via
      ;; `font-lock-face-attributes'.  Users then changed the default

[-- Attachment #1.1.3: Type: text/plain, Size: 50 bytes --]


If needed, the following documents it in NEWS :


[-- Attachment #1.1.4: NEWS.patch --]
[-- Type: text/x-patch, Size: 1362 bytes --]

Index: etc/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/etc/ChangeLog,v
retrieving revision 1.430
diff -c -r1.430 ChangeLog
*** etc/ChangeLog	14 Jul 2006 15:04:08 -0000	1.430
--- etc/ChangeLog	19 Jul 2006 11:42:59 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2006-07-19  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* NEWS: Document `user-mail-address' initialization.
+ 
  2006-07-14  Kim F. Storm  <storm@cua.dk>
  
  	* PROBLEMS: Emacs now requires ws2_32.dll on Windows.
Index: etc/NEWS
===================================================================
RCS file: /sources/emacs/emacs/etc/NEWS,v
retrieving revision 1.1376
diff -c -r1.1376 NEWS
*** etc/NEWS	14 Jul 2006 23:29:43 -0000	1.1376
--- etc/NEWS	19 Jul 2006 11:42:59 -0000
***************
*** 238,243 ****
--- 238,248 ----
  modified buffers, it saves the abbrevs too if they have changed.  It
  can do this either silently or asking for confirmation first,
  according to the value of `save-abbrevs'.
+ 
+ +++
+ ** Initialize `user-mail-address' with env variable `MAILADDRESS' first.
+ The variable `user-mail-address' is initialized with the environment
+ variable `MAILADDRESS' before defaulting it to `user-login-name'@host.
  \f
  * Incompatible Editing Changes in Emacs 22.1
  

[-- Attachment #1.1.5: Type: text/plain, Size: 332 bytes --]


TIA !

-- 
 |      Michaël `Micha' Cadilhac   |  All your base are belong to us.       |
 |         Epita/LRDE Promo 2007   |    You have no change to survive       |
 | http://www.lrde.org/~cadilh_m   |       make your time, hahaha.          |
 `--  -   JID: micha@amessage.be --'       -- Zero Wings               -  --'

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

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

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: [Proposal] Retrieve MAILADDRESS as user-mail-address default value.
  2006-07-19 11:54 [Proposal] Retrieve MAILADDRESS as user-mail-address default value Michaël Cadilhac
@ 2006-07-20 15:33 ` Richard Stallman
  2006-07-20 15:53   ` Chong Yidong
  2006-07-20 16:58   ` Michaël Cadilhac
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2006-07-20 15:33 UTC (permalink / raw)
  Cc: emacs-devel

Is the envvar MAILADDRESS customarily used by other mailers?
If so, it would be good for Emacs to handle it.
Otherwise, I don't see that this is particularly useful as 
a new feature.

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

* Re: [Proposal] Retrieve MAILADDRESS as user-mail-address default value.
  2006-07-20 15:33 ` Richard Stallman
@ 2006-07-20 15:53   ` Chong Yidong
  2006-07-20 16:58   ` Michaël Cadilhac
  1 sibling, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2006-07-20 15:53 UTC (permalink / raw)
  Cc: Michaël Cadilhac, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Is the envvar MAILADDRESS customarily used by other mailers?

No.

> If so, it would be good for Emacs to handle it.
> Otherwise, I don't see that this is particularly useful as 
> a new feature.

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

* Re: [Proposal] Retrieve MAILADDRESS as user-mail-address default value.
  2006-07-20 15:33 ` Richard Stallman
  2006-07-20 15:53   ` Chong Yidong
@ 2006-07-20 16:58   ` Michaël Cadilhac
  1 sibling, 0 replies; 4+ messages in thread
From: Michaël Cadilhac @ 2006-07-20 16:58 UTC (permalink / raw)
  Cc: emacs-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 268 bytes --]

Richard Stallman <rms@gnu.org> writes:

> Is the envvar MAILADDRESS customarily used by other mailers?

EMAIL is. At least in, for instance, Mutt, debian's reportbug binary,
darcs, yafc, ...

If you prefer this envvar, please consider the following modified
patches.


[-- Attachment #1.1.2: startup.patch --]
[-- Type: text/x-patch, Size: 2722 bytes --]

Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.9820
diff -c -0 -r1.9820 ChangeLog
*** lisp/ChangeLog	17 Jul 2006 04:07:48 -0000	1.9820
--- lisp/ChangeLog	19 Jul 2006 11:21:17 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2006-07-19  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* startup.el (user-mail-address): Initialize with `EMAIL'
+ 	environment variable first. Document it.
+ 	(command-line): Ditto.
+ 
Index: lisp/startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.409
diff -c -r1.409 startup.el
*** lisp/startup.el	24 May 2006 13:22:12 -0000	1.409
--- lisp/startup.el	19 Jul 2006 11:44:05 -0000
***************
*** 247,260 ****
    :group 'mail)
  
  (defcustom user-mail-address (if command-line-processed
! 				 (concat (user-login-name) "@"
! 					 (or mail-host-address
! 					     (system-name)))
  			       ;; Empty string means "not set yet".
  			       "")
    "*Full mailing address of this user.
! This is initialized based on `mail-host-address',
! after your init file is read, in case it sets `mail-host-address'."
    :type 'string
    :group 'mail)
  
--- 247,262 ----
    :group 'mail)
  
  (defcustom user-mail-address (if command-line-processed
! 				 (or (getenv "EMAIL")
! 				     (concat (user-login-name) "@"
! 					     (or mail-host-address
! 						 (system-name))))
  			       ;; Empty string means "not set yet".
  			       "")
    "*Full mailing address of this user.
! This is initialized with environment variable `EMAIL' or, as a
! fallback, using `mail-host-address'. This is done after your
! init file is read, in case it sets `mail-host-address'."
    :type 'string
    :group 'mail)
  
***************
*** 977,985 ****
  
      ;; Do this here in case the init file sets mail-host-address.
      (if (equal user-mail-address "")
! 	(setq user-mail-address (concat (user-login-name) "@"
! 					(or mail-host-address
! 					    (system-name)))))
  
      ;; Originally face attributes were specified via
      ;; `font-lock-face-attributes'.  Users then changed the default
--- 979,988 ----
  
      ;; Do this here in case the init file sets mail-host-address.
      (if (equal user-mail-address "")
! 	(setq user-mail-address (or (getenv "EMAIL")
! 				    (concat (user-login-name) "@"
! 					    (or mail-host-address
! 						(system-name))))))
  
      ;; Originally face attributes were specified via
      ;; `font-lock-face-attributes'.  Users then changed the default

[-- Attachment #1.1.3: NEWS.patch --]
[-- Type: text/x-patch, Size: 1350 bytes --]

Index: etc/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/etc/ChangeLog,v
retrieving revision 1.430
diff -c -r1.430 ChangeLog
*** etc/ChangeLog	14 Jul 2006 15:04:08 -0000	1.430
--- etc/ChangeLog	19 Jul 2006 11:42:59 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2006-07-19  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* NEWS: Document `user-mail-address' initialization.
+ 
  2006-07-14  Kim F. Storm  <storm@cua.dk>
  
  	* PROBLEMS: Emacs now requires ws2_32.dll on Windows.
Index: etc/NEWS
===================================================================
RCS file: /sources/emacs/emacs/etc/NEWS,v
retrieving revision 1.1376
diff -c -r1.1376 NEWS
*** etc/NEWS	14 Jul 2006 23:29:43 -0000	1.1376
--- etc/NEWS	19 Jul 2006 11:42:59 -0000
***************
*** 238,243 ****
--- 238,248 ----
  modified buffers, it saves the abbrevs too if they have changed.  It
  can do this either silently or asking for confirmation first,
  according to the value of `save-abbrevs'.
+ 
+ +++
+ ** Initialize `user-mail-address' with env variable `EMAIL' first.
+ The variable `user-mail-address' is initialized with the environment
+ variable `EMAIL' before defaulting it to `user-login-name'@host.
  \f
  * Incompatible Editing Changes in Emacs 22.1
  

[-- Attachment #1.1.4: Type: text/plain, Size: 332 bytes --]


TIA !

-- 
 |      Michaël `Micha' Cadilhac   |  Would someone please DTRT with this,  |
 |         Epita/LRDE Promo 2007   |        then ACK?                       |
 | http://www.lrde.org/~cadilh_m   |          -- Richard Stallman           |
 `--  -   JID: micha@amessage.be --'                                   -  --'

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

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

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2006-07-20 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-19 11:54 [Proposal] Retrieve MAILADDRESS as user-mail-address default value Michaël Cadilhac
2006-07-20 15:33 ` Richard Stallman
2006-07-20 15:53   ` Chong Yidong
2006-07-20 16:58   ` Michaël Cadilhac

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).