unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rogue option init-file-user
@ 2006-01-07  3:48 Luc Teirlinck
  2006-01-07 14:01 ` Lennart Borgman
  2006-01-07 18:57 ` Richard M. Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Luc Teirlinck @ 2006-01-07  3:48 UTC (permalink / raw)


init-file-user is usually rogue:

  init-file-user: Hide Value Value Menu String: 
     State: CHANGED outside Customize; operating on it here may be unreliable.

Before worrying what to do about that, the first thing to decide is
whether this really should be defined with defcustom.  I believe that
it should be defined with defvar.  It seems to me that to change this
variable in a way that actually works, the user should use a command
line option such as -q or -u.  Setting or saving it through Custom
appears to make little sense.

Sincerely,

Luc.

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

* Re: rogue option init-file-user
  2006-01-07  3:48 rogue option init-file-user Luc Teirlinck
@ 2006-01-07 14:01 ` Lennart Borgman
  2006-01-07 15:12   ` Eli Zaretskii
  2006-01-07 18:57 ` Richard M. Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2006-01-07 14:01 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck wrote:

>init-file-user is usually rogue:
>
>  init-file-user: Hide Value Value Menu String: 
>     State: CHANGED outside Customize; operating on it here may be unreliable.
>
>Before worrying what to do about that, the first thing to decide is
>whether this really should be defined with defcustom.  I believe that
>it should be defined with defvar.  It seems to me that to change this
>variable in a way that actually works, the user should use a command
>line option such as -q or -u.  Setting or saving it through Custom
>appears to make little sense.
>
>Sincerely,
>
>Luc.
>  
>
Beside the above problem the value on w32 seems strange. I get the value 
"" with CVS Emacs from 2006-01-06 after .emacs have been read.

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

* Re: rogue option init-file-user
  2006-01-07 14:01 ` Lennart Borgman
@ 2006-01-07 15:12   ` Eli Zaretskii
  2006-01-07 15:39     ` Lennart Borgman
  2006-01-08 14:47     ` Richard M. Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2006-01-07 15:12 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

> Date: Sat, 07 Jan 2006 15:01:54 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> Cc: emacs-devel@gnu.org
> 
> Beside the above problem the value on w32 seems strange. I get the value 
> "" with CVS Emacs from 2006-01-06 after .emacs have been read.

This isn't strange, this is exactly what should happen.  The doc
string of init-file-user says, among other things:

    Otherwise, the value may be the null string, meaning use the init file
    for the user that originally logged in, or it may be a
    string containing a user's name meaning use that person's init file.

    In either of the latter cases, `(concat "~" init-file-user "/")'
    evaluates to the name of the directory where the `.emacs' file was
    looked for.

With the possible exception of the term ``null string'' (which really
means an empty string), this describes what you see: since the .emacs
file used was from the user ``that originally logged in'', you get the
value of "", and (concat "~" init-file-user "/") will yield "~/", your
home directory.

I fixed the doc string to say "empty string", for more clarity.

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

* Re: rogue option init-file-user
  2006-01-07 15:12   ` Eli Zaretskii
@ 2006-01-07 15:39     ` Lennart Borgman
  2006-01-08 14:47     ` Richard M. Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Lennart Borgman @ 2006-01-07 15:39 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

Eli Zaretskii wrote:

>>Date: Sat, 07 Jan 2006 15:01:54 +0100
>>From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>Cc: emacs-devel@gnu.org
>>
>>Beside the above problem the value on w32 seems strange. I get the value 
>>"" with CVS Emacs from 2006-01-06 after .emacs have been read.
>>    
>>
>
>This isn't strange, this is exactly what should happen.  The doc
>string of init-file-user says, among other things:
>
>    Otherwise, the value may be the null string, meaning use the init file
>    for the user that originally logged in, or it may be a
>    string containing a user's name meaning use that person's init file.
>
>    In either of the latter cases, `(concat "~" init-file-user "/")'
>    evaluates to the name of the directory where the `.emacs' file was
>    looked for.
>
>With the possible exception of the term ``null string'' (which really
>means an empty string), this describes what you see: since the .emacs
>file used was from the user ``that originally logged in'', you get the
>value of "", and (concat "~" init-file-user "/") will yield "~/", your
>home directory.
>
>I fixed the doc string to say "empty string", for more clarity.
>  
>
Thanks, sorry, I believe I should have understood that.

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

