From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#74879: 30.0.92; trusted-content-p and trusted-files cannot be used for non-file buffers Date: Wed, 18 Dec 2024 16:11:12 +0200 Message-ID: References: <87ed29ixu8.fsf@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74879@debbugs.gnu.org To: Stefan Monnier , Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 18 15:12:24 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 1tNuml-0008ao-CR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Dec 2024 15:12:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNumS-0001Bf-Vu; Wed, 18 Dec 2024 09:12:05 -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 1tNumQ-0001B7-QZ for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 09:12:03 -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 1tNumQ-00070W-GY for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 09:12:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=Q2+B8VcjQrAT/qqeZTbluG+/QmIo4evTrLpRP45WeuA=; b=NC7hPUg/jdcGKDukrrkfH+dn0UiOyGxSEM95qYbPFfbVVlqP7rTEHJfRcKa2Ny+yem2BXhQmbXbnDA+mAhJ1fJRj2FzxHB+ix+Fp6xDiGk5Jm+1cWMLig3jCyoXx+3pGVCXVFafc9BwTz3lI0SUzeuQRy9BcVY02MdIa/P+XAfkqZSwLT3pPpWqQf+vp/OimSjm4DkxHEPV85KiQ4e00STx5giWMTm4kfclY9dbLvYJGy9LPnCvS/zdKNbErzHq68z+AZsLnGHsur/jcXeZHKyAbIAtAU0PqKwwFVGgspk37QwnMtpIZ6m1rqcEr8y+dH8VBqu1toiGd6ur/4h6Obw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNumQ-0005VL-37 for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 09:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2024 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74879 X-GNU-PR-Package: emacs Original-Received: via spool by 74879-submit@debbugs.gnu.org id=B74879.173453108621106 (code B ref 74879); Wed, 18 Dec 2024 14:12:02 +0000 Original-Received: (at 74879) by debbugs.gnu.org; 18 Dec 2024 14:11:26 +0000 Original-Received: from localhost ([127.0.0.1]:33999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNulq-0005UM-27 for submit@debbugs.gnu.org; Wed, 18 Dec 2024 09:11:26 -0500 Original-Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:57289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNuln-0005U4-1E for 74879@debbugs.gnu.org; Wed, 18 Dec 2024 09:11:24 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 33E8C11401A8; Wed, 18 Dec 2024 09:11:17 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 18 Dec 2024 09:11:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1734531077; x=1734617477; bh=Q2+B8VcjQrAT/qqeZTbluG+/QmIo4evTrLpRP45WeuA=; b= ENE5wc6Ug8rKsaSXl/uzBKZidpaOighb0bCC+S/gMhMr71WhocuXn6KXRv4/GKCf McLtndBK+ZL6vSRN1poMAWnOEhULpJO568TRTcPo+KBtHYhgh3qxwMbW7ukrA2P1 gSDkya9cwmzmOv9G52/jYd4AOmtBXpei/s3H08LWVpMMOAMLH/zRkjOpBNGty9TA k3ZpItOjk28R8xqSSjKAXIAl3XWTlUQ3qZO4BMiQYmHklWr+VjSg6dyqgHvMyhEk XWcL1n07bykAWcw1pst/Yp/Q6fAWWLyZUq5DA+uyK2rk5VoEkhxaSiF1Xhrp0PzM Yro/HTK6hNuMrbt4noZZSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734531077; x= 1734617477; bh=Q2+B8VcjQrAT/qqeZTbluG+/QmIo4evTrLpRP45WeuA=; b=R OJrYoQ5O08om1ru1X4xN1TegCLziB3bcwN5RUea0UkiYCzT0/ac3F66CnRZ03OeC 2VClphwn0tEr9fJI4eV5UP4zvGk7YEsZ25u295ffsR4KMIYWHT9n86w+8vDvtXx0 fqADU9kZepezKCyULl9DfXftQKcQBYspTnz5hYc6tWpq6e6xBjG49CsjbD3nHChG xuCIb45DjwJ31FpCkhL/WTuesEwa5KwEVBgEMLbev1mPcLN7dOifeLg1KU6eC19P Zq5TRnN2J4mturWJjk3T2oCmNV/yqLrOMLUwIsNdhRo/iODUq5OizPbWigrPeiyH mH0ICBwfPwfoBSCZRjfKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleekgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruh hmohhnthhrvggrlhdrtggrpdhrtghpthhtohepmhgrihhlsegurghnihgvlhdqmhgvnhgu lhgvrhdruggvpdhrtghpthhtohepjeegkeejleesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Dec 2024 09:11:15 -0500 (EST) Content-Language: en-US In-Reply-To: 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:297337 Archived-At: Hi Stefan, On 15/12/2024 16:03, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >> Thank you for the recent addition of `trusted-content-p'. Is there a >> possibility to use `trusted-content-p' in buffers which are not backed >> by a file? I use Flymake in *scratch* or similar buffers and it seems >> that this won't continue to work given that `trusted-content-p' needs a >> `buffer-file-truename'. > > Good question. > We don't really have a good answer yet, AFAIK, in large part because we > don't have enough experience with it. > Off the top of my head, here are some elements relevant to this > discussion, in random order: > > - The current setup is a kind of "minimal" change for Emacs-30 because > it's late in the pretest, so as much as possible we should separate > the discussion into what's a simple enough solution for Emacs-30 and > what we should use in the longer term. That was indeed quite abrupt, for a problem that's been with us at least since 2017 (the use of flymake-elisp-byte-compile in emacs-lisp-mode). > - I think we do want some kind of hook, with which we can have (for > instance) `emacs-lisp-mode` tell Emacs to trust the user init file, > the early-init file, the custom-file, and all the files in > `load-path`. Speaking of, it would be nice to see someone formulate the thread model we're trying to handle this way. Indeed, should add files in load-path be considered "trusted"? If yes, why not do this automatically. If no, then what do we think about a scenario when a "trusted" file ends up loading a file from load-path which redefines some standard macro.