From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jay Kamat Newsgroups: gmane.emacs.help Subject: Dir-Locals + Editorconfig Changes in Emacs 26 Date: Mon, 02 Oct 2017 13:55:33 -0400 Message-ID: <873771wi22.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506966983 16663 195.159.176.226 (2 Oct 2017 17:56:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Oct 2017 17:56:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 02 19:56:18 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz4wy-0003gA-9i for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Oct 2017 19:56:16 +0200 Original-Received: from localhost ([::1]:53580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz4x5-0006c9-LE for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Oct 2017 13:56:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz4wQ-0006c4-7q for help-gnu-emacs@gnu.org; Mon, 02 Oct 2017 13:55:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dz4wL-0004rL-Hg for help-gnu-emacs@gnu.org; Mon, 02 Oct 2017 13:55:42 -0400 Original-Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:45041) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dz4wL-0004px-C3 for help-gnu-emacs@gnu.org; Mon, 02 Oct 2017 13:55:37 -0400 Original-Received: by mail-qt0-x234.google.com with SMTP id y57so3410073qta.1 for ; Mon, 02 Oct 2017 10:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=4ACtGgM3AUc7+OLR/0hIDN/yeA2/OVQzr/ygSR/JoGU=; b=AkJrlc3tzmUQnpDAHm2mgh3rdJ4eOqQFocMTXf4ZBed1pvxX8bi5OXzUmaQy/ctPkQ 23feQ6P606NirEEMbpSTczFEiWOxF53sn2+g8yrrO/lGKdINSZVnfwKwWbFiDc0/6hkt 0iWC60oQJxN/rJ8/iDjEGRiusgXacnMswVZvXZ2/jBZH4IKzBT8ageb7fM/l18t12dR2 meDgVUv4ZRolRFUR8t7eINf6qGXOg/ZUfn+uf1R41uTNCAcjxv2doFf9ej+YRCfpTtvN hROtiOby5tdW2jEFMSL6ydGgqYXz0tPTTpBNdWZ1daRFblNnlg+AodJhUGCifHQ9M4ks wpzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=4ACtGgM3AUc7+OLR/0hIDN/yeA2/OVQzr/ygSR/JoGU=; b=dHiPGBMvZlrkwX/QhkFCHvkmmGx39uf5O2279qbrDcgsaL645wt4QAtbc0UEsE7IqI H0RN/W+mD33vcsVnvFVMM3P56zEhZcaBP/ENJZogs/wQ0ROm9DUkElgEboQx4GhQ15NB UQRpXH65olJOMTVLW72tMffQHzVNbnnRwJxZlbpXXrIslDcyx07WXhLkzOtCiGDdmF2w l6WY+BIu+H2GCBXFG14TixcXgidBSSHZeS7njPKzzBriGk21wmDak6TtgWSiTjl/PQLS bt1xHzOUXszYj7jpURxP/mORjS/J4wxG5YWTRdohXkGzNnO+TBfg1dFeZfvM4ExXOLUs 1cIg== X-Gm-Message-State: AHPjjUjHEpwTnnH5IPhTaEC77pevpkelMged9dSAgRm8HbY0oqhfJYXK UE8dG85ZjsQpdECVsq4OcB9+Lo/0 X-Google-Smtp-Source: AOwi7QCvwSBLKYmk5aDpPME2heF+Zu9VtU9jqxBbVmFKNtp6L3YjKN/8lmhFgHLxIue9zqmBelZ/Dw== X-Received: by 10.129.164.145 with SMTP id b139mr13113841ywh.493.1506966934986; Mon, 02 Oct 2017 10:55:34 -0700 (PDT) Original-Received: from laythe (lawn-128-61-56-215.lawn.gatech.edu. [128.61.56.215]) by smtp.gmail.com with ESMTPSA id l136sm4561400ywb.29.2017.10.02.10.55.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Oct 2017 10:55:34 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114501 Archived-At: Hi Everyone! I use an emacs plugin called 'editorconfig' which provides an editor independent way to set style configuration on a per-project basis, very similar to the dir-locals feature in Emacs. In emacs 25 and below, dir-locals and editorconfig interacted "as expected", in that, the dir-locals file was applied after the editorconfig, so dir-locals would take precedence over editorconfig settings. However, since emacs 26, this is reversed, where dir-locals is applied first, rather than last, and so editorconfig overrides dir-locals. I have filed a bug report to the project here to document it: https://github.com/editorconfig/editorconfig-emacs/issues/141 The reason that this is significant is that editorconfig not only lets you configure on a per-project basis, but recursively on a per machine basis as well, so if you have a editorconfig file in your home directory (as many people do) those settings will apply for every file on your system, overwriting dir-locals settings. Since dir-locals is more powerful and project-specific, I would much prefer dir-locals to override editorconfig. Editorconfig seems to apply on the 'after-change-major-mode' hook, as shown below: https://github.com/editorconfig/editorconfig-emacs/blob/master/editorconfig.el#L521-L531 I tried bisecting emacs to try to find a relevant change, but I wasn't able to compile some of the older versions due to ASLR-related(?) crashes I couldn't solve, so unfortunately that approach won't help me. I am willing to help out with this, both on the editorconfig and the emacs side of this to try and solve the issue, but I'm not sure where to begin (since I'm very new to emacs development). I'm essentially looking for one of: 1. A way to re-apply dir-locals settings manaully, so I can simply run that after editorconfig is done 2. A way to change dir-locals to apply after 'after-change-major-mode-hook' 3. A pointer to where dir-locals is applied in emacs source (since I couldn't easily bisect it) 4. (undesirable) A way to check if dir-locals has been applied, so I can turn of editorconfig in said situation. I'll admit I could probably figure this out by going through the emacs source code myself, but I thought it would be faster to try to find someone who has seen this before, and I also wanted to ask for opinions on this situation. Thanks in advance, -Jay Kamat