* Re: rogue option init-file-user
  2006-01-07  3:48 rogue option init-file-user Luc Teirlinck
  2006-01-07 14:01 ` Lennart Borgman
@ 2006-01-07 18:57 ` Richard M. Stallman
  2006-01-07 21:27   ` David Kastrup
  2006-01-07 23:29   ` Giorgos Keramidas
  1 sibling, 2 replies; 13+ messages in thread
From: Richard M. Stallman @ 2006-01-07 18:57 UTC (permalink / raw)
  Cc: emacs-devel

      It seems to me that to change this
    variable in a way that actually works, the user should use a command
    line option such as -q or -u.  Setting or saving it through Custom
    appears to make little sense.

What do others think?

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

* Re: rogue option init-file-user
  2006-01-07 18:57 ` Richard M. Stallman
@ 2006-01-07 21:27   ` David Kastrup
  2006-01-07 22:29     ` Luc Teirlinck
                       ` (2 more replies)
  2006-01-07 23:29   ` Giorgos Keramidas
  1 sibling, 3 replies; 13+ messages in thread
From: David Kastrup @ 2006-01-07 21:27 UTC (permalink / raw)
  Cc: Luc Teirlinck, emacs-devel

"Richard M. Stallman" <rms@gnu.org> writes:

>       It seems to me that to change this
>     variable in a way that actually works, the user should use a command
>     line option such as -q or -u.  Setting or saving it through Custom
>     appears to make little sense.
>
> What do others think?

I think that in the long run, it should be possible to save
customizations in several different files.  When loading customization
files, some variable property would keep track where to save changes
for that variable.  This property would be set to user-init-file for
custom-file by default.

However, that's not something to think about before the release, I
guess.  Short of that, I'd take custom-file out of customize for now,
and just make it a defvar.

I don't think a separate command line option is necessary.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: rogue option init-file-user
  2006-01-07 21:27   ` David Kastrup
@ 2006-01-07 22:29     ` Luc Teirlinck
  2006-01-07 22:32     ` Luc Teirlinck
  2006-01-07 22:49     ` Luc Teirlinck
  2 siblings, 0 replies; 13+ messages in thread
From: Luc Teirlinck @ 2006-01-07 22:29 UTC (permalink / raw)
  Cc: rms, emacs-devel

I believe that there is some confusion here.  We already decided in an
earlier discussion what to do with custom-file (at least in as far
Emacs 22 is concerned.)  `user-init-file' is currently not
customizable (and probably should not be either).

The present discussion concerns `init-file-user'.  This is a (to me)
internal variable which determines which user's init file is read.
The current defcustom seems to invite the user to specify some value
in the custom-set-variables form in his init file.  But when and if
Emacs is actually going to read that customization, it has already
decided which user's init file to read.  So it has no effect.

The user should specify which init file to read using a command line
option, such as -q or -u.  After that, it is too late.

Sincerely,

Luc.

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

* Re: rogue option init-file-user
  2006-01-07 21:27   ` David Kastrup
  2006-01-07 22:29     ` Luc Teirlinck
@ 2006-01-07 22:32     ` Luc Teirlinck
  2006-01-07 23:29       ` David Kastrup
  2006-01-07 22:49     ` Luc Teirlinck
  2 siblings, 1 reply; 13+ messages in thread
From: Luc Teirlinck @ 2006-01-07 22:32 UTC (permalink / raw)
  Cc: rms, emacs-devel

David Kastrup wrote:

   I don't think a separate command line option is necessary.

There currently _are_ such command line options: -q, -Q and -u.
To me, their necessity would not seem to be in doubt.

But again, I believe that you are talking about the wrong variable.

Sincerely,

Luc.

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

* Re: rogue option init-file-user
  2006-01-07 21:27   ` David Kastrup
  2006-01-07 22:29     ` Luc Teirlinck
  2006-01-07 22:32     ` Luc Teirlinck
@ 2006-01-07 22:49     ` Luc Teirlinck
  2 siblings, 0 replies; 13+ messages in thread
From: Luc Teirlinck @ 2006-01-07 22:49 UTC (permalink / raw)
  Cc: rms, emacs-devel

   I don't think a separate command line option is necessary.

To completely avoid confusion:  I am _not_ asking for a new command
line option.  My argument is that the user should use one of the
_existing_ ones if he wants no init file to be read (-q or -Q) or
if he wants another user's init file to be read (-u).

Trying to do it in his custom-set-variables form is not going to work
anyway.  All it could possibly do is confuse Emacs.

