commit bf49113d696b00971d756ce2b67fe15c0ff1ba81 (HEAD, refs/remotes/origin/master) Author: Andreas Schwab Date: Fri Oct 11 08:49:26 2024 +0200 shr: handle anonymous documents with an empty base * lisp/net/shr.el (shr-parse-base): Make sure local is non-nil. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index cd0e482aee7..f1062acf7e4 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -950,7 +950,7 @@ When `shr-fill-text' is nil, only indent." ;; NB: URI may itself be relative to the document's URI. (setq url (shr-expand-url url)) (let* ((parsed (url-generic-parse-url url)) - (local (url-filename parsed))) + (local (or (url-filename parsed) ""))) (setf (url-filename parsed) "") ;; Chop off the bit after the last slash. (when (string-match "\\`\\(.*/\\)[^/]+\\'" local) commit 42393b9883777732fd29ed4b43110a1e89bba3a2 Author: Alan Mackenzie Date: Thu Oct 10 16:39:54 2024 +0000 Add an edebug spec for macroexp--with-extended-form-stack * lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack): Add the edebug spec (sexp body). diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 4524eccc7ef..053db927b67 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -41,7 +41,8 @@ This is to preserve the data in it in the event of a (defmacro macroexp--with-extended-form-stack (expr &rest body) "Evaluate BODY with EXPR pushed onto `byte-compile-form-stack'." - (declare (indent 1)) + (declare (indent 1) + (debug (sexp body))) `(let ((byte-compile-form-stack (cons ,expr byte-compile-form-stack))) ,@body)) commit 1d137b69040866c3251fc30762299d307ddfc830 Author: Michael Albinus Date: Thu Oct 10 12:49:56 2024 +0200 Tramp: Don't redisplay in `sit-for' * lisp/net/tramp.el (tramp-wait-for-regexp): * lisp/net/tramp-message.el (tramp-error-with-buffer, tramp-user-error): Don't redisplay in `sit-for'. (Bug#73718) diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 2050ae68a70..622914074dd 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -421,7 +421,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." ;; Show buffer. (pop-to-buffer buf) (discard-input) - (sit-for tramp-error-show-message-timeout))) + (sit-for tramp-error-show-message-timeout 'nodisp))) ;; Reset timestamp. It would be wrong after waiting for a while. (when (tramp-file-name-equal-p vec (car tramp-current-connection)) (setcdr tramp-current-connection (current-time))))))) @@ -443,7 +443,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." ;; `tramp-error' does not show messages. So we must do it ourselves. (apply #'message fmt-string arguments) (discard-input) - (sit-for tramp-error-show-message-timeout) + (sit-for tramp-error-show-message-timeout 'nodisp) ;; Reset timestamp. It would be wrong after waiting for a while. (when (tramp-file-name-equal-p vec-or-proc (car tramp-current-connection)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0a8d2d4cb2c..181bba01304 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2479,7 +2479,7 @@ Fall back to normal file name handler if no Tramp file name handler exists." ;; "process-name" and "process-buffer", ;; because the operations shall be applied ;; in the main connection process. In order - ;; to avoid suspicious debug buffers during + ;; to avoid superfluous debug buffers during ;; host name completion, we adapt ;; `tramp-verbose'. ;; If `non-essential' is non-nil, Tramp shall @@ -6049,7 +6049,7 @@ nil." (with-tramp-timeout (timeout) (while (not found) ;; This is needed to yield the CPU, otherwise we'll see 100% CPU load. - (sit-for 0) + (sit-for 0 'nodisp) (tramp-accept-process-output proc) (unless (process-live-p proc) (tramp-error-with-buffer commit 9ddeeda8ce156201ea3c8cc8d6b388efb4d80bef Author: Visuwesh Date: Wed Oct 9 19:36:18 2024 +0530 Add imenu support for ODF files in doc-view * lisp/doc-view.el (doc-view--outline): Pass the right file to doc-view--pdf-outline. * doc/emacs/misc.texi (DocView Navigation): Mention support for Open Format Document (ODF) files too. * etc/NEWS: Announce the change. (bug#73719) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 83b83ea7ae9..f618dadc0d6 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -586,12 +586,15 @@ default size for DocView, customize the variable @vindex doc-view-djvused-program DocView can generate an outline menu for PDF and DjVu documents using the @command{mutool} and the @command{djvused} programs, respectively, -when they are available. This uses the @code{imenu} facility -(@pxref{Imenu}). You can customize how the @code{imenu} items for this -outline are formatted and displayed using the variables -@code{doc-view-imenu-format} and @code{doc-view-imenu-flatten}. The -filename of the @command{djvused} program can be customized by changing -the @code{doc-view-djvused-program} user option. +when they are available. The outline for Open Document Format files as +used by OpenOffice and LibreOffice are also generated using the +@command{mutool} after they are converted to PDF. This uses the +@code{imenu} facility (@pxref{Imenu}). You can customize how the +@code{imenu} items for this outline are formatted and displayed using +the variables @code{doc-view-imenu-format} and +@code{doc-view-imenu-flatten}. The filename of the @command{djvused} +program can be customized by changing the +@code{doc-view-djvused-program} user option. @cindex registers, in DocView mode @findex doc-view-page-to-register diff --git a/etc/NEWS b/etc/NEWS index e57991901c5..e14efad8199 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -390,10 +390,12 @@ command 'doc-view-page-to-register' (bound to 'm'), and later the stored page can be restored with 'doc-view-jump-to-register' (bound to '''). +++ -*** Docview can generate imenu index for DjVu files. +*** Docview can generate imenu index for DjVu and ODF documents. When the 'djvused' program is available, Docview can now generate imenu -index for DjVu files from its outline. -The name of the 'djvused' program can be customized by changing the user +index for DjVu files from its outline. Index for Open Document Format +(ODF) files as used by OpenOffice and LibreOffice are generated using +the 'mutool' program after their initial conversion to PDF format. The +name of the 'djvused' program can be customized by changing the user option 'doc-view-djvused-program'. ** Tramp diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 57a24418616..bbfbbdec925 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -2103,6 +2103,8 @@ If FILE-NAME is nil, use the current file instead." ('djvu (when doc-view-djvused-program (doc-view--djvu-outline file-name))) + ('odf + (doc-view--pdf-outline (doc-view-current-cache-doc-pdf))) (_ (doc-view--pdf-outline file-name))))) (when outline (imenu-add-to-menubar "Outline"))