[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using "Emacs Configure" **and** modifying .emacs

From: Emanuel Berg
Subject: Re: Using "Emacs Configure" **and** modifying .emacs
Date: Sun, 13 Aug 2017 22:16:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

John Ankarström wrote:

> I don't think it's good to teach newcomers
> that `setq' is better, because many user
> options depend on custom setters that aren't
> fired by a simple `setq'. Customize is more
> portable and works with everything.

If I'm allowed to deliberately misunderstand,
nothing is more portable than the Lisp REPL,
which is why there are so many dialects of
Lisp :)

I don't think Customize should be recommended
for newcomers, as it is so frustrating and
unpleasant to deal with, to the point they
might never return for a second Emacs session,
thinking the whole software is like that.

>> (IMO, *no one* should use Customize, an even
>> better way to keep Customize away from their
>> init files.)
> I'll agree that the interface of Customize is
> a bit clunky, but it's a good way to learn
> what values are available for each option.

This aspect is confusing at best. Because it
should be apparent from the context if for
example the value associated with a variable
should be for example a string or an integer.

And step two should be even less a concern,
because all strings and digits should be valid!
(Not all strings or digits need to be
practical, of course. But people understand
this. They don't assign crazy values.)

So I never had any problem whatsoever with
"what values are available"!

If it (the variable) should take on a data
structure to be processed, that needs to be in
a specific form to work - say, a list of lists,
this should be explained and exemplified in the
docstring. Again, no problems!

For example, with `nnmail-split-methods', the
docstring says:

    Incoming mail will be split according to
    this variable.

    If you'd like, for instance, one mail group
    for mail from the "4ad-l" mailing list, one
    group for junk mail and one for everything
    else, you could do something like this:

        (setq nnmail-split-methods
              '(("mail.4ad" "From:.*4ad")
           ("mail.junk" "From:.*Lars\\|Subject:.*buy")
           ("mail.misc" "")))

    As you can see, this variable is a list of
    lists, where the first element in each
    "rule" is the name of the group (which, by
    the way, does not have to be called
    anything beginning with "mail", "yonka.zow"
    is a fine, fine name), and the second is
    a regexp that nnmail will try to match on
    the header to find a fit.

    The second element can also be a function.
    In that case, it will be called narrowed to
    the headers with the first element of the
    rule as the argument. It should return
    a non-nil value if it thinks that the mail
    belongs in that group.

    The last element should always have "" as
    the regexp.

    This variable can also have a function as
    its value, and it can also have a fancy
    split method as its value.
    See `nnmail-split-fancy' for an explanation
    of that syntax.

    You can customize this variable.

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]