unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: "Garreau\, Alexandre" <galex-713@galex-713.eu>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: xdg.el and eww custom load
Date: Thu, 01 Nov 2018 18:54:22 +0000	[thread overview]
Message-ID: <8736sktyqp.fsf@tcd.ie> (raw)
In-Reply-To: <87o9b8etiw.fsf@portable.galex-713.eu> (Garreau, Alexandre's message of "Thu, 1 Nov 2018 15:56:07 +0100")

"Garreau, Alexandre" <galex-713@galex-713.eu> writes:

> Le 01/11/2018 à 14h29, Basil L. Contovounesios a écrit :
>> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>>> On 2018-10-31 at 12:41, Basil L. Contovounesios wrote:
>>>>>> But you wouldn't want to use this to set the value of
>>>>>> eww-download-directory in its defcustom declaration
>>>>>
>>>>> Why so?
>>>>
>>>> Simply loading a package should have as few effects and be as fast as
>>>> possible.  Think, for example, of loading eww.el for the purposes of
>>>> testing on various environments both local and remote.  I'm sure there
>>>> are more serious dangers than I'm letting on.
>>>
>>> But getting incorrect behavior is bad as well…
>>> Parameters/customizations are here for something, and enforcing a
>>> broken (I mean unrelevant, disadapted, arbitrary) default to the user,
>>> or require them to (arbitrarily and statically) replicate some external
>>> config (user dirs) into their custom emacs config seems wrong toward
>>> this, to me.
>>
>> I never said the default can't be improved; I merely cautioned against
>> invoking a subprocess in a defcustom.  Obviously there are several
>> workarounds for this, e.g. by predicating some representative value on
>> the result of executable-find, as per mm-url-program. in
>> lisp/gnus/mm-url.el.
>
> I don’t understand how this is a workaround: they just store a command
> name as is.  and call it later.

It defers invoking a subprocess until it is actually needed, rather than
during evaluation of a defcustom.

> But we don’t want to call the command each time we save something, do
> we?

I don't see why the result can't be saved for subsequent reuse.

> And if so what to do with `eww-download-directory'?  obsolete it to
> replace it with a same-name function?

I don't see what would make it obsolete.

>>>>> Wow that’s awesome: replacing .emacs.d with something following xdg (why
>>>>> not .config/emacs/?) so to cleanse home, I’ve dreamt it (I also dreamt
>>>>> of an “external” customization method for defcustom where it would go
>>>>> get its default or saved custom values from external non-elisp files
>>>>> instead (or exteral programs), such as the xdg ones), but procrastinated
>>>>> to suggest it.  He did it.
>>>
>>> So that still applies?
>>
>> I don't know what you're referring to.
>
> To previous paragraph: suggesting to do that instead of .emacs/.emacs.d
> in ~.
>
> So in the end your config is in .config/emacs/*.el (or
> .config/emacs.el), your data is in .local/share/emacs/, etc.  And your
> home is less bloated, and users are more aware of where are canonical
> programs config and data as they’re all in the same place (that ought to
> be uniformized with other windows programs behavior, of course).
>
> Since it hasn’t been implemented it is still time to suggest it.

Sure, you can always revive the aforementioned emacs-devel thread.

-- 
Basil



  reply	other threads:[~2018-11-01 18:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 19:54 Automatically set eww-download-directory according xdg dir Garreau, Alexandre
2018-10-29 20:08 ` `call-process', to a string [Was: Re: Automatically set eww-download-directory according xdg dir] Garreau, Alexandre
2018-10-29 20:37   ` `with-temp-buffer', `with-output-to-string': `with-temp-buffer-to-string' / `with-current-buffer-to-string' [Was: Re: `call-process', to a string] Garreau, Alexandre
2018-10-30  2:26     ` Basil L. Contovounesios
2018-10-30  2:25   ` `call-process', to a string [Was: Re: Automatically set eww-download-directory according xdg dir] Basil L. Contovounesios
2018-10-30  3:59     ` `call-process', to a string Garreau, Alexandre
2018-10-30  7:19     ` `call-process', to a string [Was: Re: Automatically set eww-download-directory according xdg dir] Eli Zaretskii
2018-10-30 10:21       ` `call-process', to a string Garreau, Alexandre
2018-10-30 11:10         ` Eli Zaretskii
2018-10-30 11:32           ` Garreau, Alexandre
2018-10-30 12:32             ` Eli Zaretskii
2018-10-30 13:46               ` Garreau, Alexandre
2018-10-31 12:44       ` `call-process', to a string [Was: Re: Automatically set eww-download-directory according xdg dir] Basil L. Contovounesios
2018-10-30  6:57   ` Eli Zaretskii
2018-10-30  2:25 ` Automatically set eww-download-directory according xdg dir Basil L. Contovounesios
2018-10-30  3:57   ` xdg.el and eww custom load [Was: Re: Automatically set eww-download-directory according xdg dir] Garreau, Alexandre
2018-10-31 12:41     ` Basil L. Contovounesios
2018-10-31 22:52       ` Garreau, Alexandre
2018-11-01 14:29         ` Basil L. Contovounesios
2018-11-01 14:56           ` xdg.el and eww custom load Garreau, Alexandre
2018-11-01 18:54             ` Basil L. Contovounesios [this message]
2018-10-30  7:16   ` Automatically set eww-download-directory according xdg dir Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736sktyqp.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=galex-713@galex-713.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).