all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Custom question: different default values for different environments?
@ 2003-04-27 13:05 Kai Großjohann
  2003-04-28 23:38 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-04-27 13:05 UTC (permalink / raw)


There is a defcustom tramp-methods which is a long (nested) list.  Its
default value contains "rsh" on most systems, but "remsh" on some
systems.

Now if people use Customize to change the variable, then ~/.emacs
will contain rsh or remsh.

Now if these people use the same ~/.emacs on another system, the
variable might contain the wrong entry for that system.

How to deal with this situation?

I'm guessing that the right strategy is not to deal with it at all,
because other variables in Emacs have the same problem, and adding
workarounds for such things just doesn't make sense.

(For example, load-path contains the Emacs version, so after
upgrading Emacs the value saved by Custom will be bad.)

Opinions?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

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

* Re: Custom question: different default values for different environments?
  2003-04-27 13:05 Custom question: different default values for different environments? Kai Großjohann
@ 2003-04-28 23:38 ` Richard Stallman
  2003-04-29 15:40   ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2003-04-28 23:38 UTC (permalink / raw)
  Cc: emacs-devel

    There is a defcustom tramp-methods which is a long (nested) list.  Its
    default value contains "rsh" on most systems, but "remsh" on some
    systems.

The default value could be nil meaning "Use the proper default shell",
and that default could be stored in another variable which is initialized
based on the system type and not user-customizable.

I think that solves all the problems you mentioned.

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

* Re: Custom question: different default values for different environments?
  2003-04-28 23:38 ` Richard Stallman
@ 2003-04-29 15:40   ` Kai Großjohann
  2003-04-30  5:43     ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-04-29 15:40 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

>     There is a defcustom tramp-methods which is a long (nested) list.  Its
>     default value contains "rsh" on most systems, but "remsh" on some
>     systems.
>
> The default value could be nil meaning "Use the proper default shell",
> and that default could be stored in another variable which is initialized
> based on the system type and not user-customizable.
>
> I think that solves all the problems you mentioned.

I'm afraid I didn't tell the whole story.  (I didn't think it would
be relevant.)

Actually, nil already has a meaning, and the string can assume other
values besides "rsh"/"remsh": "ssh", "ssh1", "ssh2".  (Those occur in
the default value.)

After some discussion among the Tramp developers, it turns out that
it is probably best to just have two entries everywhere: one entry
mentioning rsh and another entry mentioning remsh.  This means that
users have to know whether their system uses rsh or remsh, but at
least Emacs does what they say.

-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

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

* Re: Custom question: different default values for different environments?
  2003-04-29 15:40   ` Kai Großjohann
@ 2003-04-30  5:43     ` Richard Stallman
  2003-04-30  8:19       ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2003-04-30  5:43 UTC (permalink / raw)
  Cc: emacs-devel

    After some discussion among the Tramp developers, it turns out that
    it is probably best to just have two entries everywhere: one entry
    mentioning rsh and another entry mentioning remsh.

Sorry, I do not understand what you are proposing.  Would you please
explain more clearly?

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

* Re: Custom question: different default values for different environments?
  2003-04-30  5:43     ` Richard Stallman
@ 2003-04-30  8:19       ` Kai Großjohann
  2003-05-01  3:20         ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-04-30  8:19 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

>     After some discussion among the Tramp developers, it turns out that
>     it is probably best to just have two entries everywhere: one entry
>     mentioning rsh and another entry mentioning remsh.
>
> Sorry, I do not understand what you are proposing.  Would you please
> explain more clearly?

Originally, I asked how to achieve a certain effect in defcustom.

Now the plan is to do something entirely different, and a side effect
of that plan is that the effect I originally asked about isn't needed
anymore.

The old plan was to allow the user to type filenames
"/rsh:user@host:bla" and the system would know whether to invoke rsh
or remsh.

The new plan is to require the user to type "/rsh:user@host:bla" if
rsh is to be invoked, and "/remsh:user@host:bla" if remsh is to be
invoked.

With the new plan, the file name corresponds to the Unix command being
used, and I guess that people are familiar with those names.

(Ideally, autodetection of the command to be used to contact the
remote host would be desirable.  But it takes a long time to try
several methods for connecting.  So users have to specify the command
in the file name.)

-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

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

* Re: Custom question: different default values for different environments?
  2003-04-30  8:19       ` Kai Großjohann
@ 2003-05-01  3:20         ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2003-05-01  3:20 UTC (permalink / raw)
  Cc: emacs-devel

    The new plan is to require the user to type "/rsh:user@host:bla" if
    rsh is to be invoked, and "/remsh:user@host:bla" if remsh is to be
    invoked.

I won't argue against it.

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

end of thread, other threads:[~2003-05-01  3:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-27 13:05 Custom question: different default values for different environments? Kai Großjohann
2003-04-28 23:38 ` Richard Stallman
2003-04-29 15:40   ` Kai Großjohann
2003-04-30  5:43     ` Richard Stallman
2003-04-30  8:19       ` Kai Großjohann
2003-05-01  3:20         ` Richard Stallman

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.