unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>,
	Eli Zaretskii <eliz@gnu.org>,
	64516@debbugs.gnu.org, jao@gnu.org
Subject: bug#64516: [PATCH] docview: Only enable imenu when supported
Date: Fri, 28 Jul 2023 12:19:20 +0200	[thread overview]
Message-ID: <87bkfwtjtu.fsf@gnu.org> (raw)
In-Reply-To: <87edksfimh.fsf@epfl.ch>

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

>> diff --git a/lisp/doc-view.el b/lisp/doc-view.el
>> index b14655fb274..847601872f5 100644
>> --- a/lisp/doc-view.el
>> +++ b/lisp/doc-view.el
>> @@ -147,6 +147,8 @@
> [...]
>> +          (unless (= 0 (call-process "mutool" nil (current-buffer) nil "show" fn "outline"))
>> +            (imenu-unavailable-error "Unable to create imenu index using `mutool'"))
>
> Is call-process guaranteed to return a number?
> Would eq/l be more suitable than =?

Good question, the docs say:

  If DESTINATION is 0, ‘call-process’ returns immediately with value nil.
  Otherwise it waits for PROGRAM to terminate
  and returns a numeric exit status or a signal description string.

I guess if mutool is killed externally while emacs runs it, it could be
such a "signal description string" in which case eql would be better
even though that situation seems unlikely.  I'll change that later.

Thanks for the heads-up,
Tassilo





  reply	other threads:[~2023-07-28 10:19 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87bkfwtjtu.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=64516@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    --cc=contovob@tcd.ie \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).