From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jose A Ortega Ruiz <jao@gnu.org>
Cc: 58103@debbugs.gnu.org
Subject: bug#58103: [PATCH] docview: imenu access to table of contents
Date: Thu, 29 Sep 2022 00:00:54 +0200 [thread overview]
Message-ID: <m1edvv2m7d.fsf@yahoo.es> (raw)
In-Reply-To: <87r0zxz85h.fsf@mail.jao.io> (Jose A. Ortega Ruiz's message of "Tue, 27 Sep 2022 06:41:14 +0100")
Jose A Ortega Ruiz <jao@gnu.org> 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
next prev parent reply other threads:[~2022-09-28 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 5:41 bug#58103: [PATCH] docview: imenu access to table of contents Jose A Ortega Ruiz
2022-09-27 11:53 ` Lars Ingebrigtsen
2022-09-27 16:18 ` Jose A Ortega Ruiz
2022-09-28 22:00 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-09-28 22:53 ` Jose A Ortega Ruiz
2022-09-29 12:48 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=m1edvv2m7d.fsf@yahoo.es \
--to=bug-gnu-emacs@gnu.org \
--cc=58103@debbugs.gnu.org \
--cc=jao@gnu.org \
--cc=mardani29@yahoo.es \
/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).