From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#74879: 30.0.92; trusted-content-p and trusted-files cannot be used for non-file buffers Date: Sun, 15 Dec 2024 13:46:02 +0000 Message-ID: References: <87ed29ixu8.fsf@daniel-mendler.de> <875xnlfdzi.fsf@daniel-mendler.de> <86cyhtrzmo.fsf@gnu.org> <87jzc1dxk2.fsf@daniel-mendler.de> <868qshry7w.fsf@gnu.org> <87y10hb2im.fsf@localhost> <8634iprux9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6288"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, 74879@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii , Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 15 14:56:16 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 1tMp6W-0001Rn-Hm for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Dec 2024 14:56:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMp6L-00036U-3N; Sun, 15 Dec 2024 08:56: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 1tMp6J-00035x-86 for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 08:56: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 1tMp6J-0001yt-06 for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 08:56: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:MIME-Version:References:In-Reply-To:From:To:Subject; bh=XUD2kDajcPQ7p+fmiLEhvuM0b+FtEaWkyF4ALcS/ZEQ=; b=tcgE3g/xpAPYV+W0azferKqyUlxCDTQFb33u/EjFclP8vUFcMfKYS6HfoQTJca+WWXAU1obLkpaO/p3AtkxwQREb860OYsKAGNPSPVYkcYsgkYAMHzDkGVB6YLSTi7JN/yI2tojuFNMq1MUBiCK4Ve4aTdk3vaKKO2PFVJNfjRrqPJ+dGE3v4TgbetvvFiUyMOZRC3pmenJrAA0b+GLmJVewQN1DriuS0ggAYKiXDuKj6w4i1Yv5KC2rqM3kfGc3kPbOiVh7sFdTFPKymB5kKqH7FqWKwGjQW+eVDey3ORvD+yFJnLftjNkTVHlnmIxnTlI/eAqPwQ2K9oM/kPLOZQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMp6I-00070D-EA for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 08:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Dec 2024 13:56: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.173427094526888 (code B ref 74879); Sun, 15 Dec 2024 13:56:02 +0000 Original-Received: (at 74879) by debbugs.gnu.org; 15 Dec 2024 13:55:45 +0000 Original-Received: from localhost ([127.0.0.1]:49970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMp60-0006zc-Se for submit@debbugs.gnu.org; Sun, 15 Dec 2024 08:55:45 -0500 Original-Received: from mail-lj1-f171.google.com ([209.85.208.171]:59719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMp5x-0006zJ-RN for 74879@debbugs.gnu.org; Sun, 15 Dec 2024 08:55:43 -0500 Original-Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-303548a933aso1209671fa.3 for <74879@debbugs.gnu.org>; Sun, 15 Dec 2024 05:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734270876; x=1734875676; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=XUD2kDajcPQ7p+fmiLEhvuM0b+FtEaWkyF4ALcS/ZEQ=; b=VkCu6syFdYePYgApE/eWd16AC+Z1Q93XcOem5n4dkN3VwF/4Xj8QkOzn7yky5AjyG6 8mZItISUo6FBbxkah9p8tHsBf2Cr5x3Mf0Zczp64qV5/9gwonYJvL8B3v8L42crQNdEF tr/XJeOZBW8MiXZHx5JWSrBKKIqCk9InjEfjtEuSV+OnNX73IXEsfc0AoAS3bk6AHIZ+ rJWV/RGIjO/tHHdeaYKlxNt3joqyOTfKXH66DMUjgzo8ukKC4EhiDxwYSnBwPouxYWAw DjNJqRELg3rHvA+ry8aGaEYoXF+E5iS3gMzOjDk0RMtUNFxcylVDrbK+r0Q1CJMYj70y Uj/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734270876; x=1734875676; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XUD2kDajcPQ7p+fmiLEhvuM0b+FtEaWkyF4ALcS/ZEQ=; b=QJXLH8BJxRDJc4F/HTPcOW4cmMQm0R38/2MaCerqFc2rjgJEGHvML7LBTX3exa/VD1 woVnH8t0oBgUGQTzF3xOgCB9dL8lkpKxY2P3HirWOAI9lcoZMPxXJSOaW+87pF1As5p8 6wessXP1IL25eJ6chgylF9Meat+MvaoUV8552usU440j7rxjA1Lcit9p/WPHSe1CLji0 X68+8Z8yue1t/BnSdqBUltcIIxG5+rXVlGhGJS2tAXcZ4cUgdsqIn/t5RxoLZL7SA/bB tyZQK4MLWKvmEp0LCDHfscmAmTXTVnpKxWKeGzhjPRIbbOw2xOZFtonrSdHY99Xal/eX XmMg== X-Forwarded-Encrypted: i=1; AJvYcCXi3bnropAAmZRZiL/+43u/y/IlE00fwlpwb41RJF/q2b52A7yUhEtos95jFxxB8jP1eaNwoA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yw1NlYA2AZKBmiRj7S/cwo33taE5VhBbmxzw8GxuvTjDbBaM67h x6Ih+BlVK4ogWnzEhnwoxDfB6OFWG+WadPYSdmhp8yyF/wQDnANQEJT2fMuYebenDpV2uXDPjVG OpwGfY1JbE2Pe7zfmeBcvCl4gWbUT5/Do X-Gm-Gg: ASbGncvCmdB5e9a83wBoOif6P+viKuc3RE1HbzEqebL4qNm/4UkSyjtKfHRRPVpsaPj hdexVFLbuuHTXX2dZUN7wxwiWRNXbqubOSTGJgdk= X-Google-Smtp-Source: AGHT+IGu9gdeIl3Hgydo5ZBGp4IPeFzPAPLMLD/uhugj3kpgLPUJZBH2rQmZ/42Rg/tOy5+OX+h0RfGyWewfiUtwqts= X-Received: by 2002:a05:6402:5215:b0:5cf:a1c1:5289 with SMTP id 4fb4d7f45d1cf-5d63c3ecc35mr8659804a12.21.1734270362542; Sun, 15 Dec 2024 05:46:02 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 15 Dec 2024 13:46:02 +0000 In-Reply-To: <8634iprux9.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:297103 Archived-At: Eli Zaretskii writes: >> From: Ihor Radchenko >> Cc: Daniel Mendler , 74879@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Sun, 15 Dec 2024 11:37:37 +0000 >> >> If buffer contents is not coming from a file, it must be generated by >> some Elisp code. That code may as well set trust status. >> For example, *scratch* buffer may have its contents (automatically >> generated) marked as trusted by default. >> >> Does it make sense? > > Are you in effect saying that every buffer that doesn't visit a file > should be trusted? If that's accepted, it doesn't need any function. > And can we really trust arbitrary ELisp code that to set trust? I can't speak for Ihor, but I didn't read what he said to mean that _all_ non-file-visiting buffer should be trusted. IIUC, the idea is to provide a mechanism that allows marking _some_ non-file-visiting buffers as trusted. This would be useful in *scratch* and ielm buffers, for example. > And what about buffers whose contents came from a network connection? > > What about buffers whose contents came from inserting some file or > part thereof, or were generated by processing some file? > > What about buffers whose contents came from a program Emacs invoked? Such buffers should still be untrusted.