unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Visuwesh <visuweshm@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, "Jose A. Ortega Ruiz" <jao@gnu.org>,
	73530@debbugs.gnu.org
Subject: bug#73530: [PATCH] Add imenu index function for Djvu files in doc-view
Date: Wed, 02 Oct 2024 08:42:49 +0200	[thread overview]
Message-ID: <875xqb2efq.fsf@gnu.org> (raw)
In-Reply-To: <87ikuddp8q.fsf@gmail.com> (Visuwesh's message of "Mon, 30 Sep 2024 22:59:25 +0530")

Visuwesh <visuweshm@gmail.com> writes:

Hi Visuwesh,

[Sorry if this message appears twice but it seems to have bounced
yesterday.]

> Please review the attached.

First of all, the patch doesn't apply on master's NEWS and misc.texi
here.  If I exclude those, the changes to doc-view.el can be applied.
Unfortunately, I didn't find a PDF nor DjVu document on my computer
where an index can be built.  I have the relevant tools installed but
get the message that no index can be built for that document and
doc-view--outline becomes 'unavailable.

I've tried various PDFs generated by LaTeX with many section,
subsections, etc.  For DjVu, my sample size is 1, and that's a
presentation, so at least here I'm not sure if there should be an index
available...

That said, I haven't used the imenu feature before so I can't say if it
ever worked for me...

> diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
> index e19e554fb26..332d5b1468f 100644
> --- a/doc/emacs/misc.texi
> +++ b/doc/emacs/misc.texi
> @@ -581,17 +581,14 @@ DocView Navigation
>  default size for DocView, customize the variable
>  @code{doc-view-resolution}.
>  
> -@vindex doc-view-imenu-enabled
>  @vindex doc-view-imenu-flatten
>  @vindex doc-view-imenu-format
> -  When the @command{mutool} program is available, DocView will use it
> -to generate entries for an outline menu, making it accessible via the
> -@code{imenu} facility (@pxref{Imenu}).  To disable this functionality
> -even when @command{mutool} can be found on your system, customize the
> -variable @code{doc-view-imenu-enabled} to the @code{nil} value.  You
> -can further customize how @code{imenu} items are formatted and
> -displayed using the variables @code{doc-view-imenu-format} and
> -@code{doc-view-imenu-flatten}.
> +  DocView can generate an outline menu for PDF and Djvu documents using

Didn't Eli say the official spelling was DjVu?  That's at least the
spelling that the djvused man pages also uses and they should know.

> +the @command{mutool} and the @command{djvused} programs respectively
> +when they are available.  This is made accessible via the
> @code{imenu} +facility (@pxref{Imenu}).  You can customize how
> @code{imenu} items are +formatted and displayed using the variables
> @code{doc-view-imenu-format} +and @code{doc-view-imenu-flatten}.

I guess you should mention the new defcustom doc-view-djvused-program
here, too.

> +(defcustom doc-view-imenu-enabled (and (or (executable-find "mutool")
> +                                           (executable-find "djvused"))
> +                                       t)
> +  "Whether to generate imenu outline for PDF and Djvu files.
> +This uses \"mutool\" for PDF files and \"djvused\" for Djvu files."
>    :type 'boolean
> -  :version "29.1")
> +  :version "31.1")
> +(make-obsolete-variable 'doc-view-imenu-enabled
> +   "Imenu index is generated unconditionally, when available"
> +   "31.1")

Ah, I thought our last agreement was that we keep that variable (as
suggested by Jose) as it is used right now but make it possible to have
a value that tells to index only PDF or DjVu documents.

Well, I actually have no strong opinion here.  Technically, I like your
approach better because of its simplicity.  I would like to test with
some larger documents to see how long index building takes, though.

Anyhow, please write a complete sentence in the deprecation, so a dot at
the end.  And remove the comma.

Bye,
  Tassilo





  reply	other threads:[~2024-10-02  6:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-28 15:10 bug#73530: [PATCH] Add imenu index function for Djvu files in doc-view Visuwesh
2024-09-28 15:42 ` Eli Zaretskii
2024-09-28 17:02   ` Tassilo Horn
2024-09-28 17:35     ` Visuwesh
2024-09-28 17:53       ` Eli Zaretskii
2024-09-28 18:11       ` Tassilo Horn
2024-09-28 19:03         ` jao
2024-09-28 19:15           ` Tassilo Horn
2024-09-28 19:50             ` Jose A. Ortega Ruiz
2024-09-29 14:03               ` Tassilo Horn
2024-09-29 14:34                 ` Visuwesh
2024-09-29 16:20                   ` Tassilo Horn
2024-09-29 16:38                     ` Visuwesh
2024-09-29 17:15                       ` Tassilo Horn
2024-09-30 17:29                         ` Visuwesh
2024-10-02  6:42                           ` Tassilo Horn [this message]
2024-10-02  8:19                             ` Visuwesh
2024-10-02 14:53                               ` Tassilo Horn
2024-10-03  8:03                                 ` Tassilo Horn
2024-10-03 11:10                                   ` Visuwesh
2024-10-03 12:11                                     ` Tassilo Horn
2024-10-03 14:51                                   ` Visuwesh
2024-10-04  5:31                                     ` Tassilo Horn
2024-10-04  7:31                                       ` Visuwesh

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=875xqb2efq.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=73530@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jao@gnu.org \
    --cc=visuweshm@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 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).