From: Ihor Radchenko <yantar92@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: jcs090218@gmail.com, bjorn.bidar@thaodan.de,
Eli Zaretskii <eliz@gnu.org>,
8slashes+git@gmail.com, 70105@debbugs.gnu.org
Subject: bug#70105: 30.0.50; Emacs should support EditorConfig out of the box
Date: Tue, 18 Jun 2024 16:21:26 +0000 [thread overview]
Message-ID: <87y172ql15.fsf@localhost> (raw)
In-Reply-To: <jwvwmmmbe9c.fsf-monnier+emacs@gnu.org>
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> In particular, Org mode needs to use a fixed `tab-width' and
>> editorconfig must not override that (it is a part of the syntax).
>
> I don't understand: `tab-width` mostly affects the display, how can it
> break Org mode?
Because Org mode syntax depends on indentation for lists:
- parent list
- sub-list
- sub-sub-list
When the indentation has tabs in it, (current-indentation) return value
becomes a variable of `tab-width'. As a result, Org file syntax
unexpectedly becomes dependent on seemingly unrelated Emacs
configuration toggle.
(I also considered let-binding `tab-width' when Org parser the file, but
lists will then look funny visually)
> In any case, Org is not the only mode with such needs (Makefile, Haskell,
> Python, come to mind). But also, disabling editorconfig wholesale seems
> a bit crude. Maybe we'll need a more targeted way to address the problem
> (and there's always `hack-local-variables-hook`).
I did not imply that editorconfig should be _completely_ disabled.
Just for tab-width in our case.
I guess that `hack-local-variables-hook' should be an ok
option. Although it feels a bit funny to:
1. Set tab-width in org-mode body
2. Set it again in hack-local-variables-hook
>> We already had a user reporting problems caused by
>> https://github.com/editorconfig/editorconfig-emacs where tab-width was
>> changed to 4 by default.
>
> The upstream code sets `tab-width` in more cases than the code
> I'm submitting, so maybe I already fixed the problem?
> Do you have a more precise URL for the issue?
Hmm... Sorry, I cannot see anything in the list archives.
Either I made things up in my mind or it was discussed on IRC/Matrix.
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>
next prev parent reply other threads:[~2024-06-18 16:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-31 13:44 bug#70105: 30.0.50; Emacs should support EditorConfig out of the box Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-31 14:25 ` Eli Zaretskii
2024-03-31 20:40 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-31 22:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-06 23:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-08 12:50 ` Eli Zaretskii
2024-06-09 4:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 6:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 6:21 ` Ihor Radchenko
2024-06-18 13:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 16:21 ` Ihor Radchenko [this message]
2024-06-18 19:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 19:55 ` Ihor Radchenko
2024-06-18 20:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 9:10 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87v826hb13.fsf@>
2024-06-18 12:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 19:26 ` Stefan Kangas
2024-06-18 19:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-18 23:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 5:48 ` Rudolf Schlatte
2024-06-19 6:01 ` Stefan Kangas
2024-06-19 8:18 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 15:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 15:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 16:52 ` Stefan Kangas
2024-06-19 17:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 19:31 ` Stefan Kangas
2024-06-19 19:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 20:51 ` Stefan Kangas
2024-06-21 14:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 15:52 ` Ihor Radchenko
2024-06-19 15:57 ` Eli Zaretskii
2024-06-20 16:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-09 11:49 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y172ql15.fsf@localhost \
--to=yantar92@posteo.net \
--cc=70105@debbugs.gnu.org \
--cc=8slashes+git@gmail.com \
--cc=bjorn.bidar@thaodan.de \
--cc=eliz@gnu.org \
--cc=jcs090218@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.