Subject: bug#73359: closed (Re: bug#73359: 30.0.91; editorconfig does not work on xml files)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 21 Sep 2024 10:37:02 +0000

Your bug report

#73359: 30.0.91; editorconfig does not work on xml files

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73359: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73359
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73359: 30.0.91; editorconfig does not work on xml files
From: Eli Zaretskii <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 21 Sep 2024 13:36:25 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Stefan Monnier <[email-masked]>
> Cc: Nguyễn Quốc Minh <[email-masked]>,
>   [email-masked]
> Date: Fri, 20 Sep 2024 14:58:54 -0400
> 
> > Stefan, this element of editorconfig-indentation-alist:
> >
> >       (nxml-mode nxml-child-indent (nxml-attribute-indent . 2))
> >
> > seems to violate the expected form of the elements, which is
> > (MODE . SETTING).  It was added as part of commit 8e143a2f300, whose
> > log says "Sync with upstream", so I suppose this form of the element
> > is supported by upstream, but not by Emacs?  I guess we need to
> > replace it with a function or something?
> 
> Yup.  I pushed the patch below to `emacs-30` for it.

Thanks, I'm therefore closing this bug.

> > Btw, can we clarify the doc string of editorconfig-indentation-alist,
> > where it says "where SETTING should obey the same rules as
> > `editorconfig-indent-size-vars'"?  Because if one looks at the doc
> > string of editorconfig-indent-size-vars, the "rules" are either
> > trivial or unclear.  If SETTING above should be one or more symbols
> > ("list of variables that need to be set to SIZE") or a function that
> > returns a list of (VAR . VAL) pairs, then why not say that in the doc
> > string of editorconfig-indentation-alist?
> 
> I didn't want to do it because it's redundant with the docstring of
> `editorconfig-indent-size-vars`, but see the patch where I tried to
> address your request.

Thanks.

Subject: 30.0.91; editorconfig does not work on xml files
From: Nguyễn Quốc Minh <[email-masked]>
To: [email-masked]
Date: Thu, 19 Sep 2024 14:29:48 +0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

I have encountered an issue when opening an xml file from emacs 30, here is
how to reproduce:
1. start emacs with 'emacs -Q -mm'
2. enable editorconfig-mode with 'M-x editorconfig-mode'
3. open an xml file, e.g., pom.xml from a Java project.
4. observe the minibuffer:

For information about GNU Emacs and the GNU system, type C-h C-a.
funcall-interactively: Text is read-only [10 times]
Quit
Editorconfig mode enabled
Quit
pom.xml has auto save data; consider M-x recover-this-file
Using vacuous schema
Unsupported element in ‘editorconfig-indentation-alist’:
((nxml-attribute-indent . 2) . 2)
Directory-local variables error: (wrong-type-argument listp Unsupported
element in ‘editorconfig-indentation-alist’: ((nxml-attribute-indent . 2) .
2))

My '.editorconfig' content:

root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.{java,proto}]
indent_size = 4

Best regards,
minh