From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Bug in orgalist mode's advice on indent-according-to-mode
Date: Wed, 27 Apr 2022 22:32:40 -0700 [thread overview]
Message-ID: <87czh1g4cn.fsf@ericabrahamsen.net> (raw)
In Emacs commit f596f0db82c0b1ff3fe8e8f1d8b07d2fe7504ab6, from Nov 2021,
the function `indent-according-to-mode' was given an optional
inhibit-widen argument. That argument being passed causes orgalist's
advice to fail, as the lambda doesn't accept any additional arguments.
One way to fix it would be like that:
(unless (advice-member-p 'orgalist-fix-bug:31361 'indent-according-to-mode)
(advice-add 'indent-according-to-mode
:around (lambda (old &optional inhibit-widen)
"Workaround bug#31361."
(or (orgalist--indent-line)
(let ((indent-line-function
(advice--cd*r indent-line-function)))
(funcall old inhibit-widen))))
'((name . orgalist-fix-bug:31361)))))
Or I suppose a more future-proof approach might be to use a &rest and
then `apply' instead of `funcall'.
Eric
next reply other threads:[~2022-04-28 5:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 5:32 Eric Abrahamsen [this message]
2022-04-28 6:06 ` Bug in orgalist mode's advice on indent-according-to-mode Tim Cross
2022-04-28 15:39 ` Eric Abrahamsen
2022-05-09 15:18 ` Eric Abrahamsen
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=87czh1g4cn.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-orgmode@gnu.org \
/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.