[{"id":1761155,"web_url":"http://patchwork.ozlabs.org/comment/1761155/","msgid":"<36055f63-58c7-7346-21fb-60ee42874430@redhat.com>","list_archive_url":null,"date":"2017-08-31T16:13:38","subject":"Re: [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles to\n\tauto-mode","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 08/31/2017 08:14 AM, Marc-André Lureau wrote:\n> QEMU uses non-conventional makefile filenames. Ease the life of emacs\n> developpers a bit by appending to the auto-mode-alist.\n\ns/emacs developpers/developers using emacs/ (typo, and avoids an\nambiguity on whether you are describing people that develop emacs rather\nthan qemu)\n\n> \n> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n> ---\n\nThe idea itself makes sense to me; although I'm not enough of a Lisp\nguru to state if your changes are the ideal way to do it.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=208.118.235.17; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [208.118.235.17])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjnWP10p5z9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 02:14:25 +1000 (AEST)","from localhost ([::1]:56606 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnS6o-00030p-0W\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 12:14:22 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47348)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnS6S-00030c-RZ\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:14:01 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnS6P-0005zL-LP\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:14:00 -0400","from mx1.redhat.com ([209.132.183.28]:49244)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dnS6P-0005zE-CK\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:13:57 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 6C602C0467C6\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 16:13:56 +0000 (UTC)","from [10.10.122.186] (ovpn-122-186.rdu2.redhat.com [10.10.122.186])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 60F71A3973;\n\tThu, 31 Aug 2017 16:13:38 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 6C602C0467C6","To":"=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\tqemu-devel@nongnu.org","References":"<20170831131425.3953-1-marcandre.lureau@redhat.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<36055f63-58c7-7346-21fb-60ee42874430@redhat.com>","Date":"Thu, 31 Aug 2017 11:13:38 -0500","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170831131425.3953-1-marcandre.lureau@redhat.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"x7WULSIKWs75VjnV1HHIE9BU6cixqIDuX\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]);\n\tThu, 31 Aug 2017 16:13:56 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles to\n\tauto-mode","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"armbru@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761546,"web_url":"http://patchwork.ozlabs.org/comment/1761546/","msgid":"<878thydawr.fsf@dusky.pond.sub.org>","list_archive_url":null,"date":"2017-09-01T09:29:40","subject":"Re: [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles to\n\tauto-mode","submitter":{"id":2645,"url":"http://patchwork.ozlabs.org/api/people/2645/","name":"Markus Armbruster","email":"armbru@redhat.com"},"content":"Marc-André Lureau <marcandre.lureau@redhat.com> writes:\n\n> QEMU uses non-conventional makefile filenames. Ease the life of emacs\n> developpers a bit by appending to the auto-mode-alist.\n>\n> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n> ---\n>  .dir-locals.el      | 7 ++++++-\n>  Makefile.target     | 2 --\n>  trace/Makefile.objs | 2 --\n>  3 files changed, 6 insertions(+), 5 deletions(-)\n>\n> diff --git a/.dir-locals.el b/.dir-locals.el\n> index 3ac0cfc6f0..13ec483765 100644\n> --- a/.dir-locals.el\n> +++ b/.dir-locals.el\n> @@ -1,2 +1,7 @@\n>  ((c-mode . ((c-file-style . \"stroustrup\")\n> -\t    (indent-tabs-mode . nil))))\n> +            (indent-tabs-mode . nil)))\n> + (nil . ((eval . (setq auto-mode-alist (append\n> +                                        '((\"Makefile.*\" . makefile-gmake-mode)\n> +                                          (\"\\\\.mak\\\\'\" . makefile-gmake-mode))\n> +                                        auto-mode-alist))))\n> +      ))\n\nThis makes Emacs ask for confirmation like this:\n\n    The local variables list in /home/armbru/work/qemu/\n    contains values that may not be safe (*).\n\n    Do you want to apply it?  You can type\n    y  -- to apply the local variables list.\n    n  -- to ignore the local variables list.\n    !  -- to apply the local variables list, and permanently mark these\n          values (*) as safe (in the future, they will be set automatically.)\n\n      * eval : (setq auto-mode-alist (append (quote ((\"Makefile.*\" . makefile-gmake-mode) (\"\\\\.mak\\\\'\" . makefile-gmake-mode) (\"\\\\.json\\\\'\" . python-mode))) auto-mode-alist))\n\nNot a nice user experience.  For detailed information why and how this\nstuff works, see\nhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Variables.html\n\nWhy can't we simply use the usual file name extension like a normal\nperson?\n\nIf that's too much to ask, then I'd recommend adding modelines (like the\nones you delete) to the Makefiles that lack one.\n\n> diff --git a/Makefile.target b/Makefile.target\n> index 7f42c45db8..159602c83c 100644\n> --- a/Makefile.target\n> +++ b/Makefile.target\n> @@ -1,5 +1,3 @@\n> -# -*- Mode: makefile -*-\n> -\n>  BUILD_DIR?=$(CURDIR)/..\n>  \n>  include ../config-host.mak\n> diff --git a/trace/Makefile.objs b/trace/Makefile.objs\n> index afd571c3ec..d1f1e646e5 100644\n> --- a/trace/Makefile.objs\n> +++ b/trace/Makefile.objs\n> @@ -1,5 +1,3 @@\n> -# -*- mode: makefile -*-\n> -\n>  $(BUILD_DIR)/trace-events-all: $(trace-events-files)\n>  \t$(call quiet-command,cat $^ > $@)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=armbru@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkDW070Nvz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 19:30:35 +1000 (AEST)","from localhost ([::1]:60415 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dniHZ-00080m-H4\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 05:30:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:32890)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dniGs-0007de-TR\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:29:52 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dniGo-0003QU-Qz\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:29:50 -0400","from mx1.redhat.com ([209.132.183.28]:41248)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1dniGo-0003QB-HV\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:29:46 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 8A72C7EA9A\n\tfor <qemu-devel@nongnu.org>; Fri,  1 Sep 2017 09:29:45 +0000 (UTC)","from blackfin.pond.sub.org (ovpn-116-75.ams2.redhat.com\n\t[10.36.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id DAE5C5C1A1;\n\tFri,  1 Sep 2017 09:29:41 +0000 (UTC)","by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 121A21138662; Fri,  1 Sep 2017 11:29:40 +0200 (CEST)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 8A72C7EA9A","From":"Markus Armbruster <armbru@redhat.com>","To":"=?utf-8?q?Marc-Andr=C3=A9?= Lureau <marcandre.lureau@redhat.com>","References":"<20170831131425.3953-1-marcandre.lureau@redhat.com>","Date":"Fri, 01 Sep 2017 11:29:40 +0200","In-Reply-To":"<20170831131425.3953-1-marcandre.lureau@redhat.com> (\n\t=?utf-8?b?Ik1hcmMtQW5kcsOp?= Lureau\"'s message of \"Thu,\n\t31 Aug 2017 14:14:24 +0100\")","Message-ID":"<878thydawr.fsf@dusky.pond.sub.org>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tFri, 01 Sep 2017 09:29:45 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 1/2] .dir-locals.el: add makefiles to\n\tauto-mode","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]