[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64516: [PATCH] docview: Only enable imenu when supported
From: |
Tassilo Horn |
Subject: |
bug#64516: [PATCH] docview: Only enable imenu when supported |
Date: |
Sun, 16 Jul 2023 17:24:31 +0200 (GMT+02:00) |
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---
- bug#64516: [PATCH] docview: Only enable imenu when supported, (continued)
- bug#64516: [PATCH] docview: Only enable imenu when supported, Eli Zaretskii, 2023/07/08
- bug#64516: [PATCH] docview: Only enable imenu when supported, Tassilo Horn, 2023/07/09
- bug#64516: [PATCH] docview: Only enable imenu when supported, Morgan Smith, 2023/07/11
- bug#64516: [PATCH] docview: Only enable imenu when supported, Morgan Smith, 2023/07/11
- bug#64516: [PATCH] docview: Only enable imenu when supported, Eli Zaretskii, 2023/07/15
- bug#64516: [PATCH] docview: Only enable imenu when supported, Tassilo Horn, 2023/07/15
- bug#64516: [PATCH] docview: Only enable imenu when supported, Morgan Smith, 2023/07/15
- bug#64516: [PATCH] docview: Only enable imenu when supported, Tassilo Horn, 2023/07/16
- bug#64516: [PATCH] docview: Only enable imenu when supported, Morgan Smith, 2023/07/16
- bug#64516: [PATCH] docview: Only enable imenu when supported,
Tassilo Horn <=
- bug#64516: [PATCH] docview: Only enable imenu when supported, Morgan Smith, 2023/07/18
- bug#64516: [PATCH] docview: Only enable imenu when supported, Tassilo Horn, 2023/07/18
- bug#64516: [PATCH] docview: Only enable imenu when supported, Eli Zaretskii, 2023/07/20
- bug#64516: [PATCH] docview: Only enable imenu when supported, Basil L. Contovounesios, 2023/07/28
- bug#64516: [PATCH] docview: Only enable imenu when supported, Tassilo Horn, 2023/07/28
- bug#64516: [PATCH] docview: Only enable imenu when supported, Basil L. Contovounesios, 2023/07/28
- bug#64516: [PATCH] docview: Only enable imenu when supported, Eli Zaretskii, 2023/07/11