From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 10 20:54:18 2013 Received: (at quiet) by debbugs.gnu.org; 11 Feb 2013 01:54:18 +0000 Received: from localhost ([127.0.0.1]:49624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4ib4-0005uD-Bu for submit@debbugs.gnu.org; Sun, 10 Feb 2013 20:54:18 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:38744) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4ib2-0005u6-TO for quiet@debbugs.gnu.org; Sun, 10 Feb 2013 20:54:17 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U4ial-0001Uq-7J; Sun, 10 Feb 2013 20:53:59 -0500 From: Glenn Morris To: quiet@debbugs.gnu.org Subject: a way to say that dir-locals should only apply to buffers with files X-Spook: Al-Qaeda ASPIC Mole plutonium credit card Guantanamo X-Ran: /cpZ:!Tt=)2/''hsb6=8z<3jdy~n14\p_suUDB$(~_-%E7AA/}BvF?E3IDArag2%@FWHUH X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sun, 10 Feb 2013 20:53:59 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: quiet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Package: emacs Severity: wishlist Version: 24.3 I think there should be some way in a dir-locals file to say "these settings should only be applied to buffers with files". Sometimes some options are not appropriate for file-less buffers. Ref bug#11127. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 11 21:33:15 2013 Received: (at 13685) by debbugs.gnu.org; 12 Feb 2013 02:33:15 +0000 Received: from localhost ([127.0.0.1]:51288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U55gJ-000480-AM for submit@debbugs.gnu.org; Mon, 11 Feb 2013 21:33:15 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:52561) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U55gH-00047t-BB for 13685@debbugs.gnu.org; Mon, 11 Feb 2013 21:33:14 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U55ft-0004O6-Br; Mon, 11 Feb 2013 21:32:49 -0500 From: Glenn Morris To: 13685@debbugs.gnu.org Subject: Re: a way to say that dir-locals should only apply to buffers with files References: X-Spook: STARLAN S Box CIA covert video Soviet Roswell satellite X-Ran: 313-bh1*/v<{f&q=&{%!Bfi7gN)5{rVr]swJ^m#A3n:+>%/PfO:y+AlwP (Glenn Morris's message of "Sun, 10 Feb 2013 20:53:59 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13685 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris wrote: > I think there should be some way in a dir-locals file to say > "these settings should only be applied to buffers with files". > Sometimes some options are not appropriate for file-less buffers. > Ref bug#11127. This seems easy to do, but I don't know what the best UI is. An element in the dir-locals list: (fileonly . t) or (apply-to . files) The latter allows for (apply-to . nonfiles) as well (though I can't think of a use for that). From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 12 22:25:22 2013 Received: (at 13685) by debbugs.gnu.org; 13 Feb 2013 03:25:22 +0000 Received: from localhost ([127.0.0.1]:53009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5SyI-0004Ro-4l for submit@debbugs.gnu.org; Tue, 12 Feb 2013 22:25:22 -0500 Received: from mail-qe0-f41.google.com ([209.85.128.41]:51024) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5SyF-0004Re-Jy for 13685@debbugs.gnu.org; Tue, 12 Feb 2013 22:25:20 -0500 Received: by mail-qe0-f41.google.com with SMTP id 7so353995qeb.28 for <13685@debbugs.gnu.org>; Tue, 12 Feb 2013 19:24:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=O2L10uRqzqF5LVipt67Lv/GiYXi79X/oe4XGP/znWsY=; b=ja/rMlZa7uMphk+XA5HX6RMyDVtObyERQwDvcR/+rY9q5AAMbnA2vAjEUMZCo1Z55q aq0218CuPAbC+dRE/YRK3ERwfNdiNFN4hmDY7adi0l9/9x0xdSJtFmuukR1cH0yOrfa+ 8L5dtKWBRGbpTOyKuAUtO13C5CGUcGiCZJzyRcOTiP+VdS1K+SN7ykgPIMbgHOwX53nF m1OaUL6X4JILJk30rrEjP12i2az4OMX08wBJGZDxpRv5fJQwuRj+egTEml0kMY/I8Rdu hFRgmx25M3noNYMJ7YpCnlarfiy2RbuBuvwnISjpuJDij1/jt3+t4ZgYy0Uhlr6v7ddh ytVQ== X-Received: by 10.49.59.131 with SMTP id z3mr9206182qeq.1.1360725889844; Tue, 12 Feb 2013 19:24:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.109.99 with HTTP; Tue, 12 Feb 2013 19:24:19 -0800 (PST) In-Reply-To: References: From: Josh Date: Tue, 12 Feb 2013 19:24:19 -0800 X-Google-Sender-Auth: 5jp8tM92QOxoitpjQYv5Tj9XhNs Message-ID: Subject: Re: bug#13685: a way to say that dir-locals should only apply to buffers with files To: Glenn Morris Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlVm4OTiDBqHwnpwmnKyydXa8J9GNbERg8sDl0XX0nrtysgQB42muCOmgttZ1ToYenff9GE X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13685 Cc: 13685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mon, Feb 11, 2013 at 6:32 PM, Glenn Morris wrote: > Glenn Morris wrote: > >> I think there should be some way in a dir-locals file to say >> "these settings should only be applied to buffers with files". >> Sometimes some options are not appropriate for file-less buffers. >> Ref bug#11127. > > This seems easy to do, but I don't know what the best UI is. > An element in the dir-locals list: > > (fileonly . t) > > or > > (apply-to . files) Or more generally, the cdr could specify a predicate taking a single argument (the buffer), e.g. (apply-if . buffer-file-name) > The latter allows for > > (apply-to . nonfiles) > > as well (though I can't think of a use for that). Likewise, (apply-if . (lambda (buffer) (not (buffer-file-name buffer)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 13 03:36:38 2013 Received: (at 13685) by debbugs.gnu.org; 13 Feb 2013 08:36:38 +0000 Received: from localhost ([127.0.0.1]:53214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5XpV-000750-OK for submit@debbugs.gnu.org; Wed, 13 Feb 2013 03:36:38 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:39701) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5XpT-00074r-Jn for 13685@debbugs.gnu.org; Wed, 13 Feb 2013 03:36:36 -0500 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3Z5Ywh2jjMz4KK23; Wed, 13 Feb 2013 09:36:04 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3Z5Ywh1kPfzbbg7; Wed, 13 Feb 2013 09:36:04 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 4_RKmVDujpRn; Wed, 13 Feb 2013 09:36:03 +0100 (CET) X-Auth-Info: V+MY8CJN1IIEWEQDler9aLxtJ9+gX1MOxMvoYm1olEA= Received: from hawking.suse.de (nat.nue.novell.com [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 13 Feb 2013 09:36:03 +0100 (CET) From: Andreas Schwab To: Josh Subject: Re: bug#13685: a way to say that dir-locals should only apply to buffers with files References: X-Yow: I brought my BOWLING BALL - and some DRUGS!! Date: Wed, 13 Feb 2013 09:36:03 +0100 In-Reply-To: (josh@foxtail.org's message of "Tue, 12 Feb 2013 19:24:19 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 13685 Cc: Glenn Morris , 13685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Josh writes: > Likewise, (apply-if . (lambda (buffer) (not (buffer-file-name buffer)))) Be careful about execution of arbitrary code. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 13 12:19:10 2013 Received: (at 13685) by debbugs.gnu.org; 13 Feb 2013 17:19:10 +0000 Received: from localhost ([127.0.0.1]:54414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5fzC-0004x4-ID for submit@debbugs.gnu.org; Wed, 13 Feb 2013 12:19:10 -0500 Received: from mail-qa0-f49.google.com ([209.85.216.49]:61150) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5fzA-0004wx-OM for 13685@debbugs.gnu.org; Wed, 13 Feb 2013 12:19:09 -0500 Received: by mail-qa0-f49.google.com with SMTP id o13so655985qaj.1 for <13685@debbugs.gnu.org>; Wed, 13 Feb 2013 09:18:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=AT4r7C0c2TmaQ/nuALQjBE5sc2tcdke4dXj1LfOWDtA=; b=GW/2OVSQ5ZDPRoU+j0BvKr5SSzyBQuzq6sQZzl82Cgoh0Q7ZtyOwIx09B+bpPSunIY WBO/ST47ooLw9sm9vr8vrZGAxVLMcmpxZj7nL8xDqkMJQf6pUPPQA2pXjT+2V1RvfDyW sGZVumoid3VVw6cUJ4WNjuGremvLASPcVZApK796cRPhuwnU6/KbOAbIlCQ/xZtHNyYN vvt4GHcNAhjjD1qdXdYlBR+THqTeDalU8hhbkCW4U/MQFkWETHkdAESokSuR1RAJcQcz 0cgeJZ81IzCoFk1ZpifcwpJIxkiozrbu53LjX80w5LdFuzQobYyHjKPN4tb2ZvsJsbDM LD0A== X-Received: by 10.229.201.98 with SMTP id ez34mr2093632qcb.29.1360775915968; Wed, 13 Feb 2013 09:18:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.109.99 with HTTP; Wed, 13 Feb 2013 09:18:05 -0800 (PST) In-Reply-To: References: From: Josh Date: Wed, 13 Feb 2013 09:18:05 -0800 X-Google-Sender-Auth: c3KcRcazAim--tpX4mkTaJQgnbA Message-ID: Subject: Re: bug#13685: a way to say that dir-locals should only apply to buffers with files To: Andreas Schwab Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkNOAq/7DccdiQ0w2VF/qGOMIMwrWr1xshv02ZAGg1iyWtIA5HtqAnru6t9DapGNWhm1Tu4 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13685 Cc: Glenn Morris , 13685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, Feb 13, 2013 at 12:36 AM, Andreas Schwab wrote: > Josh writes: > >> Likewise, (apply-if . (lambda (buffer) (not (buffer-file-name buffer)))) > > Be careful about execution of arbitrary code. > > Andreas. Indeed, such a feature should be governed by `enable-local-eval' and `safe-local-eval-forms' or similar, with `buffer-file-name' being an element of the latter by default. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 21 11:18:17 2013 Received: (at 13685) by debbugs.gnu.org; 21 Feb 2013 16:18:19 +0000 Received: from localhost ([127.0.0.1]:42626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Yqe-0005UX-QC for submit@debbugs.gnu.org; Thu, 21 Feb 2013 11:18:17 -0500 Received: from z.lifelogs.com ([173.255.230.239]:59972) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Yqc-0005UM-7H for 13685@debbugs.gnu.org; Thu, 21 Feb 2013 11:18:15 -0500 Received: from heechee (c-24-60-176-11.hsd1.ma.comcast.net [24.60.176.11]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: tzz) by z.lifelogs.com (Postfix) with ESMTPSA id F145D2085E; Thu, 21 Feb 2013 16:16:55 +0000 (UTC) From: Ted Zlatanov To: Josh Subject: Re: bug#13685: a way to say that dir-locals should only apply to buffers with files Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos References: X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Thu, 21 Feb 2013 11:16:55 -0500 In-Reply-To: (josh@foxtail.org's message of "Tue, 12 Feb 2013 19:24:19 -0800") Message-ID: <874nh5wsjs.fsf@lifelogs.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13685 Cc: Glenn Morris , 13685@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, 12 Feb 2013 19:24:19 -0800 Josh wrote: J> Or more generally, the cdr could specify a predicate taking a single J> argument (the buffer), e.g. J> (apply-if . buffer-file-name) ... J> Likewise, (apply-if . (lambda (buffer) (not (buffer-file-name buffer)))) I like the idea, but why not structure it like a cond statement since that's what you're doing anyway? Ted From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 22 09:29:22 2022 Received: (at control) by debbugs.gnu.org; 22 Feb 2022 14:29:22 +0000 Received: from localhost ([127.0.0.1]:40553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMWAM-0000Mq-Bu for submit@debbugs.gnu.org; Tue, 22 Feb 2022 09:29:22 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMWAK-0000MV-1k for control@debbugs.gnu.org; Tue, 22 Feb 2022 09:29:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K7YqtngmLYtA6FRzFGJoOXAygrJW6LAipENmSjLkgYU=; b=OS20wAXmKhrZrh37iZMCHBG171 nPtBEBsl4sTsCUthP8M3GHS39DGVNBFEQNDzZn80ID7wH7vzLuXFNkHOCNzE1S0BvtPQPLtGW+HOZ y7gkG5yQVce9XTVrSgGgDpnVU48rEpRT0Qk4CFY41W+pq2Tz+7BpLMq4JFBaMECs/93Y=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMWAB-0006R0-9C for control@debbugs.gnu.org; Tue, 22 Feb 2022 15:29:13 +0100 Date: Tue, 22 Feb 2022 15:29:10 +0100 Message-Id: <87y2239dqh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #17489 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: forcemerge 17489 13685 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) forcemerge 17489 13685 quit