* [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
@ 2025-02-28 20:40 Steinar Bang
2025-02-28 23:10 ` Rohit Patnaik
2025-03-11 18:32 ` Ihor Radchenko
0 siblings, 2 replies; 16+ messages in thread
From: Steinar Bang @ 2025-02-28 20:40 UTC (permalink / raw)
To: emacs-orgmode
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
Got an error opening this file https://github.com/steinarb/bang-bompom/blob/master/README.org
Emacs : GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0)
of 2025-02-27, modified by Debian
Package: Org mode version 9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)
current state:
==============
(setq
org-yank-image-file-name-function 'org-yank-image-autogen-filename
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-html-format-headline-function 'org-html-format-headline-default-function
org-html-format-drawer-function #[514 "\207" [] 3 ("/usr/share/emacs/30.1/lisp/org/ox-html.elc" . 22502)]
org-log-into-drawer t
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-structure-template-alist '(("w" . "WP") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex")
("q" . "quote") ("s" . "src") ("v" . "verse"))
org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-confirm-elisp-link-function 'yes-or-no-p
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-latex-format-drawer-function #[514 "\207" [] 3 ("/usr/share/emacs/30.1/lisp/org/ox-latex.elc" . 36340)]
org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] turn-on-visual-line-mode turn-off-auto-fill turn-on-font-lock
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes)
org-load-hook '(#[nil
((add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (setq org-clock-into-drawer "CLOCK") (setq org-cycle-include-plain-lists 'integrate)
(setq org-export-backends '(ascii html icalendar latex md odt)) (setq org-export-with-drawers '("LOGBOOK")) (setq org-log-into-drawer t) (setq org-startup-folded t)
(global-set-key "l" 'org-store-link) (global-set-key "a" 'org-agenda) (global-set-key "b" 'org-iswitchb) (add-hook 'org-mode-hook 'turn-on-font-lock)
(add-hook 'org-mode-hook 'turn-off-auto-fill) (add-hook 'org-mode-hook 'turn-on-visual-line-mode))
nil]
)
org-confirm-shell-link-function 'yes-or-no-p
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-archive-hook '(org-attach-archive-delete-maybe)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-occur-hook '(org-first-headline-recenter)
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-ascii-format-drawer-function #[771 "\207" [] 4 ("/usr/share/emacs/30.1/lisp/org/ox-ascii.elc" . 11828)]
org-link-from-user-regexp "\\<sb@marquez\\>\\|\\<Steinar Bang\\>"
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-link-parameters '(("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link)
("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export)
("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command)
("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link)
("doi" :follow org-link-doi-open :export org-link-doi-export) ("attachment" :follow org-attach-follow :complete org-attach-complete-link)
("id" :follow org-id-open :store org-id-store-link-maybe) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 ("/usr/share/emacs/30.1/lisp/org/ol.elc" . 51215)])
("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 ("/usr/share/emacs/30.1/lisp/org/ol.elc" . 51215)])
("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 ("/usr/share/emacs/30.1/lisp/org/ol.elc" . 51215)])
("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 ("/usr/share/emacs/30.1/lisp/org/ol.elc" . 51215)])
("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 ("/usr/share/emacs/30.1/lisp/org/ol.elc" . 51215)])
("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp))
org-clock-into-drawer "CLOCK"
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-sort-function 'string-collate-lessp
org-export-backends '(ascii html icalendar latex md odt)
org--warnings '("org-element--cache: Org parser error in README.org::13980. Resetting.\n The error was: (error \"Tab width in Org files must be 8, not 4. Please adjust your ‘tab-width’ settings for Org mode\")\n Backtrace:\nnil\n Please report this to Org mode mailing list (M-x org-submit-bug-report)." "org-element--cache: Org parser error in README.org::13670. Resetting.\n The error was: (error \"Tab width in Org files must be 8, not 4. Please adjust your ‘tab-width’ settings for Org mode\")\n Backtrace:\nnil\n Please report this to Org mode mailing list (M-x org-submit-bug-report)." "org-element--cache: Org parser error in README.org::13980. Resetting.\n The error was: (error \"Tab width in Org files must be 8, not 4. Please adjust your ‘tab-width’ settings for Org mode\")\n Backtrace:\nnil\n Please report this to Org mode mailing list (M-x org-submit-bug-report)." "org-element--cache: Org parser error in README.org::13670. Resetting.\n The error was: (error \"Tab width in Org files must be 8, not 4. Please adjust your ‘tab-width’ settings for Org mode\")\n Backtrace:\nnil\n Please report this to Org mode mailing list (M-x org-submit-bug-report)." "org-element--cache: Org parser error in README.org::13606. Resetting.\n The error was: (error \"Tab width in Org files must be 8, not 4. Please adjust your ‘tab-width’ settings for Org mode\")\n Backtrace:\nnil\n Please report this to Org mode mailing list (M-x org-submit-bug-report).")
org-startup-folded t
org-babel-pre-tangle-hook '(save-buffer)
org-export-before-parsing-hook '(org-attach-expand-links)
org-link-shell-confirm-function 'yes-or-no-p
org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
org-cycle-include-plain-lists 'integrate
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-agenda-loop-over-headlines-in-active-region nil
org-export-with-drawers '("LOGBOOK")
org-link-elisp-confirm-function 'yes-or-no-p
org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-odt-format-drawer-function #[514 "\207" [] 3 ("/usr/share/emacs/30.1/lisp/org/ox-odt.elc" . 16819)]
)
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-02-28 20:40 [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)] Steinar Bang
@ 2025-02-28 23:10 ` Rohit Patnaik
2025-03-11 18:32 ` Ihor Radchenko
1 sibling, 0 replies; 16+ messages in thread
From: Rohit Patnaik @ 2025-02-28 23:10 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
I tried opening the linked file with the latest org-mode from git, as of commit
53cd3f83c96728 and I was not able to reproduce the issue. I was able to open the
file, move around in it, make edits, etc. without any problems.
However, I am using Emacs 29.4, not 30.1. Could that have something to do with
it as well?
Thanks,
Rohit
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-02-28 20:40 [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)] Steinar Bang
2025-02-28 23:10 ` Rohit Patnaik
@ 2025-03-11 18:32 ` Ihor Radchenko
2025-03-11 22:40 ` Steinar Bang
1 sibling, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-11 18:32 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
Steinar Bang <[email protected]> writes:
> Got an error opening this file https://github.com/steinarb/bang-bompom/blob/master/README.org
>
> Emacs : GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0)
> of 2025-02-27, modified by Debian
> Package: Org mode version 9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)
I tried with the latest main, with emacs-30, emacs-29, and emacs-28.
All opening that linked file just fine.
Have you tried with emacs -Q?
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-11 18:32 ` Ihor Radchenko
@ 2025-03-11 22:40 ` Steinar Bang
2025-03-12 17:47 ` Ihor Radchenko
0 siblings, 1 reply; 16+ messages in thread
From: Steinar Bang @ 2025-03-11 22:40 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> Ihor Radchenko <[email protected]>:
> I tried with the latest main, with emacs-30, emacs-29, and emacs-28.
> All opening that linked file just fine.
> Have you tried with emacs -Q?
Problem went away with "emacs -Q".
Bisected my .emacs and this was the culprit:
;; editorconfig formatting support
;;;================================
(when (locate-library "editorconfig")
(editorconfig-mode 1)
(setq editorconfig-exclude-regexps '("\\.jar$")))
Upgrading editorconfig to newest in melpa didn't help.
Neither did trying to exclude org files from editorconfig.
But in any case, not a bug in org mode..
Thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-11 22:40 ` Steinar Bang
@ 2025-03-12 17:47 ` Ihor Radchenko
2025-03-14 17:23 ` Steinar Bang
0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-12 17:47 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
Steinar Bang <[email protected]> writes:
> Bisected my .emacs and this was the culprit:
>
> ;; editorconfig formatting support
> ;;;================================
> (when (locate-library "editorconfig")
> (editorconfig-mode 1)
> (setq editorconfig-exclude-regexps '("\\.jar$")))
>
> Upgrading editorconfig to newest in melpa didn't help.
>
> Neither did trying to exclude org files from editorconfig.
>
> But in any case, not a bug in org mode..
This is not the first time we are getting editorconfig clashing with Org
settings.
May you try the attached patch?
It should override editorconfig settings.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-mode-Be-more-aggressive-setting-tab-width-to-8.patch --]
[-- Type: text/x-patch, Size: 1789 bytes --]
From 23ecab7afe592df54fad0608eeb0888d74f3ba42 Mon Sep 17 00:00:00 2001
Message-ID: <23ecab7afe592df54fad0608eeb0888d74f3ba42.1741801559.git.yantar92@posteo.net>
From: Ihor Radchenko <[email protected]>
Date: Wed, 12 Mar 2025 18:45:11 +0100
Subject: [PATCH] org-mode: Be more aggressive setting tab-width to 8
* lisp/org.el (org--set-tab-width): New helper to set `tab-width'.
(org-mode): Override file-local and directory-local settings for
`tab-width', if any. With non-standard `tab-width', parser cannot
work properly.
Reported-by: Steinar Bang <[email protected]>
Link: https://orgmode.org/list/[email protected]
---
lisp/org.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index bc61a7c462..ee2d6eaa32 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4970,6 +4970,10 @@ (defvar org-mode-tags-syntax-table
st)
"Syntax table including \"@\" and \"_\" as word constituents.")
+(defun org--set-tab-width ()
+ "Set `tab-width' to be 8."
+ (setq-local tab-width 8))
+
;;;###autoload
(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
@@ -4992,7 +4996,11 @@ (define-derived-mode org-mode outline-mode "Org"
(setq-local org-mode-loading t)
;; Force tab width - indentation is significant in lists, so we need
;; to make sure that it is consistent across configurations.
- (setq-local tab-width 8)
+ (org--set-tab-width)
+ ;; Really force it, even if dir-locals or file-locals set it - we
+ ;; need tab-width = 8 as a part of Org syntax.
+ (add-hook 'hack-dir-local-get-variables-functions
+ #'org--set-tab-width -90 'local)
(org-load-modules-maybe)
(when org-agenda-file-menu-enabled
(org-install-agenda-files-menu))
--
2.47.1
[-- Attachment #3: Type: text/plain, Size: 224 bytes --]
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-12 17:47 ` Ihor Radchenko
@ 2025-03-14 17:23 ` Steinar Bang
2025-03-14 18:15 ` Ihor Radchenko
0 siblings, 1 reply; 16+ messages in thread
From: Steinar Bang @ 2025-03-14 17:23 UTC (permalink / raw)
To: emacs-orgmode
>>>>> Ihor Radchenko <[email protected]>:
> This is not the first time we are getting editorconfig clashing with Org
> settings.
> May you try the attached patch?
> It should override editorconfig settings.
I did a fresh clone of org-mode, built with "make autoloads", and added
the following to .emacs:
(let ((git-org-dir (expand-file-name "~/git/org-mode")))
(when (file-directory-p git-org-dir)
(add-to-list 'load-path (concat git-org-dir "/lisp"))))
I started a fresh emacs on the offending org-mode file and I still had
the problem.
I applied the patch, rebuilt org-mode with "make autoloads" and started
a fresh emacs on the file, and still had the problem. I.e. the patch
didn't make a difference.
I have also tried to exclude org mode files from editorconfig by adding
".org" to editorconfig-exclude-regexps, but that didn't help, either:
(when (locate-library "editorconfig")
(editorconfig-mode 1)
(setq editorconfig-exclude-regexps '("\\.jar$" "\\.org$")))
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-14 17:23 ` Steinar Bang
@ 2025-03-14 18:15 ` Ihor Radchenko
2025-03-14 22:52 ` Steinar Bang
0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-14 18:15 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
Steinar Bang <[email protected]> writes:
> ...the patch
> didn't make a difference.
So, we need to investigate further.
> I have also tried to exclude org mode files from editorconfig by adding
> ".org" to editorconfig-exclude-regexps, but that didn't help, either:
>
> (when (locate-library "editorconfig")
> (editorconfig-mode 1)
> (setq editorconfig-exclude-regexps '("\\.jar$" "\\.org$")))
May it be that you are using built-in version of edittorconfig?
I am afraid that the built-in version ignores
`editorconfig-exclude-regexps'.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-14 18:15 ` Ihor Radchenko
@ 2025-03-14 22:52 ` Steinar Bang
2025-03-15 7:42 ` Ihor Radchenko
0 siblings, 1 reply; 16+ messages in thread
From: Steinar Bang @ 2025-03-14 22:52 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> Ihor Radchenko <[email protected]>:
> May it be that you are using built-in version of edittorconfig?
> I am afraid that the built-in version ignores
> `editorconfig-exclude-regexps'.
'M-x locate-library RET editorconfig RET' says
Library is file ~/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig.elc
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-14 22:52 ` Steinar Bang
@ 2025-03-15 7:42 ` Ihor Radchenko
2025-03-15 20:50 ` Steinar Bang
0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-15 7:42 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
Steinar Bang <[email protected]> writes:
>> May it be that you are using built-in version of edittorconfig?
> ...
> Library is file ~/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig.elc
Ok. So, whatever the problem is, it is not with Emacs itself.
You may consider reporting about `editorconfig-exclude-regexps' to
editorconfig upstream.
As for Org mode, may you try another version of the patch (attached)?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-org-mode-Be-more-aggressive-setting-tab-width-to-.patch --]
[-- Type: text/x-patch, Size: 1779 bytes --]
From 97ded0b6a7e014e55dc437bca1330b31246e4617 Mon Sep 17 00:00:00 2001
Message-ID: <97ded0b6a7e014e55dc437bca1330b31246e4617.1742024480.git.yantar92@posteo.net>
From: Ihor Radchenko <[email protected]>
Date: Wed, 12 Mar 2025 18:45:11 +0100
Subject: [PATCH v2] org-mode: Be more aggressive setting tab-width to 8
* lisp/org.el (org--set-tab-width): New helper to set `tab-width'.
(org-mode): Override file-local and directory-local settings for
`tab-width', if any. With non-standard `tab-width', parser cannot
work properly.
Reported-by: Steinar Bang <[email protected]>
Link: https://orgmode.org/list/[email protected]
---
lisp/org.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index bc61a7c462..70a903b0d2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4970,6 +4970,10 @@ (defvar org-mode-tags-syntax-table
st)
"Syntax table including \"@\" and \"_\" as word constituents.")
+(defun org--set-tab-width ()
+ "Set `tab-width' to be 8."
+ (setq-local tab-width 8))
+
;;;###autoload
(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
@@ -4992,7 +4996,11 @@ (define-derived-mode org-mode outline-mode "Org"
(setq-local org-mode-loading t)
;; Force tab width - indentation is significant in lists, so we need
;; to make sure that it is consistent across configurations.
- (setq-local tab-width 8)
+ (org--set-tab-width)
+ ;; Really force it, even if dir-locals or file-locals set it - we
+ ;; need tab-width = 8 as a part of Org syntax.
+ (add-hook 'hack-local-variables-hook
+ #'org--set-tab-width -90 'local)
(org-load-modules-maybe)
(when org-agenda-file-menu-enabled
(org-install-agenda-files-menu))
--
2.47.1
[-- Attachment #3: Type: text/plain, Size: 223 bytes --]
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-15 7:42 ` Ihor Radchenko
@ 2025-03-15 20:50 ` Steinar Bang
2025-03-16 7:36 ` Ihor Radchenko
0 siblings, 1 reply; 16+ messages in thread
From: Steinar Bang @ 2025-03-15 20:50 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> Ihor Radchenko <[email protected]>:
> Ok. So, whatever the problem is, it is not with Emacs itself.
> You may consider reporting about `editorconfig-exclude-regexps' to
> editorconfig upstream.
Will do!
> As for Org mode, may you try another version of the patch (attached)?
No change in behaviour with the patch compared to org-mode HEAD.
I rebuilt org-mode with "make autoloads" and started a fresh emacs.
When I open:
emacs ~/git/bang-bompom/README.org
and then press TAB on the top item, the error occurs.
The README above can be found here:
https://github.com/steinarb/bang-bompom/blob/master/README.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-15 20:50 ` Steinar Bang
@ 2025-03-16 7:36 ` Ihor Radchenko
2025-03-17 18:23 ` Steinar Bang
0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-16 7:36 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
Steinar Bang <[email protected]> writes:
>> As for Org mode, may you try another version of the patch (attached)?
>
> No change in behaviour with the patch compared to org-mode HEAD.
>
> I rebuilt org-mode with "make autoloads" and started a fresh emacs.
>
> When I open:
> emacs ~/git/bang-bompom/README.org
> and then press TAB on the top item, the error occurs.
>
> The README above can be found here:
> https://github.com/steinarb/bang-bompom/blob/master/README.org
What about the attached?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v3-0001-org-mode-Be-more-aggressive-setting-tab-width-to-.patch --]
[-- Type: text/x-patch, Size: 2058 bytes --]
From 4d27f5ca930e38a72e44e15368c84db985adbcd4 Mon Sep 17 00:00:00 2001
Message-ID: <4d27f5ca930e38a72e44e15368c84db985adbcd4.1742110532.git.yantar92@posteo.net>
From: Ihor Radchenko <[email protected]>
Date: Wed, 12 Mar 2025 18:45:11 +0100
Subject: [PATCH v3] org-mode: Be more aggressive setting tab-width to 8
* lisp/org.el (org--set-tab-width): New helper to set `tab-width'.
(org-mode): Override file-local and directory-local settings for
`tab-width', if any. With non-standard `tab-width', parser cannot
work properly.
Reported-by: Steinar Bang <[email protected]>
Link: https://orgmode.org/list/[email protected]
---
lisp/org.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index bc61a7c462..24c33d9cc0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4970,6 +4970,10 @@ (defvar org-mode-tags-syntax-table
st)
"Syntax table including \"@\" and \"_\" as word constituents.")
+(defun org--set-tab-width (&rest _)
+ "Set `tab-width' to be 8."
+ (setq-local tab-width 8))
+
;;;###autoload
(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
@@ -4992,7 +4996,16 @@ (define-derived-mode org-mode outline-mode "Org"
(setq-local org-mode-loading t)
;; Force tab width - indentation is significant in lists, so we need
;; to make sure that it is consistent across configurations.
- (setq-local tab-width 8)
+ (org--set-tab-width)
+ ;; Really force it, even if dir-locals or file-locals set it - we
+ ;; need tab-width = 8 as a part of Org syntax.
+ (add-hook 'hack-local-variables-hook
+ #'org--set-tab-width 90 'local)
+ ;; In Emacs <30, editorconfig-mode uses advices, so we cannot rely
+ ;; upon `hack-local-variables-hook' to run after editorconfig
+ ;; tab-width settings are applied.
+ (add-hook 'editorconfig-after-apply-functions
+ #'org--set-tab-width 90 'local)
(org-load-modules-maybe)
(when org-agenda-file-menu-enabled
(org-install-agenda-files-menu))
--
2.47.1
[-- Attachment #3: Type: text/plain, Size: 223 bytes --]
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-16 7:36 ` Ihor Radchenko
@ 2025-03-17 18:23 ` Steinar Bang
2025-03-22 8:23 ` Ihor Radchenko
0 siblings, 1 reply; 16+ messages in thread
From: Steinar Bang @ 2025-03-17 18:23 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
>>>>> Ihor Radchenko <[email protected]>:
> What about the attached?
Hm... seems to be working from a brief test.
Applied with "patch -p1" on top of currrent org-mode git HEAD and then
ran "make autoloads" and then started a fresh emacs with
emacs ~/git/bang-bompom/README.org
and pressed TAB on the top node.
Tree opened normally without an error message
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-17 18:23 ` Steinar Bang
@ 2025-03-22 8:23 ` Ihor Radchenko
2025-09-27 7:07 ` Steinar Bang
0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2025-03-22 8:23 UTC (permalink / raw)
To: Steinar Bang; +Cc: emacs-orgmode
Steinar Bang <[email protected]> writes:
>>>>>> Ihor Radchenko <[email protected]>:
>
>> What about the attached?
>
> Hm... seems to be working from a brief test.
>
> Applied with "patch -p1" on top of currrent org-mode git HEAD and then
> ran "make autoloads" and then started a fresh emacs with
> emacs ~/git/bang-bompom/README.org
> and pressed TAB on the top node.
>
> Tree opened normally without an error message
Applied, onto bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0dc647ff54
Fixed.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)]
2025-03-22 8:23 ` Ihor Radchenko
@ 2025-09-27 7:07 ` Steinar Bang
2025-09-27 7:29 ` Steinar Bang
2025-09-27 8:28 ` Steinar Bang
0 siblings, 2 replies; 16+ messages in thread
From: Steinar Bang @ 2025-09-27 7:07 UTC (permalink / raw)
To: emacs-orgmode
Just making a note that I reported this as an org-mode bug yesterday,
but that was because I had forgotten this thread.
The reason the problem popped up again is probably that I recently
(well... early august) upgraded my debian systems from v 12 "bookworm"
to v 13 "trixie" and am still clearing up stuff from that upgrade, in
particular around emacs (which has many customizations and ELPA packages
and some modes from git clones, and I was using emacs 30.1 from
backports on "bookworm" and switched to the main version on "trixie"
(which should be identical except for the build and dependencies, but is
still different...)).
Anyway... having learned from past experiences I cleaned out ELPA and
reinstalled the packages I needed, using the versions bundled with emacs
as far as possible.
But that probably means I am now running org-mode without Ihor
Radchenko's patches from March 2025...?
locate-library for 'org' says:
Library is file /usr/share/emacs/30.1/lisp/org/org.elc
I am running editorconfig from elpa, locate-library says:
Library is file ~/.emacs.d/elpa/editorconfig-20250809.139/editorconfig.elc
(from august on the day after the upgrade from bookworm to trixie)
Doesn't look like I ever reported editorconfig-exclude-regexps not
working (as I promised to do, back in March), based on my list of
editorconfig issues, but I will do so now:
https://github.com/issues/created?q=is%3Aissue%20archived%3Afalse%20author%3A%40me%20sort%3Aupdated-desc%20editorconfig
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-09-27 8:28 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 20:40 [BUG] Got error opening existing org file in emacs 30.1 [9.7.11 (release_9.7.11 @ /usr/share/emacs/30.1/lisp/org/)] Steinar Bang
2025-02-28 23:10 ` Rohit Patnaik
2025-03-11 18:32 ` Ihor Radchenko
2025-03-11 22:40 ` Steinar Bang
2025-03-12 17:47 ` Ihor Radchenko
2025-03-14 17:23 ` Steinar Bang
2025-03-14 18:15 ` Ihor Radchenko
2025-03-14 22:52 ` Steinar Bang
2025-03-15 7:42 ` Ihor Radchenko
2025-03-15 20:50 ` Steinar Bang
2025-03-16 7:36 ` Ihor Radchenko
2025-03-17 18:23 ` Steinar Bang
2025-03-22 8:23 ` Ihor Radchenko
2025-09-27 7:07 ` Steinar Bang
2025-09-27 7:29 ` Steinar Bang
2025-09-27 8:28 ` Steinar Bang
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).