* bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes
@ 2018-08-16 16:50 Tom Tromey
2022-05-18 12:18 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2018-08-16 16:50 UTC (permalink / raw)
To: 32457
git can be configured to complain about indenting with tabs
by using "whitespace=tab-in-indent" in .gitattributes.
It would be nice if Emacs automatically detected this and set
indent-tabs-mode to nil.
git attributes can be queried using "git check-attr", for instance:
$ git check-attr whitespace -- src/librustc_codegen_llvm/debuginfo/metadata.rs
src/librustc_codegen_llvm/debuginfo/metadata.rs: whitespace: tab-in-indent,trailing-space,tabwidth=4
Tom
In GNU Emacs 26.1.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2018-08-07 built on pokyo
Repository revision: cd9032532d119b35685dc078b8156023122f6dcd
Windowing system distributor 'Fedora Project', version 11.0.11906000
System Description: Fedora release 28 (Twenty Eight)
Recent messages:
Mark saved where search started
Invoking man 1 git-config in the background
1 git-config man page formatted
Mark saved where search started [3 times]
Invoking man gitattributes in the background
gitattributes man page formatted
Mark saved where search started
Invoking man 1 git-check-attr in the background
1 git-check-attr man page formatted
ggtags-make-project: (error "‘global’ non-zero exit: global: /home/tromey/Rust/rust/GRTAGS seems corrupted.")
Configured using:
'configure --prefix=/home/tromey/Emacs/install --with-modules'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Rust
Minor modes in effect:
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
ggtags-mode: t
bug-reference-prog-mode: t
diff-auto-refine-mode: t
flyspell-mode: t
shell-dirtrack-mode: t
which-function-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-notify-mode: t
erc-notifications-mode: t
erc-match-mode: t
erc-services-mode: t
erc-networks-mode: t
erc-hl-nicks-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
savehist-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
auto-fill-function: rust-do-auto-fill
transient-mark-mode: t
Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/26.1.50/lisp/play/bubbles
Features:
(shadow emacsbug tabify man gnus-fun thai-util thai-word find-file
log-edit markdown-mode noutline outline vc-annotate python tramp-sh
sh-script smie executable eieio-opt speedbar sb-image ezimage dframe dxr
js sgml-mode cl-print wgrep find-dired grep smerge-mode rust-mode
term/xterm xterm log-view pcvs-util copyright pulse pcase whitespace
goto-addr jka-compr gnus-html url-queue help-fns radix-tree url-cache
mm-url erc-list erc-menu erc-join erc-ring erc-pcomplete erc-netsplit
erc-spelling erc-truncate idutils dabbrev asm-mode add-log ggtags etags
xref project compile bug-reference cc-mode cc-fonts cc-guess cc-menus
cc-cmds url-http url url-proxy url-privacy url-history url-auth
url-cookie url-domsuf url-gw url-expand url-methods mailalias bbdb-sc
supercite regi mail-hist nnir shr-color shr svg dom browse-url qp
bbdb-gui bbdb-hooks bbdb-rmail rmailsum vc-mtn vc-hg vc-git diff-mode
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs sort smiley gnus-cite
flow-fill mm-archive gnus-async gnus-bcklg gnus-ml disp-table misearch
multi-isearch gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus
bbdb-snarf mail-extr bbdb-com network-stream nsm starttls gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache gnus-sum
gnus-group gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap
nnmail mail-source tls gnutls utf7 netrc nnoo gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums mail-utils mm-util mail-prsvr elec-pair flyspell ispell
diminish appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs
tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time which-func imenu autorevert filenotify desktop frameset
cus-start cus-load git-link url-util erc-track erc-notify
erc-desktop-notifications erc-match erc-services erc-networks
notifications dbus xml erc-hl-nicks easy-mmode color erc-button erc-fill
erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec
thingatpt pp dired-aux dired-x dired dired-loaddefs warnings advice
vc-dir ewoc vc vc-dispatcher flycheck cl-extra json map find-func
help-mode rx subr-x dash cc-styles cc-align cc-engine cc-vars cc-defs
bbdb cl timezone ange-ftp comint ansi-color ring server savehist
finder-inf bbdb-autoloads lisppaste-autoloads pydoc-info-autoloads
info-look info package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files 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 move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 1453366 216483)
(symbols 48 111622 37)
(miscs 40 27067 6968)
(strings 32 386270 48381)
(string-bytes 1 8566013)
(vectors 16 145046)
(vector-slots 8 2688470 145676)
(floats 8 599 1046)
(intervals 56 58879 2902)
(buffers 992 149))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes
2018-08-16 16:50 bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes Tom Tromey
@ 2022-05-18 12:18 ` Lars Ingebrigtsen
2022-05-18 13:31 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-18 12:18 UTC (permalink / raw)
To: Tom Tromey; +Cc: 32457
Tom Tromey <tom@tromey.com> writes:
> git can be configured to complain about indenting with tabs
> by using "whitespace=tab-in-indent" in .gitattributes.
>
> It would be nice if Emacs automatically detected this and set
> indent-tabs-mode to nil.
>
> git attributes can be queried using "git check-attr", for instance:
>
> $ git check-attr whitespace -- src/librustc_codegen_llvm/debuginfo/metadata.rs
> src/librustc_codegen_llvm/debuginfo/metadata.rs: whitespace: tab-in-indent,trailing-space,tabwidth=4
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I don't think this would be an appropriate feature for Emacs core -- it
would be too surprising if Emacs was setting `indent-tabs-mode' based on
external factors like this (and I'm sure there's a lot of other hints it
could be taking from other VCs).
It does sound like it could be a useful ELPA package, though, but I'm
closing this wishlist item in the Emacs bug tracker.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes
2022-05-18 12:18 ` Lars Ingebrigtsen
@ 2022-05-18 13:31 ` Robert Pluim
2022-05-18 14:22 ` Rudolf Schlatte
0 siblings, 1 reply; 4+ messages in thread
From: Robert Pluim @ 2022-05-18 13:31 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Tom Tromey, 32457
>>>>> On Wed, 18 May 2022 14:18:09 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Tom Tromey <tom@tromey.com> writes:
>> git can be configured to complain about indenting with tabs
>> by using "whitespace=tab-in-indent" in .gitattributes.
>>
>> It would be nice if Emacs automatically detected this and set
>> indent-tabs-mode to nil.
>>
>> git attributes can be queried using "git check-attr", for instance:
>>
>> $ git check-attr whitespace -- src/librustc_codegen_llvm/debuginfo/metadata.rs
>> src/librustc_codegen_llvm/debuginfo/metadata.rs: whitespace:
>> tab-in-indent,trailing-space,tabwidth=4
Lars> (I'm going through old bug reports that unfortunately weren't resolved
Lars> at the time.)
Lars> I don't think this would be an appropriate feature for Emacs core -- it
Lars> would be too surprising if Emacs was setting `indent-tabs-mode' based on
Lars> external factors like this (and I'm sure there's a lot of other hints it
Lars> could be taking from other VCs).
Lars> It does sound like it could be a useful ELPA package, though, but I'm
Lars> closing this wishlist item in the Emacs bug tracker.
.dir-locals.el supports 'eval', so anyone who wants this could put it there.
Robert
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes
2022-05-18 13:31 ` Robert Pluim
@ 2022-05-18 14:22 ` Rudolf Schlatte
0 siblings, 0 replies; 4+ messages in thread
From: Rudolf Schlatte @ 2022-05-18 14:22 UTC (permalink / raw)
To: 32457
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Wed, 18 May 2022 14:18:09 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:
>
> Lars> Tom Tromey <tom@tromey.com> writes:
> >> git can be configured to complain about indenting with tabs
> >> by using "whitespace=tab-in-indent" in .gitattributes.
> >>
> >> It would be nice if Emacs automatically detected this and set
> >> indent-tabs-mode to nil.
> >>
> >> git attributes can be queried using "git check-attr", for instance:
> >>
> >> $ git check-attr whitespace -- src/librustc_codegen_llvm/debuginfo/metadata.rs
> >> src/librustc_codegen_llvm/debuginfo/metadata.rs: whitespace:
> >> tab-in-indent,trailing-space,tabwidth=4
>
> Lars> (I'm going through old bug reports that unfortunately weren't resolved
> Lars> at the time.)
>
> Lars> I don't think this would be an appropriate feature for Emacs core -- it
> Lars> would be too surprising if Emacs was setting `indent-tabs-mode' based on
> Lars> external factors like this (and I'm sure there's a lot of other hints it
> Lars> could be taking from other VCs).
>
> Lars> It does sound like it could be a useful ELPA package, though, but I'm
> Lars> closing this wishlist item in the Emacs bug tracker.
>
> .dir-locals.el supports 'eval', so anyone who wants this could put it there.
There is also EditorConfig (https://editorconfig.org,
http://elpa.nongnu.org/nongnu/editorconfig.html) for setting
indent-tabs-mode and other variables according to a configuration file.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-18 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-16 16:50 bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes Tom Tromey
2022-05-18 12:18 ` Lars Ingebrigtsen
2022-05-18 13:31 ` Robert Pluim
2022-05-18 14:22 ` Rudolf Schlatte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).