all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Downgrade custom-theme-load-path into a defvar
@ 2015-10-07 18:23 Artur Malabarba
  2015-10-08  3:46 ` John Wiegley
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-10-07 18:23 UTC (permalink / raw)
  To: emacs-devel

`custom-theme-load-path' is a defcustom, but setting it via the
customize interface is a trap for the user. Because installed themes
commonly add themselves to this variable, its value is not fit for
being saved (because it will permanently remember dirs that don't
exist anymore).
This is aggravated by the fact that Emacs always applies the `user'
theme on top of any theme that's loaded, since this will remove apply
the old's variable value and remove any new directories that had been
added by themes themselves.

For an instance of the problem in the wild, see
http://emacs.stackexchange.com/q/2112/50

I'd like to downgrade this defcustom into a defvar, so that users
cannot customize it by accident. It should not be a defcustom in the
same way that load-path isn't.

Would anyone object?


Best,
Artur



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

* Re: Downgrade custom-theme-load-path into a defvar
  2015-10-07 18:23 Downgrade custom-theme-load-path into a defvar Artur Malabarba
@ 2015-10-08  3:46 ` John Wiegley
  2015-10-08  6:29   ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2015-10-08  3:46 UTC (permalink / raw)
  To: emacs-devel

>>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:

> I'd like to downgrade this defcustom into a defvar, so that users cannot
> customize it by accident. It should not be a defcustom in the same way that
> load-path isn't.

> Would anyone object?

What about having two load-paths, the way that we have
Info-default-directory-list, and Info-directory-list. The former is intended
to be customized and is not added to, while the second is derived from the
first initially, but possibly added to as Emacs runs.

John



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

* Re: Downgrade custom-theme-load-path into a defvar
  2015-10-08  3:46 ` John Wiegley
@ 2015-10-08  6:29   ` Artur Malabarba
  2015-10-08 16:21     ` John Wiegley
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-10-08  6:29 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Actually, we have that already.
It's a defcustom called custom-theme-directory. It only holds one
directory, and it is safe to be customised by the user.

On 8 Oct 2015 4:46 am, "John Wiegley" <johnw@newartisans.com> wrote:
>
> >>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>
> > I'd like to downgrade this defcustom into a defvar, so that users cannot
> > customize it by accident. It should not be a defcustom in the same way
that
> > load-path isn't.
>
> > Would anyone object?
>
> What about having two load-paths, the way that we have
> Info-default-directory-list, and Info-directory-list. The former is
intended
> to be customized and is not added to, while the second is derived from the
> first initially, but possibly added to as Emacs runs.
>
> John
>

[-- Attachment #2: Type: text/html, Size: 1082 bytes --]

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

* Re: Downgrade custom-theme-load-path into a defvar
  2015-10-08  6:29   ` Artur Malabarba
@ 2015-10-08 16:21     ` John Wiegley
  2015-10-09 17:46       ` Kaushal Modi
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2015-10-08 16:21 UTC (permalink / raw)
  To: emacs-devel

>>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:

> Actually, we have that already. 
> It's a defcustom called custom-theme-directory. It only holds one directory,
> and it is safe to be customised by the user. 

In that case, changing the other defcustom to defvar sounds like the right
change.

John



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

* Re: Downgrade custom-theme-load-path into a defvar
  2015-10-08 16:21     ` John Wiegley
@ 2015-10-09 17:46       ` Kaushal Modi
  0 siblings, 0 replies; 5+ messages in thread
From: Kaushal Modi @ 2015-10-09 17:46 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

We had one more question like that today:
http://emacs.stackexchange.com/q/17256/115


--
Kaushal Modi

On Thu, Oct 8, 2015 at 12:21 PM, John Wiegley <johnw@newartisans.com> wrote:

> >>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>
> > Actually, we have that already.
> > It's a defcustom called custom-theme-directory. It only holds one
> directory,
> > and it is safe to be customised by the user.
>
> In that case, changing the other defcustom to defvar sounds like the right
> change.
>
> John
>
>

[-- Attachment #2: Type: text/html, Size: 1287 bytes --]

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

end of thread, other threads:[~2015-10-09 17:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 18:23 Downgrade custom-theme-load-path into a defvar Artur Malabarba
2015-10-08  3:46 ` John Wiegley
2015-10-08  6:29   ` Artur Malabarba
2015-10-08 16:21     ` John Wiegley
2015-10-09 17:46       ` Kaushal Modi

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.