Sincerely,

Luc.

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

* Re: rogue option init-file-user
  2006-01-07 22:32     ` Luc Teirlinck
@ 2006-01-07 23:29       ` David Kastrup
  0 siblings, 0 replies; 13+ messages in thread
From: David Kastrup @ 2006-01-07 23:29 UTC (permalink / raw)
  Cc: rms, emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> David Kastrup wrote:
>
>    I don't think a separate command line option is necessary.
>
> There currently _are_ such command line options: -q, -Q and -u.
> To me, their necessity would not seem to be in doubt.
>
> But again, I believe that you are talking about the wrong variable.

Apparently.  Sorry for the confusion.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: rogue option init-file-user
  2006-01-07 18:57 ` Richard M. Stallman
  2006-01-07 21:27   ` David Kastrup
@ 2006-01-07 23:29   ` Giorgos Keramidas
  2006-01-09  0:51     ` Richard M. Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Giorgos Keramidas @ 2006-01-07 23:29 UTC (permalink / raw)
  Cc: Luc Teirlinck, emacs-devel

On 2006-01-07 13:57, "Richard M. Stallman" <rms@gnu.org> wrote:
>     It seems to me that to change this variable in a way that actually
>     works, the user should use a command line option such as -q or -u.
>     Setting or saving it through Custom appears to make little sense.
>
> What do others think?

I agree it makes little sense.  In several systems I use 'task based'
accounts, i.e.:

    keramida@flame:/home/keramida$ ls -l /home
    total 18
    drwxrwxr-x   6 build     build     -  512 Jan  3 07:51 build
    drwxrwxr-x   7 root      cvs       -  512 Oct 23 05:34 cvs
    drwxr-xr-x  46 keramida  keramida  - 2560 Jan  8 01:19 keramida
    drwx------   8 root      wheel     - 2048 Nov  3 03:35 lost+found
    drwxr-xr-x  15 ncvs      ncvs      - 1024 Jan  6 22:04 ncvs
    drwxrwxr-x   2 root      svn       -  512 Oct 23 05:09 svn
    keramida@flame:/home/keramida$

Even in setups like this one, where I may find myself typing:

    keramida$ sudo -i -u ncvs
    ncvs$ emacs -u keramida

to share a common startup file, it makes little sense to customize the
init-file-user.  Let's say that I'm logged in as `ncvs' and I customize
`init-file-user' to "keramida".  Where will it be saved?  Saving it in
~keramida/.emacs may not be possible, because I don't have write
permissions when I'm logged in as `ncvs'.  Saving it to ~ncvs/.emacs
will probably fail to load the next time I start Emacs with -u keramida.

I don't see how making this customizable can work, so Luc is right IMHO.

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

* Re: rogue option init-file-user
  2006-01-07 15:12   ` Eli Zaretskii
  2006-01-07 15:39     ` Lennart Borgman
@ 2006-01-08 14:47     ` Richard M. Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Richard M. Stallman @ 2006-01-08 14:47 UTC (permalink / raw)
  Cc: lennart.borgman.073, teirllm, emacs-devel

    With the possible exception of the term ``null string'' (which really
    means an empty string)

"Null string" is another name for "empty string",
but I don't mind if we use the latter.

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

* Re: rogue option init-file-user
  2006-01-07 23:29   ` Giorgos Keramidas
@ 2006-01-09  0:51     ` Richard M. Stallman
  0 siblings, 0 replies; 13+ messages in thread
From: Richard M. Stallman @ 2006-01-09  0:51 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

Luc, unless someone shows (within some days) a good reason to want to
customize init-file-user, please change it to a defvar.

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

end of thread, other threads:[~2006-01-09  0:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-07  3:48 rogue option init-file-user Luc Teirlinck
2006-01-07 14:01 ` Lennart Borgman
2006-01-07 15:12   ` Eli Zaretskii
2006-01-07 15:39     ` Lennart Borgman
2006-01-08 14:47     ` Richard M. Stallman
2006-01-07 18:57 ` Richard M. Stallman
2006-01-07 21:27   ` David Kastrup
2006-01-07 22:29     ` Luc Teirlinck
2006-01-07 22:32     ` Luc Teirlinck
2006-01-07 23:29       ` David Kastrup
2006-01-07 22:49     ` Luc Teirlinck
2006-01-07 23:29   ` Giorgos Keramidas
2006-01-09  0:51     ` Richard M. 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).