From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Lindqvist Newsgroups: gmane.emacs.bugs Subject: bug#74627: .dir-locals.el warning messages are confusing Date: Wed, 11 Dec 2024 09:18:33 +0100 Message-ID: References: <86a5daxydw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35713"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 74627@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 11 09:20:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tLHxL-00097P-DZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Dec 2024 09:20:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLHx1-0007xz-2o; Wed, 11 Dec 2024 03:20:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLHwx-0007vT-Kv for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 03:20:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLHww-0003m9-Sj for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 03:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=fd4WZRAMppfxWi4u0jjbFDJ62z7daKXqbaqBARGOq5c=; b=uWzmgURCSktcI+heoXdmQ0gj3Al7c1uonoBv+tZyOAqNLBPFtHrLheXx0km6IovJu/bI165REYfY6R9vVFXscYCuzOPDQo1jGJimdcuAh2hKsufh/gTAruqccl+vZKjhiYpoTT2Tj5DFwOrqF74E+Tktr9+NdvVxTOsDrDKQk+76l0jYyGaNGdOPLslZQkpbRUC5VSU5pMSvkpRVsTDyWNCYlViTPPNBp10ig7m0+UJcXxSeAkRmmsmt28jgfawss2tXpJgnEOCOfOdAcAxpCPmvNtWwHJou6YzDTGhG+wT9u/Jce1z5tfxLGIYohwQbl+OxMHw9yyPAneeLZTxldA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLHwv-0004xU-MA for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 03:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Lindqvist Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Dec 2024 08:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74627 X-GNU-PR-Package: emacs Original-Received: via spool by 74627-submit@debbugs.gnu.org id=B74627.173390519319039 (code B ref 74627); Wed, 11 Dec 2024 08:20:01 +0000 Original-Received: (at 74627) by debbugs.gnu.org; 11 Dec 2024 08:19:53 +0000 Original-Received: from localhost ([127.0.0.1]:32806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLHwm-0004wz-Pw for submit@debbugs.gnu.org; Wed, 11 Dec 2024 03:19:53 -0500 Original-Received: from mail-vs1-f42.google.com ([209.85.217.42]:42151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLHwk-0004wi-N2 for 74627@debbugs.gnu.org; Wed, 11 Dec 2024 03:19:51 -0500 Original-Received: by mail-vs1-f42.google.com with SMTP id ada2fe7eead31-4aff1c57377so278232137.0 for <74627@debbugs.gnu.org>; Wed, 11 Dec 2024 00:19:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733905125; x=1734509925; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fd4WZRAMppfxWi4u0jjbFDJ62z7daKXqbaqBARGOq5c=; b=evnFTMqES5p6Y3b5b+33VrKIJdeRuVNzT70CLQ+ejYH+Fr+1uN3lXE6b+bAcAIG1WV yzEW3m+wV/BhDOpqC2zp/uxFhLR2vqYJ7ByLRSj1rTqCZ1qK0hDGt9gSlZUgGNJSs1Et 85iSpk2qZF1F7VdX2z6HVOILT4OvMQwsuDLSL/LbgmdBqwHpCoes6c/EDVex4FmoeYcA 0X4DlYD6t4mjLg8QpXkELf0CLi3VgMpcN+MJfs8WScKcVeBVySzysM0YE6pAIFM14H2n xrrARfJXZ9jGKRgAUpO1JEElrrfAq4IGJvhUBpSNlddToJlqLJszmzGWMsfSDym191nP MM4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733905125; x=1734509925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fd4WZRAMppfxWi4u0jjbFDJ62z7daKXqbaqBARGOq5c=; b=lT0kq6eEa7wVoIcjA26CN8tYJDdXnUhlCYOVIvqE2rLW5caXV+9rE8p9WVcfWAa7sn rvRxogLi3YPYvsK7z1Hn8MlAZTzaTVzuv6D0srjvZBYck7OlY6wPuGZwLJynmVSWhFJT Frt1GzcGv+IE9Qc3Ep/293U6RWqN5cbaYt6t4ZIhzm8fueS1jGug9+YKs6agh+Ki3glz Z1EC7dLHCc+rPMnpkG4E8t2qMTry9y+K1IzBFDx2rhayzWho1n9OTVHzBdRhC5cK0tul /cUUtyQwU5dCBstWVxn6z/b/Rg+fxUeyEQNinLgpQDVznmwyh3ZR2QUm8N0WccXddLTa nAqQ== X-Forwarded-Encrypted: i=1; AJvYcCXraehSJHuq/AHE5v29C6ZDeDSGZwFhQrVHpkxS9Y0ByHp1OknKJfoLqXSM36DnT3TyQ2xHYw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzJd31xH3/mzoSsk/oSTMqp9Mb8XHp3GTQff7AiYkLuqxRQ/d3R z0eEbrq6QsfEkN4osUxEcQwDm1ehEzgfFwwOOCfy/vVlyYPdWFUs+uNs04NBqm3v62iPn7AVB5B t0UfMAG6qhaSyVflq2Thcyrs8Ck4= X-Gm-Gg: ASbGncvMeBHc/I4pwsiurYhsjildh9TaL0tyEQXY/4lTI/4EeoGEtSdUKHAnNrFjDly sluspVXBkDEKXtMeP3pVdhMTAEpl8A7IYx+lnFjmIpkBxYpU4fZfXWUHDDRBiCmvD X-Google-Smtp-Source: AGHT+IFBQtkhVPjd99cgVrMmvAfMnwaYPpyHn0/Zdt6BDG6Z14fMSL4wHNt3alXTX/9206Sj/KyOuwt8lB9HOK9+KqM= X-Received: by 2002:a67:be0f:0:b0:4af:dcf3:b384 with SMTP id ada2fe7eead31-4b1d29c4cffmr1014433137.11.1733905125167; Wed, 11 Dec 2024 00:18:45 -0800 (PST) In-Reply-To: <86a5daxydw.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296808 Archived-At: Hello Eli, Den tors 5 dec. 2024 kl 10:38 skrev Eli Zaretskii : > > Warnings about potential security issues should be easy to understand, > > but the warnings produced by .dir-locals.el are not. When I open a > > file in the Emacs source code it shows: > > > > The local variables list in /home/bjourne/p/emacs/ > > or .dir-locals.el contains values that may not be safe (*). > > > > Why does it say "or"? > > Because that function is called with a single flag argument which > could be set non-nil either due to unsafe file-local variables or due > to .dir-locals.el. So there are multiple sources of unsafe variables, but the function responsible for formulating the error message doesn't know what the source is? Regardless of whether my guess is correct, the text should not refer to the local variables in "/home/bjourne/p/emacs/" because there can be no unsafe variables in directories (only files). > > What does the asterisk (*) mean? > > It means the variables marked with the asterisk in the list of > below this text could be unsafe. Aha. Emacs lists both safe and unsafe variables. Why does it list the safe ones? The warning would be much clearer if the safe variables were omitted since they don't matter. That would make it clear what variables "!" and "i" choices apply or mark as safe/ignored. -- mvh/best regards Bj=C3=B6rn Lindqvist