all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: ELPA: add lin.el
Date: Sat, 06 Nov 2021 06:55:49 +0200	[thread overview]
Message-ID: <87pmrdkhm2.fsf@protesilaos.com> (raw)
In-Reply-To: <CADwFkmmCzY0WLLzuQyX7XizBtSeBreF7LmtheamBQ_SED69VJw@mail.gmail.com>

On 2021-11-05, 13:28 -0700, Stefan Kangas <stefankangas@gmail.com> wrote:

> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>> The user can enable 'lin-mode' in select major modes to have a more
>> intense (or just different) style for the highlighted line of
>> 'hl-line-mode', without compromising the utility of the 'hl-line' face
>> in all other buffers.
>
> This looks useful, thanks.  My question is: why make it into a
> third-party package instead of a patch against hl-line.el?

The package has the upside that it can be used right away.  Whereas
changes in Emacs 29 will have to be followed by changes to all relevant
downstream packages that need to style hl-line accordingly (I know of
Elfeed, Mu4e, Notmuch).

I suggest we do both: let the package exist and also patch hl-line.el.

> I imagine that we could introduce a new permanently local defvar that
> users (or even mode developers?) could set in individual modes.  If
> that variable is non-nil, these faces are used instead of the default
> ones.  We could also have a defcustom that disables this completely (I
> think it should be on by default, but we can bikeshed that later).
>
> We could also just include the mode of course, if we think that's the
> better interface.  I sort of like the variables, as that allows modes to
> "register" themselves as interesting for this purpose, and the user to
> completely disable the functionality if they don't like it by setting a
> defcustom.  (Instead of all users having tons of mode-hooks in their
> configuration for each and every little mode where this could make
> sense.)
>
> What do you think?

I think having major modes register themselves in that way is the best
outcome.  The presence of a separate minor-mode/package is just a way to
work around the current constraints.

-- 
Protesilaos Stavrou
https://protesilaos.com



  reply	other threads:[~2021-11-06  4:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 19:29 ELPA: add lin.el Protesilaos Stavrou
2021-11-05 20:28 ` Stefan Kangas
2021-11-06  4:55   ` Protesilaos Stavrou [this message]
2021-11-06  6:12     ` Stefan Kangas
2021-11-09 19:46 ` Protesilaos Stavrou
2021-11-09 20:15   ` Stefan Monnier
2021-11-09 20:38     ` Protesilaos Stavrou
2021-11-10 14:14     ` Semantic hl-line-mode (was: ELPA: add lin.el) Protesilaos Stavrou
2021-11-10 14:33       ` Eli Zaretskii
2021-11-10 14:53         ` Stefan Kangas
2021-11-10 16:53           ` Protesilaos Stavrou
2021-11-13 15:06             ` 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

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

  git send-email \
    --in-reply-to=87pmrdkhm2.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    /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 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.