From unknown Sun Jun 15 08:54:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61685: 28.2; imenu in org-mode is wrong for the first org file opened in a given session Resent-From: Kuba Orlik Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2023 18:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 61685@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16770046796967 (code B ref -1); Tue, 21 Feb 2023 18:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2023 18:37:59 +0000 Received: from localhost ([127.0.0.1]:57248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUXWY-0001oI-B4 for submit@debbugs.gnu.org; Tue, 21 Feb 2023 13:37:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:40340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUXWT-0001o6-MQ for submit@debbugs.gnu.org; Tue, 21 Feb 2023 13:37:57 -0500 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 1pUXWT-0005tw-GE for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 13:37:53 -0500 Received: from nyuno.kuba-orlik.name ([159.69.83.182]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUXWP-0005mS-Tv for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 13:37:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuba-orlik.name; s=mail; t=1677004665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3Bt5TaKFJWQny2qlrxEZSXPsCjD67lC+ZvPAXzw2frw=; b=EKxtHxa8Ch7m/C372mUknddrigDumsznBNXd2i74QcYssn3XkyDyNjZ/IoKFn9gzKDxJhC /0sGiRl8oZ3qronFvbySCIPaTKBZLSgCXNbNkW5YeiM8Yu6ZtXb5mMrAbXK39F33XDEBtF o0XX5WA1twNSHmLcIcxN/oJI7y07CmI= From: Kuba Orlik Date: Tue, 21 Feb 2023 19:37:50 +0100 Message-ID: <87r0ui3lvl.fsf@kuba-orlik.name> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=159.69.83.182; envelope-from=kontakt@kuba-orlik.name; helo=nyuno.kuba-orlik.name 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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.4 (--) When opening an org file and running imenu, the structure is not parsed properly. I need to kill the buffer visiting the org file and find it again. This only affects the first org file opened in a given Emacs session. To reproduce: 1. Create an org file with the following contents: ``` * Some Heading ** subheading ** subheading 2 * Another heading ** another subheading ** another subheading 2 ``` save it as repro.org 2. Run `emacs -Q repro.org` 3. Eval `(imenu-add-menubar-index)` in the org buffer 4. Check the results in the `index` menu in the menu-bar: they are wrong. they should be nested to reflect the structure of the headings, but they are just flat. 5. Kill the org buffer (C-x k) 6. Open the org file again, without closing emacs 7. Eval `(imenu-add-menubar-index)` in the org buffer 8. Check the `index` menu in the menu-bar: the headings are now properly parsed and nested. In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03 built on 2 Windowing system distributor 'The X.Org Foundation', version 11.0.12201008 System Description: Arch Linux Configured using: 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: pl_PL.UTF-8 value of $LC_NUMERIC: pl_PL.UTF-8 value of $LC_TIME: pl_PL.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: mu4e-column-faces-mode: t global-git-commit-mode: t magit-auto-revert-mode: t global-prettier-mode: t shell-dirtrack-mode: t apheleia-global-mode: t apheleia-mode: t counsel-projectile-mode: t projectile-mode: t counsel-mode: t ivy-mode: t global-undo-tree-mode: t undo-tree-mode: t delete-selection-mode: t global-tree-sitter-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /home/kuba/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/28.2/lisp/transient Features: (shadow emacsbug re-builder descr-text misearch multi-isearch ffap cl-print help-fns radix-tree apropos cus-edit cus-start cus-load cal-move apheleia org-archive org-colview sort gnus-cite smiley shr-color mm-archive mail-extr qp diary-lib diary-loaddefs cal-iso org-duration vc-git vc-dispatcher org-element avl-tree ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi face-remap org-agenda org-refile solarized-selenized-light-theme solarized-palettes solarized solarized-faces mu4e-column-faces inline memoize memoize-autoloads mu4e mu4e-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat advice org-macs org-loaddefs find-func mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit cal-menu calendar cal-loaddefs mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail sendmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr kinsoku svg xml dom flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config magit-bookmark bookmark ido mu4e-column-faces-autoloads pcase dockerfile-mode-autoloads web-mode-autoloads magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff-mode git-commit rx log-edit message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm compat-27 compat-26 compat compat-macs magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads compat-autoloads prettier editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch package browse-url url-handlers tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp format-spec nvm f f-shortdoc shortdoc dash s iter2 generator prettier-autoloads editorconfig-autoloads nvm-autoloads f-autoloads s-autoloads iter2-autoloads apheleia-autoloads easy-mmode edmacro kmacro counsel-projectile ivy-prescient prescient char-fold projectile lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep ibuf-ext ibuffer ibuffer-loaddefs thingatpt counsel xdg xref project swiper ivy ivy-faces ivy-overlay colir color ivy-prescient-autoloads prescient-autoloads counsel-projectile-autoloads counsel-autoloads swiper-autoloads ivy-autoloads projectile-autoloads undo-tree diff queue undo-tree-autoloads queue-autoloads finder-inf undo-fu-autoloads delsel server tree-sitter-langs tree-sitter-langs-build tar-mode arc-mode archive-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core eieio-loaddefs password-cache json url-vars mailcap pp tree-sitter-hl tree-sitter tree-sitter-load tree-sitter-cli map tsc tsc-dyn tsc-dyn-get compile text-property-search comint ansi-color ring dired-aux dired dired-loaddefs tsc-obsolete tree-sitter-langs-autoloads tree-sitter-autoloads tsc-autoloads solarized-theme-autoloads dash-autoloads info straight-autoloads cl-seq cl-extra help-mode seq byte-opt straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 3070189 182089) (symbols 48 52783 17) (strings 32 444754 5459) (string-bytes 1 9903280) (vectors 16 93443) (vector-slots 8 2228997 183968) (floats 8 598 463) (intervals 56 421229 21137) (buffers 992 64)) From unknown Sun Jun 15 08:54:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61685: 28.2; imenu in org-mode is wrong for the first org file opened in a given session Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2023 11:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kuba Orlik Cc: 61685@debbugs.gnu.org Received: via spool by 61685-submit@debbugs.gnu.org id=B61685.16770644319139 (code B ref 61685); Wed, 22 Feb 2023 11:14:02 +0000 Received: (at 61685) by debbugs.gnu.org; 22 Feb 2023 11:13:51 +0000 Received: from localhost ([127.0.0.1]:58124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUn4J-0002NJ-68 for submit@debbugs.gnu.org; Wed, 22 Feb 2023 06:13:51 -0500 Received: from mout02.posteo.de ([185.67.36.66]:38231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUn4G-0002N6-SM for 61685@debbugs.gnu.org; Wed, 22 Feb 2023 06:13:50 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8C498240733 for <61685@debbugs.gnu.org>; Wed, 22 Feb 2023 12:13:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677064422; bh=owcSSFH0Kl63CO4nsqXHit46C6vqZHIalxS3a/sks3c=; h=From:To:Cc:Subject:Date:From; b=GaLZ6of2TijlsoBRW8W0M1Oz3PEudOKQeOiDmns5pv5Ose6zb49Acob914vnwVIee MS8h1kFqXoGf5dW7nd/WoLa1KNKpQZ4KCX5v7oVCjYT/ZPfVfh3sSErmEFJ2lJLYsT ZWh37cPJhfxWHIx0McX1BngXNcjFArZzvtFeVJskPzIBw+mBW0spxpzg5bYWQdWS86 YiUW0fI/Q6timNUGf8uktuJRBSkXe+jAy1atl3azhZ3MidVAhEiPAvC3H2b8geQTsl pgs9FmdLMWNTcSzqygI3xvcjrYYwE2Keuk2hNDqOxObKItCbW/fLNAiUKXSDs3SAZi 4/bctvX03KrMw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PMD6p19RSz6tnx; Wed, 22 Feb 2023 12:13:37 +0100 (CET) From: Ihor Radchenko In-Reply-To: <87r0ui3lvl.fsf@kuba-orlik.name> References: <87r0ui3lvl.fsf@kuba-orlik.name> Date: Wed, 22 Feb 2023 11:14:20 +0000 Message-ID: <87fsayc5pv.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 Kuba Orlik via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > When opening an org file and running imenu, the structure is not parsed > properly. I need to kill the buffer visiting the org file and find it > again. This only affects the first org file opened in a given Emacs > session. > > To reproduce: > ... Org activates Imenu support only after Imenu is loaded. Effective only in Org buffers opened after Imenu is enabled. I tried to clarify this in the manual. See the attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-manual.org-Clarify-that-Imenu-support-is-activat.patch >From cbab9ebf5521d327937e9e30e2de43b39c5dcdc5 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Wed, 22 Feb 2023 14:11:11 +0300 Subject: [PATCH] org-manual.org: Clarify that Imenu support is activated in future Org buffers * doc/org-manual.org (Packages that Org cooperates with): Clarify that imenu should be loaded before Org mode is loaded in current buffer. Reported-by: Kuba Orlik Link: Emacs bug#61685 --- doc/org-manual.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index 5b6633417..6a625b42a 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -20327,6 +20327,10 @@ *** Packages that Org cooperates with By default the index is two levels deep---you can modify the depth using the option ~org-imenu-depth~. + Org activates Imenu support only in the buffers opened after loading + Imenu library. To enable Imenu support in an already opened Org + buffer, reload Org. + - =speedbar.el= by Eric\nbsp{}M.\nbsp{}Ludlam :: #+cindex: @file{speedbar.el} -- 2.39.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=-- From unknown Sun Jun 15 08:54:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61685: 28.2; imenu in org-mode is wrong for the first org file opened in a given session Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2023 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kuba Orlik Cc: 61685@debbugs.gnu.org Received: via spool by 61685-submit@debbugs.gnu.org id=B61685.168044536921223 (code B ref 61685); Sun, 02 Apr 2023 14:23:01 +0000 Received: (at 61685) by debbugs.gnu.org; 2 Apr 2023 14:22:49 +0000 Received: from localhost ([127.0.0.1]:42427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piybZ-0005WE-1B for submit@debbugs.gnu.org; Sun, 02 Apr 2023 10:22:49 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piybW-0005W1-TI for 61685@debbugs.gnu.org; Sun, 02 Apr 2023 10:22:48 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E5F712402FB for <61685@debbugs.gnu.org>; Sun, 2 Apr 2023 16:22:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680445360; bh=lgAFToyDUYJxoixVvHu3LZI5xoHpyiMx6Rod5iiqu+4=; h=From:To:Cc:Subject:Date:From; b=N8FsSP57j0D8mmWwWiFHujaArH/JHCu9+JUQAi9DFKXuvaFyBYN2smHyCqodih0WG fj/eAVhIbpYX4k/9/onxf+38Q9mWLVB0vAZyOJzNBlfjEX424fM53qKfoj03xPjL+j TA6P5vweiEQ5QwbGRCl1GrnD+3KomCpsKrXeG0k5FOnXHgDsg+PUBTZ7xMDnbyfe0E wWZqJEIGge6bw+lFHZT7Z5KD+ziHcJ8B98xazMYg1ommlBIzrd2lKa4XycJZiN11Ds g3R1NZumOZAUf2QAIDuy4opwitGrWhvRvD8sI5OPGlkGMJ6WcsGTqpg31QBSfTnnu7 dQjiu6kinDcrw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PqGSw0zBBz6tsB; Sun, 2 Apr 2023 16:22:40 +0200 (CEST) From: Ihor Radchenko In-Reply-To: <87fsayc5pv.fsf@localhost> References: <87r0ui3lvl.fsf@kuba-orlik.name> <87fsayc5pv.fsf@localhost> Date: Sun, 02 Apr 2023 14:25:02 +0000 Message-ID: <87edp2l5tt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Ihor Radchenko writes: > Org activates Imenu support only after Imenu is loaded. Effective only > in Org buffers opened after Imenu is enabled. > > I tried to clarify this in the manual. Applied, onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cbab9ebf5 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From unknown Sun Jun 15 08:54:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kuba Orlik Subject: bug#61685: closed (Re: bug#61685: 28.2; imenu in org-mode is wrong for the first org file opened in a given session) Message-ID: References: <87r0ui3lvl.fsf@kuba-orlik.name> X-Gnu-PR-Message: they-closed 61685 X-Gnu-PR-Package: emacs Reply-To: 61685@debbugs.gnu.org Date: Sun, 17 Sep 2023 11:56:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1694951761-23853-1" This is a multi-part message in MIME format... ------------=_1694951761-23853-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61685: 28.2; imenu in org-mode is wrong for the first org file opened in a= given session which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61685@debbugs.gnu.org. --=20 61685: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61685 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1694951761-23853-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61685-done) by debbugs.gnu.org; 17 Sep 2023 11:55:23 +0000 Received: from localhost ([127.0.0.1]:49275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhqN1-0006Br-Ds for submit@debbugs.gnu.org; Sun, 17 Sep 2023 07:55:23 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:51596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhqMz-0006Ba-4r for 61685-done@debbugs.gnu.org; Sun, 17 Sep 2023 07:55:21 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bffd6c1460so7114611fa.3 for <61685-done@debbugs.gnu.org>; Sun, 17 Sep 2023 04:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694951707; x=1695556507; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=9sDg4MM/CYuUixUt9s/tnGtRc8OU6MRHldPmmhw4Aac=; b=MOc94PvaybvMX6UM9ZvUK8qr/nJiIsCYhokKt2xk85rldGZVwafnV+MoNjPZg2SjcT AZWeG0WIwTn45M4k2L4TSOP8NlPlZT+LHVhYKRWjLB1pdGqJQzP9S0kqqPrEWnnTl+sk ws/OpJYVsfZ9za9xaDzjbWMJoJy647cvXQtoIAkfhaaESTifi0Cq95DqZznwpHVHIMJb 5/KrGJmtnXa9xbTLm6FyoKl4YcIjc2feCuJz0DvTWUHdKl7j8WYUtKG05gW0ZXw9u0Rd 5GhPDdKXaV5cT7PzgfQCB1lLCcPNO8m5D39PMpPCOxsm/JDYRuOI51MFFImaOJSllksa Hw5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694951707; x=1695556507; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9sDg4MM/CYuUixUt9s/tnGtRc8OU6MRHldPmmhw4Aac=; b=oIYy9hdtlo/B/bFUUakbcXfKcsHaAcMLQ3z1oyt55+8DZ9E418twn93XWMAFUDwmN2 OJwNJ/c0r9hnVvpA/0LU5qhaaebiN7fG8YiEtZ4k+UPAICGQbcFfcCDe9S1zxhDUdc0X o0LSGmIITLpGjhnosDjLETVOnaymKKIvNmYowifVlt/326KlE4XPAsw+Hf8C3doMauwy YQ4dlJZyOcv2MaK27xp2yzyQ87IEiYIPB3Oxf2HmE2vyga49+PqftaiphBP8smRn49GH Suaf8Q9+KTkj9zcSf25DjJyeLbnFa25oAvnDfzlc8TOyW+QzBqmcWTqy6BvLKkMa7gIm 63EQ== X-Gm-Message-State: AOJu0Yz2YZCuIzT1xPaeDQ+RO3k/aYaQCTlvPqM41jBoPyBIgxz1DgYW 4bD34gVdwmkmiqIyJHHZGRZaW1lStV86POsiJyg= X-Google-Smtp-Source: AGHT+IEcwi0w8i5WuV+XnwSPGHzMh6xeEmCAroPiv2PcwJOtQ9WbMOyjyNChuNRS9ysMpyIcjGo465YSiR/VcvWLvF8= X-Received: by 2002:a2e:9347:0:b0:2b9:53bd:47a7 with SMTP id m7-20020a2e9347000000b002b953bd47a7mr5815640ljh.30.1694951707074; Sun, 17 Sep 2023 04:55:07 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 17 Sep 2023 04:55:06 -0700 From: Stefan Kangas In-Reply-To: <87edp2l5tt.fsf@localhost> References: <87r0ui3lvl.fsf@kuba-orlik.name> <87fsayc5pv.fsf@localhost> <87edp2l5tt.fsf@localhost> MIME-Version: 1.0 Date: Sun, 17 Sep 2023 04:55:06 -0700 Message-ID: Subject: Re: bug#61685: 28.2; imenu in org-mode is wrong for the first org file opened in a given session To: Ihor Radchenko , Kuba Orlik Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61685-done Cc: 61685-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 (-) Ihor Radchenko writes: > Ihor Radchenko writes: > >> Org activates Imenu support only after Imenu is loaded. Effective only >> in Org buffers opened after Imenu is enabled. >> >> I tried to clarify this in the manual. > > Applied, onto main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cbab9ebf5 It seems like this issue was resolved, but was left open in the bug tracker. I'm therefore closing it now. ------------=_1694951761-23853-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Feb 2023 18:37:59 +0000 Received: from localhost ([127.0.0.1]:57248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUXWY-0001oI-B4 for submit@debbugs.gnu.org; Tue, 21 Feb 2023 13:37:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:40340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUXWT-0001o6-MQ for submit@debbugs.gnu.org; Tue, 21 Feb 2023 13:37:57 -0500 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 1pUXWT-0005tw-GE for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 13:37:53 -0500 Received: from nyuno.kuba-orlik.name ([159.69.83.182]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUXWP-0005mS-Tv for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 13:37:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuba-orlik.name; s=mail; t=1677004665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3Bt5TaKFJWQny2qlrxEZSXPsCjD67lC+ZvPAXzw2frw=; b=EKxtHxa8Ch7m/C372mUknddrigDumsznBNXd2i74QcYssn3XkyDyNjZ/IoKFn9gzKDxJhC /0sGiRl8oZ3qronFvbySCIPaTKBZLSgCXNbNkW5YeiM8Yu6ZtXb5mMrAbXK39F33XDEBtF o0XX5WA1twNSHmLcIcxN/oJI7y07CmI= From: Kuba Orlik To: bug-gnu-emacs@gnu.org Subject: 28.2; imenu in org-mode is wrong for the first org file opened in a given session Date: Tue, 21 Feb 2023 19:37:50 +0100 Message-ID: <87r0ui3lvl.fsf@kuba-orlik.name> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=159.69.83.182; envelope-from=kontakt@kuba-orlik.name; helo=nyuno.kuba-orlik.name 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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.4 (--) When opening an org file and running imenu, the structure is not parsed properly. I need to kill the buffer visiting the org file and find it again. This only affects the first org file opened in a given Emacs session. To reproduce: 1. Create an org file with the following contents: ``` * Some Heading ** subheading ** subheading 2 * Another heading ** another subheading ** another subheading 2 ``` save it as repro.org 2. Run `emacs -Q repro.org` 3. Eval `(imenu-add-menubar-index)` in the org buffer 4. Check the results in the `index` menu in the menu-bar: they are wrong. they should be nested to reflect the structure of the headings, but they are just flat. 5. Kill the org buffer (C-x k) 6. Open the org file again, without closing emacs 7. Eval `(imenu-add-menubar-index)` in the org buffer 8. Check the `index` menu in the menu-bar: the headings are now properly parsed and nested. In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03 built on 2 Windowing system distributor 'The X.Org Foundation', version 11.0.12201008 System Description: Arch Linux Configured using: 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: pl_PL.UTF-8 value of $LC_NUMERIC: pl_PL.UTF-8 value of $LC_TIME: pl_PL.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: mu4e-column-faces-mode: t global-git-commit-mode: t magit-auto-revert-mode: t global-prettier-mode: t shell-dirtrack-mode: t apheleia-global-mode: t apheleia-mode: t counsel-projectile-mode: t projectile-mode: t counsel-mode: t ivy-mode: t global-undo-tree-mode: t undo-tree-mode: t delete-selection-mode: t global-tree-sitter-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /home/kuba/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/28.2/lisp/transient Features: (shadow emacsbug re-builder descr-text misearch multi-isearch ffap cl-print help-fns radix-tree apropos cus-edit cus-start cus-load cal-move apheleia org-archive org-colview sort gnus-cite smiley shr-color mm-archive mail-extr qp diary-lib diary-loaddefs cal-iso org-duration vc-git vc-dispatcher org-element avl-tree ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi face-remap org-agenda org-refile solarized-selenized-light-theme solarized-palettes solarized solarized-faces mu4e-column-faces inline memoize memoize-autoloads mu4e mu4e-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat advice org-macs org-loaddefs find-func mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit cal-menu calendar cal-loaddefs mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail sendmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr kinsoku svg xml dom flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config magit-bookmark bookmark ido mu4e-column-faces-autoloads pcase dockerfile-mode-autoloads web-mode-autoloads magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff-mode git-commit rx log-edit message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm compat-27 compat-26 compat compat-macs magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads compat-autoloads prettier editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch package browse-url url-handlers tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp format-spec nvm f f-shortdoc shortdoc dash s iter2 generator prettier-autoloads editorconfig-autoloads nvm-autoloads f-autoloads s-autoloads iter2-autoloads apheleia-autoloads easy-mmode edmacro kmacro counsel-projectile ivy-prescient prescient char-fold projectile lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep ibuf-ext ibuffer ibuffer-loaddefs thingatpt counsel xdg xref project swiper ivy ivy-faces ivy-overlay colir color ivy-prescient-autoloads prescient-autoloads counsel-projectile-autoloads counsel-autoloads swiper-autoloads ivy-autoloads projectile-autoloads undo-tree diff queue undo-tree-autoloads queue-autoloads finder-inf undo-fu-autoloads delsel server tree-sitter-langs tree-sitter-langs-build tar-mode arc-mode archive-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core eieio-loaddefs password-cache json url-vars mailcap pp tree-sitter-hl tree-sitter tree-sitter-load tree-sitter-cli map tsc tsc-dyn tsc-dyn-get compile text-property-search comint ansi-color ring dired-aux dired dired-loaddefs tsc-obsolete tree-sitter-langs-autoloads tree-sitter-autoloads tsc-autoloads solarized-theme-autoloads dash-autoloads info straight-autoloads cl-seq cl-extra help-mode seq byte-opt straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 3070189 182089) (symbols 48 52783 17) (strings 32 444754 5459) (string-bytes 1 9903280) (vectors 16 93443) (vector-slots 8 2228997 183968) (floats 8 598 463) (intervals 56 421229 21137) (buffers 992 64)) ------------=_1694951761-23853-1--