Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721124 - app-emacs/ebuild-mode should use tabs for indentation when editing metadata.xml
Summary: app-emacs/ebuild-mode should use tabs for indentation when editing metadata.xml
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 17:35 UTC by Mike Gilbert
Modified: 2024-10-03 13:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2020-05-05 17:35:59 UTC
app-vim/gentoo-syntax uses tabs for indentation in metadata.xml.

https://gitweb.gentoo.org/proj/gentoo-syntax.git/tree/ftplugin/gentoo-metadata.vim?h=gentoo-syntax-20200120#n16

It would be nice if emacs would do the same.
Comment 1 Ulrich Müller gentoo-dev 2020-05-06 08:09:50 UTC
I would argue the other way around, Emacs uses two spaces, to Vim should do the same. :-) Two spaces is also what was always used for all XML documentation files.

Anyway, every time this was mentioned in gentoo-dev in the past, there was no agreement. So the policy is to have no policy:
https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/index.html#syntax
Comment 2 Mike Gilbert gentoo-dev 2020-05-06 12:01:23 UTC
I don’t understand how we have a policy for white space in ebuilds, but not metadata.xml.
Comment 3 Ulrich Müller gentoo-dev 2020-05-06 13:02:53 UTC
(In reply to Mike Gilbert from comment #2)
> I don’t understand how we have a policy for white space in ebuilds, but not
> metadata.xml.

"My 2 cents: So long as it is a well-formed XML document and doesn't
look horribly ugly in an editor, it really doesn't matter what we use,
and I don't think we need a policy for it."
https://archives.gentoo.org/gentoo-dev/message/7225591b720fee442f8d25c48489ff33

:)
Comment 4 Ulrich Müller gentoo-dev 2024-10-03 13:06:48 UTC
I've made this configurable through the ebuild-mode-xml-indent-tabs variable some time ago:

https://gitweb.gentoo.org/proj/ebuild-mode.git/commit/?id=54a775dc17a797414ee2c9a624decf0fa7d07e75

commit 54a775dc17a797414ee2c9a624decf0fa7d07e75
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Sun Jun 5 11:44:21 2022 +0200

    Indent XML with tabs or two spaces
    
    * ebuild-mode.el (ebuild-repo-mode): Indent XML with tabs or two
    spaces. Set indent-tabs-mode accordingly.
    (ebuild-mode-xml-indent-tabs): New custom variable.
    
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>