From: Tassilo Horn <tsdh@gnu.org>
To: Morgan Smith <Morgan.J.Smith@outlook.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 64516@debbugs.gnu.org, jao@gnu.org
Subject: bug#64516: [PATCH] docview: Only enable imenu when supported
Date: Sun, 16 Jul 2023 17:24:31 +0200 (GMT+02:00) [thread overview]
Message-ID: <04eb26ce-b33f-4ebf-9d9d-f1846fead2ed@gnu.org> (raw)
In-Reply-To: <CY4PR03MB31596889DE75A0B0591ACDDFC53AA@CY4PR03MB3159.namprd03.prod.outlook.com>
Hi Morgan,
my reasoning was to have an explanation in the *Messages* buffer for people who ask themselves "where the heck is the Outline menu item"? If it's done by condition-case or with-demoted-errors doesn't really matter. Feel free to adapt it to your preference.
Thanks,
Tassilo
16.07.2023 17:03:05 Morgan Smith <Morgan.J.Smith@outlook.com>:
> Hello,
>
> First of all I'd like to apologize for dragging this out and missing
> some details. If I paid a little more attention this would likely be
> done by now :P
>
> Tassilo Horn <tsdh@gnu.org> writes:
>
>> Why do you ignore the error altogether?
>
> So we have 3 scenarios: mutool not installed, mutool failed, and mutool
> is successful.
>
> Your patch would send a message on setup when mutool fails, but would
> not say anything in the other two scenarios.
>
> My patch would be silent on setup.
>
> Both patches would give the user an error if they actually try to use
> imenu.
>
> In my opinion, we should either be completely silent (on setup) or send a message
> when imenu is set up correctly. If you wanted to send a message when it
> fails I would accept that, but maybe we should consider also sending the
> message when mutool is not installed.
>
>
> Also, we have a macro 'with-demoted-errors' but we are missing a
> 'with-demoted-error' macro that lets you specify what error to demote.
> It would be cool if you converted this part of your patch into a
> definition of a 'with-demoted-error' macro.
>
>
> --8<---------------cut here---------------start------------->8---
> + (condition-case imenu-error
> + (doc-view-imenu-setup)
> + (imenu-unavailable (message "imenu support unavailable: %s"
> + (cadr imenu-error))))
> --8<---------------cut here---------------end--------------->8---
next prev parent reply other threads:[~2023-07-16 15:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 15:24 bug#64516: [PATCH] docview: Only enable imenu when supported Morgan Smith
2023-07-07 15:40 ` Morgan Smith
2023-07-07 16:05 ` Morgan Smith
2023-07-08 9:14 ` Eli Zaretskii
2023-07-09 8:13 ` Tassilo Horn
2023-07-11 17:49 ` Morgan Smith
2023-07-11 18:22 ` Morgan Smith
2023-07-15 8:05 ` Eli Zaretskii
2023-07-15 18:39 ` Tassilo Horn
2023-07-15 23:50 ` Morgan Smith
2023-07-16 4:39 ` Tassilo Horn
2023-07-16 15:03 ` Morgan Smith
2023-07-16 15:24 ` Tassilo Horn [this message]
2023-07-18 18:40 ` Morgan Smith
2023-07-18 19:14 ` Tassilo Horn
2023-07-20 16:05 ` Eli Zaretskii
2023-07-28 10:14 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-28 10:19 ` Tassilo Horn
2023-07-28 11:22 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-11 18:28 ` 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=04eb26ce-b33f-4ebf-9d9d-f1846fead2ed@gnu.org \
--to=tsdh@gnu.org \
--cc=64516@debbugs.gnu.org \
--cc=Morgan.J.Smith@outlook.com \
--cc=eliz@gnu.org \
--cc=jao@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.