From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sergio Pokrovskij Newsgroups: gmane.emacs.bugs Subject: bug#17489: 24.3; Major mode spec in .dir-locals.el breaks dired Date: Thu, 15 May 2014 00:24:47 +0700 Message-ID: <87vbt846jk.fsf@gmail.com> References: <87d2fg6dcn.fsf@gmail.com> <831tvwpfar.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1400088389 31900 80.91.229.3 (14 May 2014 17:26:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 May 2014 17:26:29 +0000 (UTC) Cc: 17489@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 14 19:26:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wkcwf-00021l-GL for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 19:26:21 +0200 Original-Received: from localhost ([::1]:53090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkcwf-0004No-3j for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 13:26:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkcwU-0004M0-Kf for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 13:26:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkcwN-0007Ra-3p for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 13:26:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkcwM-0007RW-Uv for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 13:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WkcwM-0008Nq-CF for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sergio Pokrovskij Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 May 2014 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17489-submit@debbugs.gnu.org id=B17489.140008830832111 (code B ref 17489); Wed, 14 May 2014 17:26:02 +0000 Original-Received: (at 17489) by debbugs.gnu.org; 14 May 2014 17:25:08 +0000 Original-Received: from localhost ([127.0.0.1]:35461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkcvS-0008Ll-3m for submit@debbugs.gnu.org; Wed, 14 May 2014 13:25:06 -0400 Original-Received: from mail-la0-f42.google.com ([209.85.215.42]:44896) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkcvP-0008L6-26 for 17489@debbugs.gnu.org; Wed, 14 May 2014 13:25:03 -0400 Original-Received: by mail-la0-f42.google.com with SMTP id el20so1702174lab.1 for <17489@debbugs.gnu.org>; Wed, 14 May 2014 10:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=7ZM7+Ds85JPkrxB+FmfJEh85ZoKgVK4x+k2ngjV6edc=; b=gGp3Fv32FFOjlTWizF6eVYQWd9HMpA64aEFnbXScgBMk76/GB67ZjHg6ww+74PWRJa ap4XsH7YYPqdFLAre9nHe2Ic96wdZIdB/oKx92y3RmQ/wDpa1hCsLl/BdmI+fEMccj3o WxypgPxK3c1CSzyv1tNO4pOm8qjPCyz3gQu9sc2fc/OwGhC6YJkECmJiCXuI3MCIZZNk P0mISW1ayq1VLI50ZLyLgiNgMzk9nWmKCxyhSAqjWkFrpj3+F/Wq1BDEstrwx9pw8Lq0 uXooacjI+MZ4TFpW/QrtSwvWkYfS6dAZsJuBIPSERkxJeQvdSa6lzLpjDX5cwHdEbXXl VPwQ== X-Received: by 10.112.130.229 with SMTP id oh5mr2554787lbb.49.1400088296753; Wed, 14 May 2014 10:24:56 -0700 (PDT) Original-Received: from hp12 ([176.51.121.255]) by mx.google.com with ESMTPSA id ob4sm2593931lbc.30.2014.05.14.10.24.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 May 2014 10:24:54 -0700 (PDT) In-Reply-To: <831tvwpfar.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 May 2014 18:10:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89085 Archived-At: >>>>> "Eli" == Eli Zaretskii wrote: [...] Eli> It's not clear what did you expect instead. Did you expect Eli> that unconditionally turning on some mode in a Dired buffer Eli> be ignored, just because it's a Dired buffer? Kind of. It is not quite a "local file". Cf: ,---- | Sometimes, you may wish to define the same set of local variables | to all the files in a certain directory ... `---- (info "(emacs)Directory Variables") Eli> Or did you expect that your .dir-locals.el settings be in Eli> effect only for files, not for directories? This too, normally "local variables" are not attributable to directories, are they? Eli> Or did you expect that cc-mode somehow gracefully does Eli> nothing when the buffer text is not a C-like program Eli> source? It seems that it's a dired's problem rather than cc-mode's. Eli> Or something else? My expectation was that I could specify a local-variable setting common to all the files from the directory in question. And actually it does work. The only problem is that it breaks the dired buffer. Eli> IOW, why isn't that .dir-locals.el setting of yours not a Eli> cockpit error? Because there is no appropriate means to impose a reasonable condition. Just the "nil" or a major mode name. It may happen that I do not know the a-priori mode; actually it is mode that I would like to set. After all, I've found a workaround; but I believe the feature would be more useful if it could be restricted to '-' files only (i.e. only to those which normally can contain "Local variables:"): ,---- | Whenever Emacs visits any file IN THAT DIRECTORY or any of its | subdirectories, it will apply the directory-local variables | specified in `.dir-locals.el', AS THOUGH THEY HAD BEEN DEFINED AS | FILE-LOCAL VARIABLES for that file ... `---- -- Sergio