all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Adam Porter <adam@alphapapa.net>
Cc: 71883@debbugs.gnu.org, Ship Mints <shipmints@gmail.com>,
	Joseph Turner <joseph@breatheoutbreathe.in>
Subject: bug#71883: [PATCH] Fix tab-bar-auto-width with customized tab-bar-tab-face-function
Date: Thu, 04 Jul 2024 20:57:23 +0300	[thread overview]
Message-ID: <86o77dox54.fsf@mail.linkov.net> (raw)
In-Reply-To: <af1df2fc-bc57-46fd-8ea2-c48aa799a2ec@alphapapa.net> (Adam Porter's message of "Wed, 3 Jul 2024 14:50:24 -0500")

>>>> Probably this is not needed after implementing a variable with
>>>> a predicate function, since it could be set to 'always' to return t.
>>>> Then activities.el could set this to a function that checks for a symbol.
>>>
>>> If it seems appropriate, I'd suggest using a list of predicate functions,
>>> which could be used with `run-hook-with-args-until-success'. That way there
>>> wouldn't be any contention with other libraries which also wanted to set
>>> that function.
>> Would you agree to use add-function instead?  For example, in tab-bar.el:
>>    (defvar tab-bar-auto-width-predicate #'tab-bar-auto-width-faces)
>> Then in activities.el you could use:
>>    (add-function :after-while tab-bar-auto-width-predicate
>> activities-predicate)
>
> Isn't advice generally intended for users to use in their configs, rather
> than for libraries to use?  If we have here an opportunity to design an API
> that is extensible by multiple libraries, wouldn't that be preferable to
> asking downstream libraries to apply multiple levels of advice and the
> problems that would raise?
>
> IOW, what would the problem be with using
> `run-hook-with-args-until-success' on a list of functions?  If there is
> one, I must be missing something.  :)

Advice is intended for users and external libraries.
Only in core it should be avoided.

But `run-hook-with-args-until-success' is fine with me too.

Let's see what Joseph and Stephane think.





  reply	other threads:[~2024-07-04 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 20:42 bug#71883: [PATCH] Fix tab-bar-auto-width with customized tab-bar-tab-face-function Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-02  6:55 ` Juri Linkov
2024-07-02 13:42   ` Ship Mints
2024-07-02 16:25   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-02 17:34     ` Juri Linkov
2024-07-02 23:10       ` Adam Porter
2024-07-03  6:27         ` Juri Linkov
2024-07-03 19:50           ` Adam Porter
2024-07-04 17:57             ` Juri Linkov [this message]
2024-07-04 21:11               ` Ship Mints
2024-07-16  5:12               ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17 11:18                 ` 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=86o77dox54.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=71883@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=joseph@breatheoutbreathe.in \
    --cc=shipmints@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.