From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Dir-Locals + Editorconfig Changes in Emacs 26 Date: Wed, 04 Oct 2017 20:00:16 +0300 Message-ID: <83r2uiyhjz.fsf@gnu.org> References: <873771wi22.fsf@gmail.com> <83d1641brw.fsf@gnu.org> <87poa2532u.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507136463 29913 195.159.176.226 (4 Oct 2017 17:01:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Oct 2017 17:01:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 04 19:00:55 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 1dzn2S-0006gO-Gg for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Oct 2017 19:00:52 +0200 Original-Received: from localhost ([::1]:36159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzn2Z-0003Ts-Kf for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Oct 2017 13:00:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzn28-0003Tl-F2 for help-gnu-emacs@gnu.org; Wed, 04 Oct 2017 13:00:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzn25-0001Nl-El for help-gnu-emacs@gnu.org; Wed, 04 Oct 2017 13:00:32 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzn25-0001Ne-BL for help-gnu-emacs@gnu.org; Wed, 04 Oct 2017 13:00:29 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzn24-0002th-OR for help-gnu-emacs@gnu.org; Wed, 04 Oct 2017 13:00:29 -0400 In-reply-to: <87poa2532u.fsf@gmail.com> (message from Jay Kamat on Wed, 04 Oct 2017 11:45:45 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:114516 Archived-At: > From: Jay Kamat > Cc: help-gnu-emacs@gnu.org > Date: Wed, 04 Oct 2017 11:45:45 -0400 > > > Could it be that the major mode hook is now called twice, and > > Editorconfig fails to notice that one of these calls is to turn the > > mode off? > > Is `after-change-major-mode' getting called twice in emacs 26, but not > 25? No, the mode is called twice, first time to turn it off, then to turn it on. The mode hook is also called twice, for the same reason. I don't know what that means for after-change-major-mode functions, but maybe they are also called twice > I can't seem to find a related news entry about the change, could > you point me to more information about that? I have no more information about that than what I told. You should be able to see whether after-change-major-mode is called twice by putting some message there, or with Edebug. > I took a look at the implementation of `after-change-major-mode', and I > found `change-major-mode-after-body-hook' nearby, which seems to do what > I want at a first glance (running hooks before dir-locals is set). Does > changing the hook seem like the proper way to solve this? Sorry, I don't know, since I have no idea what editorconfig wants to do.