From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
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 15:37:52 -0400 [thread overview]
Message-ID: <jwv7cemb1vi.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87y172ql15.fsf@localhost> (Ihor Radchenko's message of "Tue, 18 Jun 2024 16:21:26 +0000")
>>> 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)
If you use the `tab-width` set by the user then you have the advantage
that you parse the code in a way that is consistent with what the users
see (so the problem only bites the users who don't look at their code).
If you parse with a fixed `tab-width` OTOH the user may be puzzled
because the code looks like one thing to them but you parse it as
something else.
>> 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 mentioned it because that's the option that the upstream package offers.
> 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
There's also the option of saying that it's the user's fault.
It's hard to tell in general what would be the right behavior, so
I think it's important we look at concrete cases.
> 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.
I guess we'll have to wait to see if the issue pops up again.
Stefan
next prev parent reply other threads:[~2024-06-18 19:37 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
2024-06-18 19:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=jwv7cemb1vi.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--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 \
--cc=yantar92@posteo.net \
/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.