From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 09 10:11:05 2024 Received: (at submit) by debbugs.gnu.org; 9 Oct 2024 14:11:05 +0000 Received: from localhost ([127.0.0.1]:57226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syXP6-0002BF-Rl for submit@debbugs.gnu.org; Wed, 09 Oct 2024 10:11:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:38524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syXP2-0002Am-3r for submit@debbugs.gnu.org; Wed, 09 Oct 2024 10:11:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syXOr-00046e-Dd for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 10:10:49 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syXOo-00086G-UE for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 10:10:48 -0400 Received: by mail-pg1-x544.google.com with SMTP id 41be03b00d2f7-7ea06275ef2so2341969a12.0 for ; Wed, 09 Oct 2024 07:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728483043; x=1729087843; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=Pd7Ys553Z2/iOI312SvhPQBbbgqcY0qVOuCl+Zlgei8=; b=f5WrpUYTL2dqM1lLXSK1mZvfBtZrE0y3x14gfnCxLOrtskZ03h/qm8LuRlBkX/dL5V yNEbNpwJbEcDsj6XtIXZmxAb6Zziufvs7l2JGAOPA5Sh2DQlbW2HHF+OZ2vzPXHILUj1 j6VEqgdvnFCg+def9ZVIAI1wbhIxluCMKMneCFiweXcxInLQ+HO+2Sk9KkRrpnhtn2Ff a4d1xIV5r9fOmaQ5n1yYTKFcVRF4NhGkrvLaxo+93FNBMdEPnVlldj8/MW3Lue8uFi+C zEh86Hbzgcz0uYqN68fwYG6TaDPNWGcyaoD1dbVI8LYt3zAikeUEOfKNW3gY0mkMyDkB m6fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728483043; x=1729087843; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Pd7Ys553Z2/iOI312SvhPQBbbgqcY0qVOuCl+Zlgei8=; b=XNXSFjcw5MutQSd/A9j3lfGafoGIj8zobFmHlG1zfOS4OskU6DjTQ0h9IeBkHebtPE pHb9MSwPWD4HlR67AwmkZLgM5G2rTqFlMMN3tZEoYF+drOcUyYJyva8IO5R6hDof9kRd zcWjmRKp0ZUW2egr7y6b9JDy2ns8uqRyGZ3gQ16Dwske9IVrk73JtTPHYwwMlwfOFXir mky+9fIlYmlENjE4f43o8SGJ/3mXNZPHJFq9RUN0wz5Wda4QHO0zCACouCfnRGiM8W2G ymQB64ZdaHfyamYa+RM8UbbnCcC1SGY7aJDJGjYxtP6NHSrKuQVfwzENauF+Yyk6P4Bq KuXg== X-Gm-Message-State: AOJu0YwoqXbCqYkDrzY8rKY4NLTIYnF2h6ga3zsExepB2glDGG1S0y3d 5eCQWKgdAh5PzPPKsqOaNZvxbdGQHlR7FwQ2vtY9vD8HLMM1/UvH2rNRtqHv X-Google-Smtp-Source: AGHT+IEwG3/auAmspaKmDNgXqNMPZD+AkbtUEXlpjIOqu2GQk9JVfOLr269CzbnzmusCRSeYxRmlKw== X-Received: by 2002:a05:6a21:2d89:b0:1cf:9a86:a29b with SMTP id adf61e73a8af0-1d8a3c0d8f8mr4658729637.20.1728483043278; Wed, 09 Oct 2024 07:10:43 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0d452b7sm7832377b3a.108.2024.10.09.07.10.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 07:10:42 -0700 (PDT) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add imenu support for OpenOffice documents in doc-view X-Debbugs-Cc: "Tassilo Horn" Date: Wed, 09 Oct 2024 19:40:39 +0530 Message-ID: <87bjzt4ba8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=visuweshm@gmail.com; helo=mail-pg1-x544.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Hi again, Tassilo! The attached patch adds imenu index support for docx files. This is done by simply passing the PDF file to doc-view--pdf-outline. This should be the last patch I have in store for doc-view. Many thanks for your attention thus far. In GNU Emacs 31.0.50 (build 13, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars) of 2024-10-06 built on astatine Repository revision: 500f5da5fb62cd0bbded8df754d93e3147d1d847 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101011 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairo CFLAGS=-g3' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-imenu-support-for-OpenOffice-documents-in-doc-vi.patch >From 15db10f756e1069ba59a4a22462da408a58088e7 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Wed, 9 Oct 2024 19:36:18 +0530 Subject: [PATCH] Add imenu support for OpenOffice documents 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 OpenOffice documents too. * etc/NEWS: Announce the change. --- doc/emacs/misc.texi | 14 ++++++++------ etc/NEWS | 6 ++++-- lisp/doc-view.el | 2 ++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 83b83ea7ae9..14196c107c1 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -586,12 +586,14 @@ DocView Navigation @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 OpenOffice documents 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 67d768f0584..5b6dcf6fa18 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -390,9 +390,11 @@ 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 OpenOffice documents. When the 'djvused' program is available, Docview can now generate imenu -index for DjVu files from its outline. +index for DjVu files from its outline. Index for OpenOffice files 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'. 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 @@ doc-view--outline ('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")) -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 02:54:20 2024 Received: (at 73719) by debbugs.gnu.org; 10 Oct 2024 06:54:20 +0000 Received: from localhost ([127.0.0.1]:58488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syn40-0006Kl-Cj for submit@debbugs.gnu.org; Thu, 10 Oct 2024 02:54:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syn3v-0006KQ-3D for 73719@debbugs.gnu.org; Thu, 10 Oct 2024 02:54:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syn3e-00045O-G1; Thu, 10 Oct 2024 02:53:58 -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=bigLatDQdvP4gDq5c+oLJ8mEnr4jZLh32g6ifED1SiM=; b=oeyx92FZy22dqJrCmZrj KivWpCf8wW3Ny1nb0yeWZD8ho2LaiC9HV334FKJ+ejkjNHzTrF3jJ7q88I/qnADwEhwRHdybavS4N NjCZzuTFBOZSgPqneKTXPVdiZrZHu9+gxGXLobCoK7asRdRNeWjVH9Ll64Vpsy8hRnZKZRgfI5tv5 jDqFJxQ0mbxRzsPjGYVFxC9Piw0mhtUWoi++hX1R+2qg0RivW/AIhCo0T1Gb3i/O6kMy2TzFVNAIj 19h7Upos6IRWySVLlq+iYH3LtJ7QptkNALi254bo6aMMx577Vx2n6Grb4qsYDD3tZF5Ngnz2yHaWo hyOfuNMdfZtrnQ==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefgedguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fujghffgffkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhn uceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeeluddvgeefuddvje ekfeetleegtefgveehhfeuffeuffeghefgueefgfdvffegtdenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruh hthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhhep pehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhmpdhnsggprhgtphhtthhopedvpdhmoh guvgepshhmthhpohhuthdprhgtphhtthhopeejfeejudelseguvggssghughhsrdhgnhhu rdhorhhgpdhrtghpthhtohepvhhishhufigvshhhmhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail From: Tassilo Horn To: Visuwesh Subject: Re: bug#73719: [PATCH] Add imenu support for OpenOffice documents in doc-view In-Reply-To: <87bjzt4ba8.fsf@gmail.com> (Visuwesh's message of "Wed, 09 Oct 2024 19:40:39 +0530") References: <87bjzt4ba8.fsf@gmail.com> User-Agent: mu4e 1.12.6; emacs 31.0.50 Date: Thu, 10 Oct 2024 08:53:54 +0200 Message-ID: <87v7y0zbwd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73719 Cc: 73719@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 (---) Visuwesh writes: Hi Visuwesh, > The attached patch adds imenu index support for docx files. docx is M$ Office, isn't it? But as far as reading your patch tells me, we do that for all ODF files which are indeed Libre/OpenOffice and friends. And, yes, M$ Office files are also handled by the ODF transformation chain. Anyway, I think it would be appropriate to speak of "Open Document Format files as used by LibreOffice and OpenOffice" in the commit message, NEWS, and the docs simply because the format is used by more office suits and OpenOffice is mostly dead nowadays, superseded by LibreOffice. Otherwise, the patch is fine. :-) > This should be the last patch I have in store for doc-view. Many > thanks for your attention thus far. We thank you, too! Those were all very nice features. :-) Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 04:44:07 2024 Received: (at 73719) by debbugs.gnu.org; 10 Oct 2024 08:44:07 +0000 Received: from localhost ([127.0.0.1]:58641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syomE-0003cI-Mp for submit@debbugs.gnu.org; Thu, 10 Oct 2024 04:44:07 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:51602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syomC-0003c9-3K for 73719@debbugs.gnu.org; Thu, 10 Oct 2024 04:44:05 -0400 Received: by mail-pf1-f194.google.com with SMTP id d2e1a72fcca58-71de9e1f431so541591b3a.3 for <73719@debbugs.gnu.org>; Thu, 10 Oct 2024 01:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728549772; x=1729154572; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0a/8zxERoSj8eepT66m5DZyS8T0M8IuuKE8FN4DeREY=; b=k6WK90MOsLeVPoA5IveVU2xF7Auz2sBvfbqBXSDXQZY69d13nyZjQ71tZ9z/e3QIsP iVrCw779g+oDHg9wzBD1BQQnHYBCtbpdDiJG3ZqZ0hObGNmjAZMPuHwz35PNaIkD5cJk +rf9iGF3op6HH3nspTiwM57pkqtyzZ25YbN6ICL4iB2J41fFxDnfFcotScMLMPidYAGZ 4fK+CzYPdxWuZUxd5/dHLBXTCK6mxzPaIGhVmH4MA7yNb/s58seIq3Df27sTQ5XE3T3z bOPhfKy30iK52wk/PrKiLnaJeOhW7CulgN87ZsGTpmfJaQzCAQKP/jaY5LGbQ/V8jRWx qtww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728549772; x=1729154572; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0a/8zxERoSj8eepT66m5DZyS8T0M8IuuKE8FN4DeREY=; b=Mp888V0faOqUuICardtZS/1233GlearnWzwxPLLn5OXtAcnzXRvlNG/Mr+ncetK/1X FED7BTjvVFmws9aQbArW86HBdDGxEPfUDQKkQ3Nti5ExlPq7OkxI8raD2FiSLv+fm/UW /VK62CdQQ+0GtngKIqADbD4hnndL0QUHYH66RuPlJPbVETWHGZxGLTZlxA1vHIF3CIeO qzI4IWEDdf6Uz3JlSdqDVz6KbX2nupUgyudp2BKjJKnnMl7qm5pQ0wgX52ZCpHK2azQK +3Optivi5WukuiT0Zkud0hoflvz2TeFFCEb0ZRWCM6k7lyCoCZIrdAxMR5KvJBTqvweW 2+Gg== X-Gm-Message-State: AOJu0YyBw2k1TGeqzX+yWiE6+YwvnAF4gzrDGaDqypYK3Q3Rry/6pFzM X2vsAw2mEufO/plT9nHKxUluxkgdxw+0WMRZCbAXTKjBx43n7jMxzDvOqysy X-Google-Smtp-Source: AGHT+IE/wJ4JZya3e5V5ikbawHgyppQBeXxDETPzsfJZWlxVyPvQ6euTrrFERlNJUBoBaECsZlA+WQ== X-Received: by 2002:a05:6a00:178c:b0:71e:f4:dbc with SMTP id d2e1a72fcca58-71e1dbc8dd5mr8318104b3a.25.1728549771755; Thu, 10 Oct 2024 01:42:51 -0700 (PDT) Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e2a9e95a3sm606287b3a.38.2024.10.10.01.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 01:42:51 -0700 (PDT) From: Visuwesh To: Tassilo Horn Subject: Re: bug#73719: [PATCH] Add imenu support for OpenOffice documents in doc-view In-Reply-To: <87v7y0zbwd.fsf@gnu.org> (Tassilo Horn's message of "Thu, 10 Oct 2024 08:53:54 +0200") References: <87bjzt4ba8.fsf@gmail.com> <87v7y0zbwd.fsf@gnu.org> Date: Thu, 10 Oct 2024 14:12:46 +0530 Message-ID: <877cag4ad5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73719 Cc: 73719@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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=85= =E0=AE=95=E0=AF=8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 10, 2024] T= assilo Horn wrote: > Visuwesh writes: > > Hi Visuwesh, > >> The attached patch adds imenu index support for docx files. > > docx is M$ Office, isn't it? But as far as reading your patch tells me, > we do that for all ODF files which are indeed Libre/OpenOffice and > friends. And, yes, M$ Office files are also handled by the ODF > transformation chain. Yes, in the end, they are all marked as odf. I tested it with a docx file so I wrote it as it was still in my mind. > Anyway, I think it would be appropriate to speak of "Open Document > Format files as used by LibreOffice and OpenOffice" in the commit > message, NEWS, and the docs simply because the format is used by more > office suits and OpenOffice is mostly dead nowadays, superseded by > LibreOffice. > > Otherwise, the patch is fine. :-) Now done in the attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-imenu-support-for-ODF-files-in-doc-view.patch >From c77b2e0e161673da35be669cace5d7a214743de9 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Wed, 9 Oct 2024 19:36:18 +0530 Subject: [PATCH] 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) --- doc/emacs/misc.texi | 15 +++++++++------ etc/NEWS | 8 +++++--- lisp/doc-view.el | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) 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 @@ DocView Navigation @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 67d768f0584..94c27f77765 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 @@ doc-view--outline ('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")) -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 06:38:20 2024 Received: (at 73719-done) by debbugs.gnu.org; 10 Oct 2024 10:38:20 +0000 Received: from localhost ([127.0.0.1]:58789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syqYm-00015R-4C for submit@debbugs.gnu.org; Thu, 10 Oct 2024 06:38:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syqYj-00015B-EN for 73719-done@debbugs.gnu.org; Thu, 10 Oct 2024 06:38:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syqYS-00072w-Qu; Thu, 10 Oct 2024 06:38:00 -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=/4v30aEwBTqAP3go1GNg/3hvYEcuIoHm5PQnwPp76gI=; b=otbJNM2eAkRPFnDaeruZ RuGGf6CZUVDjCs0Ppkmgh94tuF/rwd1qf4B9PvcViqYgv7BmYChRJu00jfAaRKGVSc3yH3Uqy7Z5W 4qZg1r17qpf5QDbnENEjjtBSugNZBuhbsUGB4gzChRlkTNhxc0wwnEyS9zMUOJ8uzRbUsmEeDKqVu eK9ekpvWWbk2f/lxDEntQ9Y3yw4Mwplz46c4y+4keGzWm0Y9YIflbJvdxkhQrr1TCIKgm4Bam5iuX SZglBtqgSmnoQ6p9RD+BnjD/6w0Yxk6WD073pgC8+Z3i+lhFem+UxkBgdLsLxa4D1rO62Q6fhoMdS t+H+ffjfrdcOnw==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf gjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcu oehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepleduvdegfeduvdejke efteelgeetgfevhefhueffueffgeehgfeufefgvdffgedtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuth hhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeep ghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhdpnhgspghrtghpthhtohepvddpmhhoug gvpehsmhhtphhouhhtpdhrtghpthhtohepjeefjeduledqughonhgvseguvggssghughhs rdhgnhhurdhorhhgpdhrtghpthhtohepvhhishhufigvshhhmhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail From: Tassilo Horn To: Visuwesh Subject: Re: bug#73719: [PATCH] Add imenu support for OpenOffice documents in doc-view In-Reply-To: <877cag4ad5.fsf@gmail.com> (Visuwesh's message of "Thu, 10 Oct 2024 14:12:46 +0530") References: <87bjzt4ba8.fsf@gmail.com> <87v7y0zbwd.fsf@gnu.org> <877cag4ad5.fsf@gmail.com> User-Agent: mu4e 1.12.6; emacs 31.0.50 Date: Thu, 10 Oct 2024 12:37:57 +0200 Message-ID: <87jzegz1iy.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73719-done Cc: 73719-done@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 (---) Visuwesh writes: > Yes, in the end, they are all marked as odf. I tested it with a docx > file so I wrote it as it was still in my mind. Understandable. >> Anyway, I think it would be appropriate to speak of "Open Document >> Format files as used by LibreOffice and OpenOffice" in the commit >> message, NEWS, and the docs simply because the format is used by more >> office suits and OpenOffice is mostly dead nowadays, superseded by >> LibreOffice. >> >> Otherwise, the patch is fine. :-) > > Now done in the attached. Thanks! Tested and pushed. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 07:14:28 2024 Received: (at 73719-done) by debbugs.gnu.org; 10 Oct 2024 11:14:28 +0000 Received: from localhost ([127.0.0.1]:58850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syr7j-00030D-SF for submit@debbugs.gnu.org; Thu, 10 Oct 2024 07:14:28 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syr7h-0002zx-Uu for 73719-done@debbugs.gnu.org; Thu, 10 Oct 2024 07:14:26 -0400 Received: by mail-pf1-f193.google.com with SMTP id d2e1a72fcca58-71dfc1124cdso630023b3a.1 for <73719-done@debbugs.gnu.org>; Thu, 10 Oct 2024 04:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728558788; x=1729163588; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zGB3dHIc+jvXXzgDUn4NE6sfHY0lUxne/AG3gC7i7mE=; b=eHy75AIrh2SOkvGebF+9AoguWlwKsqRhOZg4QwiikuEQ+eIDx34/85lY07+N/e8CsA jrLgKu4/fL1yrRTT6hJztU92vJGMP9zlSs/r3ooZ+E1ebkxxWZNj7FcMUu19Q9O2XVto DrEZOK/PUGQxjR0I+ZwIFJC8T4n7XspHE415akRDY+5njl4qtxo2cQMQu8l6hHYEza1K 8N476uvsD4I23pjXbStltoH0xgPtOuq7+bA0PlwlHxrLggOB1W5O2z06yFUPxaCboV9i h44oWO9pqaDYw4DMf2KxatE4eWI+8TWn4/N1dwcJa492orAkhRImgqLEYr/N0FEF3fUE XePQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728558788; x=1729163588; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zGB3dHIc+jvXXzgDUn4NE6sfHY0lUxne/AG3gC7i7mE=; b=FJYdfous6WbpNnY8KO/cZ2bORPS7xju/XVrAlc5X6RtuTUZnojDlFEFoteDwEatcIq XQfvJV0JRbT006mB5vtdvfJ2yetMLit/GOzgVSlMSZtw/X7Onijw7UqApEEKVkvivbCS kiNVpPnLQ76xnqDv1GIEs3H0u3SjdDa4lbRTupZESi/w5TKN4i5vo9/3brR7DIqwXE3A GKXYrxt+givdfEW/CkWlFUwTBqxuSW0pKzWkGzLK0Asfyk2WEbNf17o5rvJQwFtX9Df2 1lbvR3cE/fpYN2rGJBcHWx7u9qKPlEUsBt/HlKM7pMwbXaxBcEOIS+NSrL48klHA7Xpd 5rUA== X-Gm-Message-State: AOJu0YyauBWA/BeiZUlDNmMP1cQHbRL3r9HsvF5taql115N7RM53jny2 f5o5K30SJ/MOcGMNGHmABP+1G7UTT3B4brwV8r4Tp3dj0zuWBXqy X-Google-Smtp-Source: AGHT+IFoK9cwviys0ECR1rmQf76F3HT83dGcBVn4OBkI/ePKuMXGn4ZpQ0RvIV5ll6dNy0nZixBjwQ== X-Received: by 2002:a05:6a00:91e7:b0:717:9340:a9d0 with SMTP id d2e1a72fcca58-71e26e7698fmr4790625b3a.6.1728558788171; Thu, 10 Oct 2024 04:13:08 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea4495d331sm812437a12.60.2024.10.10.04.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 04:13:07 -0700 (PDT) From: Visuwesh To: Tassilo Horn Subject: Re: bug#73719: [PATCH] Add imenu support for OpenOffice documents in doc-view In-Reply-To: <87jzegz1iy.fsf@gnu.org> (Tassilo Horn's message of "Thu, 10 Oct 2024 12:37:57 +0200") References: <87bjzt4ba8.fsf@gmail.com> <87v7y0zbwd.fsf@gnu.org> <877cag4ad5.fsf@gmail.com> <87jzegz1iy.fsf@gnu.org> Date: Thu, 10 Oct 2024 16:43:03 +0530 Message-ID: <8734l443eo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73719-done Cc: 73719-done@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: -1.0 (-) [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=85= =E0=AE=95=E0=AF=8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 10, 2024] T= assilo Horn wrote: Great, thank you! > Visuwesh writes: > >> Yes, in the end, they are all marked as odf. I tested it with a docx >> file so I wrote it as it was still in my mind. > > Understandable. > >>> Anyway, I think it would be appropriate to speak of "Open Document >>> Format files as used by LibreOffice and OpenOffice" in the commit >>> message, NEWS, and the docs simply because the format is used by more >>> office suits and OpenOffice is mostly dead nowadays, superseded by >>> LibreOffice. >>> >>> Otherwise, the patch is fine. :-) >> >> Now done in the attached. > > Thanks! Tested and pushed. > > Bye, > Tassilo From unknown Sun Aug 17 10:19:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Nov 2024 12:24:07 +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