From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: berrange@redhat.com, armbru@redhat.com,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] .dir-locals.el: add json schema to auto-mode
Date: Thu, 31 Aug 2017 11:19:44 -0500 [thread overview]
Message-ID: <c0fa5298-e696-0a44-429f-a5f87ed89564@redhat.com> (raw)
In-Reply-To: <20170831131425.3953-2-marcandre.lureau@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
On 08/31/2017 08:14 AM, Marc-André Lureau wrote:
> The json schema is more friendly to python-mode since it doesn't
> follow strictly json (comments to start with).
I found that hard to read, and missing a key word of 'emacs'. Maybe
reword it as:
Under emacs, our QAPI files (.json suffix) are more friendly to edit
under python-mode than the per-suffix default of json-mode (in part
because of our use of comments).
>
> All schema files add file variables to set the python mode, but most
> tests didn't. This will cover all json files now.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> +++ b/.dir-locals.el
> @@ -2,6 +2,8 @@
> (indent-tabs-mode . nil)))
> (nil . ((eval . (setq auto-mode-alist (append
> '(("Makefile.*" . makefile-gmake-mode)
> - ("\\.mak\\'" . makefile-gmake-mode))
> + ("\\.mak\\'" . makefile-gmake-mode)
> + ;; json schema is not pure json
> + ("\\.json\\'" . python-mode))
> auto-mode-alist))))
> ))
Not sure if the comment could be worded better, maybe:
;; Our .json files are QAPI, and allow more than pure json
Again, the idea makes sense to me, but you may want to get feedback from
other power emacs users.
[Also, don't forget the 0/2 cover letter if you send v2]
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-08-31 16:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 13:14 [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles to auto-mode Marc-André Lureau
2017-08-31 13:14 ` [Qemu-devel] [PATCH 2/2] .dir-locals.el: add json schema " Marc-André Lureau
2017-08-31 16:19 ` Eric Blake [this message]
2017-08-31 16:13 ` [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles " Eric Blake
2017-09-01 9:29 ` Markus Armbruster
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=c0fa5298-e696-0a44-429f-a5f87ed89564@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/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.
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 NNTP newsgroup(s).