From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.devel Subject: Allowing symlinked dir-locals files? Date: Mon, 16 Aug 2021 20:01:20 +0200 Message-ID: <8735r91d73.fsf@wavexx.thregr.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38260"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:ELUr945wUZxOmIe2FUMiVfHVPYA= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 16 20:03:03 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFgwv-0009gP-N8 for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Aug 2021 20:03:01 +0200 Original-Received: from localhost ([::1]:50508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFgwt-0001iV-KO for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Aug 2021 14:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFgvT-0000ME-Ev for emacs-devel@gnu.org; Mon, 16 Aug 2021 14:01:32 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:43934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFgvR-0003U1-CV for emacs-devel@gnu.org; Mon, 16 Aug 2021 14:01:30 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mFgvN-0007pf-1n for emacs-devel@gnu.org; Mon, 16 Aug 2021 20:01:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272453 Archived-At: Hi everyone, I was trying to share some localized customization by symlinking a .dir-locals.el file across directories, but it doesn't seem to work. Looking at the current files.el:4330, we explicitly check if the file is a regular file. And looking at the FIXME comment just above I concur that checking just for file-directory-p should be sufficient for proper behavior. However I suspect that the rationale was to be proper as well as "safe", as this could be used to make emacs read/interpret another file if the symlink is under the control of a VCS or via a shared-filesystem. I wonder if that's all we can really do? I currently hardlinked the files and bypassed the problem. I can think a couple of alternative solutions, however I have a series of projects that share indentation/editor settings and I've found that using such setup makes it more discoverable. Thoughts?