GNU bug report logs -
#72790
30.0.90; editorconfig doesn't set tab_width to a default value
Previous Next
Reported by: Damien Cassou <damien <at> cassou.me>
Date: Sat, 24 Aug 2024 13:37:01 UTC
Severity: normal
Tags: wontfix
Merged with 72808
Found in version 30.0.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72790 in the body.
You can then email your comments to 72790 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72790
; Package
emacs
.
(Sat, 24 Aug 2024 13:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Damien Cassou <damien <at> cassou.me>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 24 Aug 2024 13:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
when a .editorconfig file assigns a value for "indent_size" and no
value for "tab_width", I expect "tab_width" to default to the value of
"indent_size" as described in the documentation [1]. Unfortunately,
the Emacs variable `tab-width` isn't set by the builtin version of
`editorconfig-mode` in this case.
Possible workarounds:
1. One can use MELPA's version of editorconfig instead of the builtin
one; or
2. One can explicitly set "tab_width" in .editorconfig
How to reproduce:
1. Create a directory "~/tmp/emacs-test-indent-size"
2. Put the 2 attached files (".editorconfig" and "foo.js") inside
3. Run the code below
$ emacs --batch -Q \
--eval "(require 'editorconfig)" \
--eval "(find-file \"~/tmp/emacs-test-indent-size/foo.js\")" \
--eval "(editorconfig-apply)" \
--eval "(message \"%S\" (map-keys editorconfig-properties-hash)))"
Actual: (indent_style indent_size)
Expected: (indent_style indent_size tab_width)
4. Download editorconfig version 20240813.801 from [2]
5. Rerun the command above but with the following as first --eval argument:
--eval "(add-to-list 'load-path \"/path/to/editorconfig-20240813.801\")"
You get the expected result.
[1] https://editorconfig.org/
[2] https://melpa.org/#/editorconfig
In GNU Emacs 30.0.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.0, Xaw3d scroll bars)
Repository revision: 391e6f99fc8eed9cf2ede473b84be194aaab21c7
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 40 (Workstation Edition)
--
Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[.editorconfig (application/octet-stream, attachment)]
[foo.js (text/javascript, attachment)]
Forcibly Merged 72790 72808.
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> debbugs.gnu.org
.
(Fri, 01 Nov 2024 02:43:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Nov 2024 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.