From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 01:41:36 2022 Received: (at submit) by debbugs.gnu.org; 27 Sep 2022 05:41:36 +0000 Received: from localhost ([127.0.0.1]:52174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od3Lb-0006Ih-Lb for submit@debbugs.gnu.org; Tue, 27 Sep 2022 01:41:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:34914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od3LZ-0006IW-E0 for submit@debbugs.gnu.org; Tue, 27 Sep 2022 01:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od3LP-0001Vo-9J for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 01:41:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od3LM-0002sb-Jy; Tue, 27 Sep 2022 01:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=9M1fX7BSgR6pAb0IjXxzwamiWtmzQpkpmjuwk4VtxHk=; b=dR0AdYK3O6rNI8 s3cuZC7tT7Q1KDL2s2Cx8yfw8Yc0MUY5sJwaIgL368PQTx5CfJJo7vNrQPleQNjGY02YySnndXzWw n3KkcDl5srEBSxZlbOjDXFyZ0CNSkzIUGxEyz41e6DhxtyBkanPPzanh6yR+2d5IKpq+nEKkODcPF UOXI+8JKktKGJPoN4YHjFWriZDMU+WAbOd32VHgQVxBY4uFrY5NSOSOGwEx2N7z4q0aZaKgfmq3oN OKqyPYI0XFMN7Ej2VZbeJudmtmGvIpkZbSMkZWg0sT4v/qdtr3zh7ew/JqEkbnptDk6IM5kD9V8u0 7LhgELiKN2MZ87Et9PAw==; Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:50832 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od3LK-0004EL-Ju; Tue, 27 Sep 2022 01:41:20 -0400 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 59a6c927; Tue, 27 Sep 2022 05:41:14 +0000 (UTC) From: Jose A Ortega Ruiz To: bug-gnu-emacs@gnu.org Subject: [PATCH] docview: imenu access to table of contents X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Tue, 27 Sep 2022 06:41:14 +0100 Message-ID: <87r0zxz85h.fsf@mail.jao.io> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Tags: patch Hi, The patch below provides a quite simple implemetation of an imenu for doc-view, using mutool. That means of course that is limited to systems where it's installed, and doesn't try to be too smart, but it's been working quite well for me. It needs a slight tweak to imenu.el to add a knob inhibiting it to push all entries with submenus to the top, which doesn't make sense when those entries represent sections of a TOC. If this is acceptable (with any needed modification, of course), i guess we could also add a bit of further customization, like perhaps a "flat mode", or whether or not the section titles include page numbers, but i'm not sure if that's desired (in my usage, i never want either). Cheers, jao In GNU Emacs 29.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-09-26 built on rivendell Repository revision: adcdea5d159540aa09892f410bd3a5163eebecf2 Repository branch: master System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure -C --prefix=/usr/local/stow/pemacs --with-pgtk --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-docview-imenu-access-to-table-of-contents.patch >From 37d46e61a194c87293a2e4ed54495a9436bd5422 Mon Sep 17 00:00:00 2001 From: Jose A Ortega Ruiz Date: Tue, 27 Sep 2022 05:45:00 +0100 Subject: [PATCH] docview: imenu access to table of contents When mutool is available, use it to extract a table of contents of supported documents and make it available via imenu. * lisp/doc-view.el (doc-view-imenu-enabled): user option to disable imenu generation. * lisp/doc-view.el (doc-view--outline-rx): (doc-view--pdf-outline, doc-view--imenu-subtree, doc-view-imenu-index): functions implementing the imenu index generation via mutool. * lisp/doc-view.el (doc-view-imenu-setup, doc-view-mode): setup of the new functionality in doc-view mode. * lisp/imenu.el (imenu-submenus-on-top): (imenu--split-menu): new local variable to optionally inhibit grouping of entries with children at the top of imenu menus. * doc/emacs/misc.texi: documentation for the new functionality. --- doc/emacs/misc.texi | 7 +++++ lisp/doc-view.el | 71 ++++++++++++++++++++++++++++++++++++++++++++- lisp/imenu.el | 16 +++++++--- 3 files changed, 89 insertions(+), 5 deletions(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 10b44028bb..f3a6e6c33b 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -584,6 +584,13 @@ DocView Navigation default size for DocView, customize the variable @code{doc-view-resolution}. +@vindex doc-view-imenu-enabled + When the @command{mutool} executable is available, DocView will use +to generate entries for an outline menu, making it accessible via the +imenu facility (@pxref{Imenu}). To disable this functionality even +when @command{mutool} can be found in your @code{exec-path}, customize +the variable @code{doc-view-imenu-enabled}. + @node DocView Searching @subsection DocView Searching diff --git a/lisp/doc-view.el b/lisp/doc-view.el index fbd1427946..fe772efcfc 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -214,6 +214,11 @@ doc-view-mupdf-use-svg :type 'boolean :version "29.1") +(defcustom doc-view-imenu-enabled (and (executable-find "mutool") t) + "Whether to generate an imenu outline when mutool is available." + :type 'boolean + :version "29.1") + (defcustom doc-view-svg-background "white" "Background color for svg images. See `doc-view-mupdf-use-svg'." @@ -1874,6 +1879,69 @@ doc-view-search-previous-match (y-or-n-p "No more matches before current page. Wrap to last match? ")) (doc-view-goto-page (caar (last doc-view--current-search-matches))))))) +;;;; Imenu support +(defconst doc-view--outline-rx + "[^\t]+\\(\t+\\)\"\\(.+\\)\"\t#\\(?:page=\\)?\\([0-9]+\\)") + +(defun doc-view--pdf-outline (&optional file-name) + "Return a describing the outline of FILE-NAME (or current if nil). + +Each element in the list contains information about a section's +title, nesting level and page number. The list is flat: its tree +structure is extracted by `doc-view--imenu-subtree'." + (let* ((outline nil) + (fn (or file-name (buffer-file-name))) + (fn (shell-quote-argument (expand-file-name fn)))) + (with-temp-buffer + (insert (shell-command-to-string (format "mutool show %s outline" fn))) + (goto-char (point-min)) + (while (re-search-forward doc-view--outline-rx nil t) + (push `((level . ,(length (match-string 1))) + (title . ,(match-string 2)) + (page . ,(string-to-number (match-string 3)))) + outline))) + (nreverse outline))) + +(defun doc-view--imenu-subtree (outline act) + "Construct a tree of imenu items for the given outline list and action. + +This auxliary function constructs recursively all the items for +the first node in the outline and all its siblings at the same +level. Returns that imenu alist together with any other pending outline +entries at an upper level." + (let ((level (alist-get 'level (car outline))) + (index nil)) + (while (and (car outline) (<= level (alist-get 'level (car outline)))) + (let-alist (car outline) + (let ((title (format "%s (%s)" .title .page))) + (if (> .level level) + (let ((sub (doc-view--imenu-subtree outline act)) + (fst (car index))) + (setq index (cdr index)) + (push (cons (car fst) (cons fst (car sub))) index) + (setq outline (cdr sub))) + (push `(,title 0 ,act ,.page) index) + (setq outline (cdr outline)))))) + (cons (nreverse index) outline))) + +(defun doc-view-imenu-index (&optional file-name goto-page-fn) + "Create an imenu index using mutool to extract its outline. + +For extensibility, a FILE-NAME other than the current buffer and +a jumping function, GOTO-PAGE-FN other than `doc-view-goto-page' +can be specified." + (let* ((goto (or goto-page-fn 'doc-view-goto-page)) + (act (lambda (_name _pos page) (funcall goto page)))) + (car (doc-view--imenu-subtree (doc-view--pdf-outline file-name) act)))) + +(defun doc-view-imenu-setup () + "Set up local state in the current buffer for imenu, if needed." + (when (and doc-view-imenu-enabled (executable-find "mutool")) + (setq-local imenu-create-index-function #'doc-view-imenu-index + imenu-submenus-on-top nil + imenu-sort-function nil) + (imenu-add-to-menubar "Outline"))) + ;;;; User interface commands and the mode (put 'doc-view-mode 'mode-class 'special) @@ -2047,7 +2115,7 @@ doc-view-mode "Major mode in DocView buffers. DocView Mode is an Emacs document viewer. It displays PDF, PS -and DVI files (as PNG images) in Emacs buffers. +and DVI files (as PNG or SVG images) in Emacs buffers. You can use \\\\[doc-view-toggle-display] to toggle between displaying the document or editing it as text. @@ -2142,6 +2210,7 @@ doc-view-mode (setq mode-name "DocView" buffer-read-only t major-mode 'doc-view-mode) + (doc-view-imenu-setup) (doc-view-initiate-display) ;; Switch off view-mode explicitly, because doc-view-mode is the ;; canonical view mode for PDF/PS/DVI files. This could be diff --git a/lisp/imenu.el b/lisp/imenu.el index c407f501d6..bfc2429100 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -208,6 +208,13 @@ imenu-create-index-function See `imenu--index-alist' for the format of the buffer index alist.") +;;;###autoload +(defvar-local imenu-submenus-on-top t + "Flag specifiying whether items with sublists should be kept at top. + +For some indexes, such as those describing sections in a document, it +makes sense to keep their original order even in the menubar.") + ;;;###autoload (defvar-local imenu-prev-index-position-function 'beginning-of-defun "Function for finding the next index position. @@ -373,10 +380,11 @@ imenu--split-menu (if (memq imenu--rescan-item menulist) (setq keep-at-top (list imenu--rescan-item) menulist (delq imenu--rescan-item menulist))) - (dolist (item menulist) - (when (imenu--subalist-p item) - (push item keep-at-top) - (setq menulist (delq item menulist)))) + (if imenu-submenus-on-top + (dolist (item menulist) + (when (imenu--subalist-p item) + (push item keep-at-top) + (setq menulist (delq item menulist))))) (if imenu-sort-function (setq menulist (sort menulist imenu-sort-function))) (if (> (length menulist) imenu-max-items) -- 2.37.2 --=-=-= Content-Type: text/plain -- Give a man a fish and you feed him for a day. Write a program to fish for him and you maintain it for a lifetime. - Tim Hopper --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 07:53:46 2022 Received: (at 58103) by debbugs.gnu.org; 27 Sep 2022 11:53:46 +0000 Received: from localhost ([127.0.0.1]:53198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od99l-0006Nd-Q3 for submit@debbugs.gnu.org; Tue, 27 Sep 2022 07:53:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od99j-0006NJ-CV for 58103@debbugs.gnu.org; Tue, 27 Sep 2022 07:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dcrLLjL456enWZFE6SgwO8Nx0m+zmDOgS+7weU1n2Q8=; b=mluutbDXgUBXEsYC+PbIrvH9t7 AaEHt9n2wKoyGAlYcYe58+9kjZLyPFx7aa8J8h/Y8YzRIA/j8uLI6v0mVDF9+CA5msU9zwbBizeI7 zqci0RUsMGWc3xd9i7ObZvBGwnXpmT1nEE28/3DwKKBKVL6S5ClzTHS2oFhdjJKzN+Eg=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1od99a-0001Va-RS; Tue, 27 Sep 2022 13:53:37 +0200 From: Lars Ingebrigtsen To: Jose A Ortega Ruiz Subject: Re: bug#58103: [PATCH] docview: imenu access to table of contents In-Reply-To: <87r0zxz85h.fsf@mail.jao.io> (Jose A. Ortega Ruiz's message of "Tue, 27 Sep 2022 06:41:14 +0100") References: <87r0zxz85h.fsf@mail.jao.io> X-Now-Playing: Simon & Garfunkel's _Live From New York City, 1967_: "Sparrow" Date: Tue, 27 Sep 2022 13:53:30 +0200 Message-ID: <87k05p3uf9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Jose A Ortega Ruiz writes: > The patch below provides a quite simple implemetation of an imenu for > doc-view, using mutool. That means of course that is limited to systems > where it's installed, and doesn't try to be too smar [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58103 Cc: 58103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jose A Ortega Ruiz writes: > The patch below provides a quite simple implemetation of an imenu for > doc-view, using mutool. That means of course that is limited to systems > where it's installed, and doesn't try to be too smart, but it's been > working quite well for me.=20 Looks good to me; pushed to Emacs 29. (Using `let-alist' is pretty unusual, but I guess it's nice that somebody does -- there only seems to be two other usages in-tree in Emacs since this was added in 2014. =F0=9F=99=83) From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 07:53:51 2022 Received: (at control) by debbugs.gnu.org; 27 Sep 2022 11:53:51 +0000 Received: from localhost ([127.0.0.1]:53201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od99r-0006Nw-2Q for submit@debbugs.gnu.org; Tue, 27 Sep 2022 07:53:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od99o-0006NO-69 for control@debbugs.gnu.org; Tue, 27 Sep 2022 07:53:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/0pnybhP7UuMHSqTYsWS3SQd8NUxNyBCl+WJHPaMBYY=; b=Gwm+iDbw0f2oqi2HMj8wXRZVJB Bx+vpEdgZZ1vW0JDctWw5YnzmhUR9VnVfYj+XZlWnkq3we9O4vJTBonKqcUQVbSlXPqQushpu+0V+ Q0O1+80NANncFekrf9lurFDsWJwGMrMIUCqxjuUc1D6Iyh3krUZxxQUY9i+oVoDxiLxk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1od99g-0001Vk-9Z for control@debbugs.gnu.org; Tue, 27 Sep 2022 13:53:42 +0200 Date: Tue, 27 Sep 2022 13:53:39 +0200 Message-Id: <87ill93uf0.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #58103 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 58103 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 58103 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 12:18:55 2022 Received: (at 58103) by debbugs.gnu.org; 27 Sep 2022 16:18:55 +0000 Received: from localhost ([127.0.0.1]:56623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odDIN-0003mJ-IA for submit@debbugs.gnu.org; Tue, 27 Sep 2022 12:18:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odDIK-0003m3-HR for 58103@debbugs.gnu.org; Tue, 27 Sep 2022 12:18:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odDIE-00056v-Ld; Tue, 27 Sep 2022 12:18:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Qvput9Jwgm9B/tEXlEKV4OAtIKv46yn0RsEtq0duM28=; b=jZWgfAz79965LYjZOwa0 UiiuKODRdGcGVCVqZJ8r3DGzPqWe+xX3tyOHdEKFkBSLzEHRZQTodEZ37CWEdWU5JJoY9FfrtWG/4 WPrhBuoOeRmmBo06Qkg45TEyZGzUbfMNCIm09wPrvfgtk+DpUL7tXRWGPoFU1/RP9ko4Oh8h6saa/ f9NETOB6jxQKhQYYew7T8WKEXwZwdVFMzx6nab6A2+Ro3FGH9j/YqRSCOKi2k9P/1xt58UVMAcupm i0L7NwdWKfZb1S7yRPZY4xfq3NIScBlPY7Z2gNAIa389tcGuKHKCAO4BZzUD7VKzX1w5ssmXXh5Ex XQaU+cSQqc3tXg==; Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:42238 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odDID-0007By-FV; Tue, 27 Sep 2022 12:18:46 -0400 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id eda174c7; Tue, 27 Sep 2022 16:18:41 +0000 (UTC) From: Jose A Ortega Ruiz To: Lars Ingebrigtsen Subject: Re: bug#58103: [PATCH] docview: imenu access to table of contents In-Reply-To: <87k05p3uf9.fsf@gnus.org> References: <87r0zxz85h.fsf@mail.jao.io> <87k05p3uf9.fsf@gnus.org> X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Tue, 27 Sep 2022 17:18:41 +0100 Message-ID: <87fsgczt7i.fsf@mail.jao.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58103 Cc: 58103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Tue, Sep 27 2022, Lars Ingebrigtsen wrote: > Jose A Ortega Ruiz writes: > >> The patch below provides a quite simple implemetation of an imenu for >> doc-view, using mutool. That means of course that is limited to systems >> where it's installed, and doesn't try to be too smart, but it's been >> working quite well for me.=20 > > Looks good to me; pushed to Emacs 29. excellent, thanks a lot! > (Using `let-alist' is pretty unusual, but I guess it's nice that > somebody does -- there only seems to be two other usages in-tree in > Emacs since this was added in 2014. =F0=9F=99=83) i find it handy when the let body is small, otherwise it can make things harder to read. but i'm not specially attached to it if we prefer more idiomatic ways. cheers, jao From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 28 18:01:09 2022 Received: (at 58103) by debbugs.gnu.org; 28 Sep 2022 22:01:09 +0000 Received: from localhost ([127.0.0.1]:35085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odf76-000864-Qz for submit@debbugs.gnu.org; Wed, 28 Sep 2022 18:01:09 -0400 Received: from sonic313-21.consmr.mail.ir2.yahoo.com ([77.238.179.188]:46441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odf72-00085Q-1X for 58103@debbugs.gnu.org; Wed, 28 Sep 2022 18:01:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1664402458; bh=DpDf9+z9veX+NxdpaOON37q1sM4trsnxIsuaLdiEdw8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=sjsrxtDjixIc9pYWkVUL/16Zv1JZ5N+MhVZem5vDt8f1eM7ScsnfjY5pFv6mL9MRohfNA1QgGj+ZhbxVcgLdq/p7DZvYEKZBjfXpX3OnyYVKzgh561sLqA+FsgvJwT8g0AcVc8ikzMGvsl1KKdcQ+ia2FHspNtaqm+C5MPu1u7wuhlDlAXHuFnjt35QmYGVQ6ZOlPqGXRdTc0a24LtnNpa8g15zNGkwrpyjFwNKwdhvXCztG6M6eDe8JZqtntsNSK9vNn88QQoqKp1nTKw+N7j7fhE8haNXab2w2HtHAv5gYp7O6HGyqleVmGtFFTAbNmPcxUARzKclI3txehwfJBg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664402458; bh=ATmAzYDdql30wDcSUB8HqYtoi3hFqL36BcV0GlFwNQ7=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=jH42MkuhVQ+vm3auvHuy2RfViUDoScvaPGqnTaek1G1KSgQ3eGbr6YDcIBjzWl8NKtyhaw3qGaY/L8+EAn0HxbMPbN9bApCCA6stn95Ca0MmvjmDnWoQBzBn8h9dgKhFL6J8guK0GWnItmwq7yMq6w5p7HiqIry0fc5E8eL2DEOqE5/4wS3yFwmHgH36+LGKJcn8TxfmUOWGd1DnhDzLQIqHVhPaEMf8tJ0jsRh4UNJ+CEXAAduweHe9NtIlGf1XU91e3HNULDIMpSz69Nz5+OlRS8h5rNXcXubo4H5AiT/iqwb4fSadeccmglnBw24sNxyQS5RJGMTYzaXVaSOJQA== X-YMail-OSG: wxrZiDwVM1nTENBqjBEXu7yaBu.zFTyK9qDQMRUrHUFOsqOli1ki62gXNE2CJIC oN_8SYCI3V8TKodCgI8ktU8Wkc709hIl_kpi6IYGnVfdvyQrYADT.xj_DxF_BOx1zCts1bkEz7Oe rcwR.xXvkk1lXtxhCLl5ebXO3AR_9x84MOy8jupWX_N6xU0DSeaiR1Ijyrar093lBStwpStRoI2m ZVPujAFrcohJQ12O.vZlVXx1Lo3RIYs7l5OtXTwxrRcRhvBBPmz1Csg0_C_CU__cogxLGhWMirLg CFgMGUdcDSLzcsETdyildSR1jCa9FmnzaiNbL8bs2LfvzvBItBI1XHAv9k63_UPIMi4PPXuUpGis _RfKlGSMQrORQUaRyOdazqNOI1r6jCVneZ5CWI4hzIakvi1baGIePBZ_wl.UARAsMOpR.wfZss3D R._zuCv3YjVbGsGRGrFPM.tX80zceSkUqKDlH4i02Fr71Z53Is5eEKhyurhOkJDAhK1JKvDLAJHu fWT2TRDVUA5d4.GgLwZaYbS6QABQqu3eC0XBo_g8uMFrLo51qL5tAPNAwhCUnhCHJlC4u1_LZoIT hxW.0e1V9D.ICDqRnfBKcIUYHj82D7JJzcBA4n3Gd6a0M54EuCORjsr6G7dt48JuDWDEVXJe1ymm W2zrLJ6uPB_y9SHLTheewz1OKW.1WzEmC1.07c1AOoQivWX14VZy379CmOq5CFlF2Wtas.jlX2MN XRv2YXe4mVq3W237tqdcicddGXZSPk9tTRrbU7GJKn0FsFtskqLx9k.D7qV8J8eadcen5L1Lov6X 1zzM1H0Ox_BGl23yHcs_w9KANadJ3apgkbUO2TAj8SEJcDa0P1J3QYZ_f_JMzPK1uWE20a.m9nMz J7ah9k.VT42.M3E1S3aOhSfQw1PN2pdSjzC1xVtkKjIl.fKyZuvIiuhlGEQPZuSTId_Uf7jotDPz OD43WF3vo_NAhirPrauXjGL5BEpnjhi4XExGK3sS7_ett0uPmLCT_7f7vSzC8wmjdRfx2N9emCEp sqsop3vDopx23OwC0YwMwCI1ozcgH7bssgpL5HIIluIImKMCqgDHIkZJlCdeLONwiaXyE2i.DjST v.prEoVwnCGOc9i0rZtyefgl_IdNHqwwYJtpd9mcTsJ7kgMbOmbp_zWRC1mI_2aSabBYoPlla.AT 5eGdmSUOPwOxXca6rSM9akHvnVxIeLPfGwqCgxqHeG6WuLiDbPURTo7b74OTkqFA4OATtg3nVkJx 6y_lNVdOnIX4aVZR_rFwcw6bTBN4OxgzB3nLUBpsWj3b_mQGh8mXTUdHKhJXvghlBMKDmOR00Kq6 .6imZTz.UnpFw4bSAuVBMzoyeRZMEl7hS_Tr5aq3UHbljLPKildi5QEhA3DQvwKA2SoqaBc0awN. mXi7xIUofIY8Q.gyTIwrTSKHeDqjHxK0Zc4tHG2oH5tBr_uQpoPXn4dcqYFKO_HVaY1l7HU4VK.Y q0pBS_5HJ8bQrrUjmXlcocPp2FNsXWzvc5FK.PFTJ3CgrfcRz_JVwOymdwqyiQd3dDhotADv5dWv spBGI4UUivR4sIiPtMizmZ8HLXdT25XT.CbRY0uPOyXEc3f0Wc1Of5_znp81_E2odJozH8Sa2aHu lZNnsx2Tv5o7ifo49vnbKulqeK0vN6oTOJo3i31jFMmyAID8nYhmq2Yc4NV53PKkGiv7eqmMTcaw eTj.rase2TW5Wf9Vd2mLuuvHIyuKoUkRIP7c2w0bxfm3Sb44Z9lo8ten9bBAiyUxDBgQyGiLWVfG n16Bat_mSBj_0B7ohTlgTdCy.RLMb8N8dGXJUPmEaLKUy..PlpRtKp71JPPkocWCAIz1zmGapiJX dFOOiCv5ss_GmKIDTNaYmGGH33PQnl.7McmqeGkU9fT007Q1SPD2z_dxgBkOOqYUqb4nbyUADgii CVavuikiNGBIqa8VOEkjrkRllTSZ44Tbk4Q5xjNy6kNwR_FNAmia1VtMPGTvLfv3MxJncCF50XiB rfO8V5PprIR1LPzQuObqh8P9uMHaWi7_A.2WfOiB1e047Ur7.hQEbxAdOxvTCHrg.YDMwmxD4JQK jdHwp1lTXq4dunQw0f.rAVqRbsZgQ6qR9EeEWSy61k9Oc3Vn42hG1000jF9wuAslftrvmz9WBaZ1 pyFoI56nwS4npDQpg3Iv.KkFIlTi5JY5ulNA7c6Z8_2zv9XBjpx2wKX92LFUVM6U7IEf_UdzT81y D6uKyJb7oD02BphBYW.gDXM7RKDivT41EvItBAeHReeV_YC7tzAU- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Wed, 28 Sep 2022 22:00:58 +0000 Received: by hermes--production-ir2-79cb546688-cg8ng (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e7e13d73abaabc48d56f0e52a967e63e; Wed, 28 Sep 2022 22:00:55 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Jose A Ortega Ruiz Subject: Re: bug#58103: [PATCH] docview: imenu access to table of contents References: <87r0zxz85h.fsf@mail.jao.io> Date: Thu, 29 Sep 2022 00:00:54 +0200 In-Reply-To: <87r0zxz85h.fsf@mail.jao.io> (Jose A. Ortega Ruiz's message of "Tue, 27 Sep 2022 06:41:14 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20715 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 2172 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 58103 Cc: 58103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jose A Ortega Ruiz writes: > Tags: patch > > > Hi, > > The patch below provides a quite simple implemetation of an imenu for > doc-view, using mutool. That means of course that is limited to systems > where it's installed, and doesn't try to be too smart, but it's been > working quite well for me. It needs a slight tweak to imenu.el to add a > knob inhibiting it to push all entries with submenus to the top, which > doesn't make sense when those entries represent sections of a TOC. > > If this is acceptable (with any needed modification, of course), i guess > we could also add a bit of further customization, like perhaps a "flat > mode", or whether or not the section titles include page numbers, but > i'm not sure if that's desired (in my usage, i never want either). Thanks for working on this! I've given it a try, and I get the following error when the PDF does not have an outline (starting from emacs -Q): Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("\\`%PDF-1\\'" nil) imenu-find-default("%PDF-1" (("*Rescan*" . -99) (nil))) imenu--completion-buffer((("*Rescan*" . -99) nil) nil) imenu-choose-buffer-index() byte-code("\300 C\207" [imenu-choose-buffer-index] 1) call-interactively(imenu record nil) command-execute(imenu record) execute-extended-command(nil "imenu" "imenu") funcall-interactively(execute-extended-command nil "imenu" "imenu") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) Can you reproduce the same issue as well? I'm using mutool version 1.19.0. In GNU Emacs 29.0.50 (build 8, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6 (Build 21G115)) of 2022-09-28 built on Daniels-MacBook-Pro.local Repository revision: b6a163ba7cdf57eff5542b4cb6956780ebb2880f Repository branch: master Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.6 Configured using: 'configure CPPFLAGS=-I/opt/homebrew/opt/openjdk@11/include' Configured features: ACL DBUS GLIB GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS WEBP XIM ZLIB From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 28 18:53:58 2022 Received: (at 58103) by debbugs.gnu.org; 28 Sep 2022 22:53:58 +0000 Received: from localhost ([127.0.0.1]:35161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odfwE-0003Ba-38 for submit@debbugs.gnu.org; Wed, 28 Sep 2022 18:53:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odfw8-0003BI-Hl for 58103@debbugs.gnu.org; Wed, 28 Sep 2022 18:53:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odfw1-0004oP-VA; Wed, 28 Sep 2022 18:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:In-Reply-To:Subject:To:From: references; bh=JMR/0POvv2sc9j3m2oehtpSngMKQi1nCuwQr4DMEJxs=; b=HsobIRAUitbbyz GETJb8dAecPBc9dP4BFj/KcFdyAmK6HnZqLapwFMCL57xxySBgw+vz7FgHPKwSB8YEXHM5QyC7xrO qg6DNM1HdLvQW0PWWHYSou7mdJJ3+J7WPPgED/IAx6cu5oGCAOXOzZmvG6m2QnTYeCSQo2ddxESn7 JcA6ITUYBhDXJT4V9Y0faFfJZ//uqRdgSCWToaYpJ/PBVDRFTLlkSJagRMV9ElyxUQ6a/77m2taGM +1zx10btSKNjW4xExZOqywQb/KssNy8dCcQV5MwylNtGw+eguQsnxdPdOFx7krmEn81+y1GXrAV/8 Niwk5qp6YHLXpTvxjX0Q==; Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:50268 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odfw1-00077t-IC; Wed, 28 Sep 2022 18:53:45 -0400 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 5c6a32a6; Wed, 28 Sep 2022 22:53:42 +0000 (UTC) From: Jose A Ortega Ruiz To: Daniel =?utf-8?Q?Mart=C3=ADn?= Subject: Re: bug#58103: [PATCH] docview: imenu access to table of contents In-Reply-To: X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Wed, 28 Sep 2022 23:53:42 +0100 Message-ID: <87r0zv5cw9.fsf@mail.jao.io> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58103 Cc: 58103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Daniel, [...] > Thanks for working on this! I've given it a try, and I get the following > error when the PDF does not have an outline (starting from emacs -Q): Hmm, i cannot reproduce it. When i try for instance M-g i for a PDF without outline i just get back an error message telling me that there is no imenu. I have mutool 1.20, so maybe that's the difference. What's the output of this command in a terminal for you: mutool show file.pdf outline with file.pdf one of those without an outline? Do you have any imenu-related variable customized to a non-default value? Thanks for your help, jao -- The mind commands the body and the body obeys. The mind commands itself and finds resistance. -St. Augustine (354-430) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 29 08:49:11 2022 Received: (at 58103) by debbugs.gnu.org; 29 Sep 2022 12:49:11 +0000 Received: from localhost ([127.0.0.1]:36543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odsyU-0003l9-Kf for submit@debbugs.gnu.org; Thu, 29 Sep 2022 08:49:10 -0400 Received: from sonic308-17.consmr.mail.ir2.yahoo.com ([77.238.178.145]:37135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odsyS-0003kw-FS for 58103@debbugs.gnu.org; Thu, 29 Sep 2022 08:49:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1664455742; bh=x8xTcrS/2N86hSS8SAKHeKs5w5PjHbrY1oEqVsqtqAg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ZI6QIZ3LjZVj5/v7zCWUmvF4gL05HGemeFBfC60xhL3dM61xC0zC5kXNuQOh10jFrLF9VdXeSbTpqEMe9f+JNLxEsQbkyVwFyq88ibRh+IiTqNJZzIVGI0dKIrF6LvbF6yAJO7Y7JBScJG2HXC8uk/1mxd3Wgp44lhx75RpcvMgRNTyVvWyqAW7mv+PAQKo+sva9q2kYmWlqy9dAWEBfjj/2dz9Ho+/YrZp6drn2tAanI7Xu33Qqv9ICa9Hdc40+9CI9jHCzI4tbEM0o9uRKvfY0N3jb6exXdnXYcjrPtapFTr5hQmOF44/TZWiUyYWN8Yc+nAzdJs13yQyLCHSdJQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664455742; bh=1hUIhPQXk7YAdNhKmMNn2DYoV4QY9VZNqdFm1TKy+WE=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ET5/9qbl6r25rRpDk2ZzruGat5vabpeuFW9IyDW20b9SmtxQRZ/cvgpZqVOPuDUvus0atxZI36Z770OIE0SGE5lhzH0JZzFiY2jQvRVwJ2fmamuTvt3KVasfHPBjSuNJlGSVEQ+WXPt9aCNO938DYzwDcJsBRHxKqQn5GXB2v0fAIjhzwBwECodg+73/oxfN8U6MaufoMi5AjLsEshAjRSD09gm/hvgNneUAClZrNz9atmGw2AP4nrdCyxpdUuWbw142vv1+Z8hl1vwip7/3yYpH2+Kt/Wi7ftxSZbG/4UZbUeti1Z1yVNToKMjbJdw6JTPXPVvpfukOKLevrifCTA== X-YMail-OSG: yexjJ1UVM1lvMpIJO4pHjtk._p0sqrXRdxCkwM3gnRQC4O5fJK3kvs2k7mDkQug wppLHsBjT8sWtofbZPnG0J_FWcVXuiJPBheuwlJCZN920.IXQK_WunI52B2kXjqdpH5.LPAgFibb zYloIkWPeBQdRzQ8QWTY1xPL1SE1hOlBlBfeC7xl00JOyeNh0qkim86ZmB6NVKzgadtuap5yjBhz j0eX_N0J8hbUW8U96JVsfQjqpARC6DF001sq8EnVj5z6i.oV0qqFIylNUA4oBQONiHT5MuZM0G_W 1qfENrz4zixx20j.fgF8GS0vVoCXvqaJNHhb9GNBruEEJ2RnNTWljOligBGlDTeDBMtXJEUb5ekl dvmF5qBsRAD7.WsKGZZ72t9yCKCNdXt6u.6q3idC_GOu2Ith8mRzVu.UVsZ_7TkMeH5vBmXOK4eX DDthTrexzplDvaulfyJ.KTFkGuXg5ad3auBFBLPfJikrff9um0R2Qa_gsRwmIuHtTFnUJThN2SQS BrU_Fpm2YzahG1yncXGb.pUXFtEderoCu1m.5zI5u22l9XSqnP3spvQO4elEwQWEFbuTlZzBhHp0 USUpiUJOnj.YiS.OaZczvJGumY6xHPb_VOZHzCMEdIXnr4iUKBvm5qmsfOns_uQcku_BxEu4nNHy DXJWyDDnq7MydsFB83WeF5ZCnoyD_6ixkzCRkmUSXNYUcBizvvsLqCW5_1vLm5D7cg3GOhZVvgC7 c7d_RCClOlo01qdAMaf_Q0oHJXDSyYZCd.J7n828AU9jGwk6EmjcJcgqHWNkkLpqgsAMzNoUjSo7 TdE6PT_PkV9jcjKtv8UtPlxvBPzhI_Ws1s.Pg4WEsvPXmEmCKTj6dNz0xkwkAgZ6wuOWDZeoDK07 WmfjUdMCN8N5UAJAfXx.eTqni7Fed1z5sQ938UDNwXoz1oScaZMKGIvAFGHeO0WRmBn5Ehuokr3T xT4D8qpUsBt.sYF_0mrRGWS5ZYwU.tBN4KFh_Q6BUNd8wOjtKCpsLcS3ASKM.WltDVkPPQKBzcw0 mTU_cA_MFWY7qjufDmcU.XMitAx.PRS1x1cfzXgY3ZIk0CXH6ayo9SGjVPk4aNST3CtbYwpEmg2A E9MF28syXOW82pOs89gbPC7QatUJhZO1Xo9d63ygn..x3OPE1oSd2BjlIKnhrG1h5IB_q5mzL1VU EZHVWROY4ejCVsoiaJ0PwER.KSxGBXAmwqbDyCloZMoRtI.DSKIm1Tq93i3skmaY6G_E1Z1CFY4I zCsDx7U2WaAQIYAIQqcdR6hcVuj0Usr5miC1ChYs9sYx3lj9QSxJGFC1wm0uGvb9gjEND_ZWRSzq 7lABNekKsnFlrON4QHU5Fj4QucM3sNSjdd1Fbc7eSV7spoVOIP2JkFUb1H9MZzW7..WiYerHtW.E 5hiYEbXVU_Iard7Kg_eb6HOXj_L9qzuIU42Yx2hnSrR5rnokDN9x6VVMA9rN3zXxIN5jo7owLhAI SFQqXzgCYCpX86C6agHkOZU.h6iln495rmR3gC9jzGSdo8lb0UcDSTwWinrPYmzOJqm.HMqH5ZFx 6zd18x2qkBuDK_W0RK2qV9KT40a6RQhAJ.DUgatRME4dMezwloU9uv55vbbYie8XQb7n.rC6W2s2 R7z1e0T1XaUB06.SSp4kg..s7jWiJpFXT_ttQbaMtw5nKXN0kSmk953BmW0i8ZKsz8acr9UTEFFr DNuZA4zR6NChWMGpHBWXPT.iLMKJFtb5wXpw6KUtEevOx5madv58PVoXpHbymiKPCvPWx_ASYhEi 7Z6lJbidnkdnQxFfYh8IcCN5cUqbGeYoT_e73N0_ZPFlbii5watEF7e_oJtqD1BzZjRgBs6IagIT FEBbk59upyPj4NVuC0Y5Rd4fcLISgomuHIeawSORBwKCEQxLOirdQpjq02ZK3GCUWEGX8NKt8w_k _2_PPD4UzkWaPDYr6VISYayKPND6JKYsuQfp5jkf5doDLfJ0ZJVrM9SPAtYOXWEc8dDI0mEnlcUs 7VL6BHHGSzxfoMYVjFFk5XnRMNC8QZ8mgI33JtQaj7WO0qhpdT8dxVZTqN8nUu8ipbyrf8v9zBX1 _Dq_8i3HxDy_vn.RbW__HMcIqccXoxI5VN_OaG6vSS2Wj9ZGYIPIqRf4Zj2Mv6OfaQpAMhvqrTwQ 3UjqFdGQwkasy2CGj8m9URx7xqts9obqC8X8LD.aVvsujyQ2WigCYlv9yNfWo9yGNhbPiYKXf69P JjitXTKjQ5.7iy7jS_WU8YGRS4gp7Ofh_F_hNBinmN8Ry5OGatA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Thu, 29 Sep 2022 12:49:02 +0000 Received: by hermes--production-ir2-79cb546688-cg8ng (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b14f46e3b24697f8ddf2581fd32ee0c2; Thu, 29 Sep 2022 12:48:58 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Jose A Ortega Ruiz Subject: Re: bug#58103: [PATCH] docview: imenu access to table of contents References: <87r0zxz85h.fsf@mail.jao.io> <87r0zv5cw9.fsf@mail.jao.io> Date: Thu, 29 Sep 2022 14:48:57 +0200 In-Reply-To: <87r0zv5cw9.fsf@mail.jao.io> (Jose A. Ortega Ruiz's message of "Wed, 28 Sep 2022 23:53:42 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20702 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 493 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 58103 Cc: 58103@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jose A Ortega Ruiz writes: > I have mutool 1.20, so maybe that's the difference. What's the output > of this command in a terminal for you: > > mutool show file.pdf outline > > with file.pdf one of those without an outline? Do you have any > imenu-related variable customized to a non-default value? The above command does not print any output if the PDF does not have an outline. And I haven't configured any imenu variable, I tested with plain emacs -Q. Thanks. From unknown Fri Aug 15 21:26:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 28 Oct 2022 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator