From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id WCF0Kw4SGGbGoQAAqHPOHw:P1 (envelope-from ) for ; Thu, 11 Apr 2024 18:38:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WCF0Kw4SGGbGoQAAqHPOHw (envelope-from ) for ; Thu, 11 Apr 2024 18:38:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=KN0cYziQ; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712853518; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=swtIaNDwN/n6UQjBTwLGza039EIWIfX4QCXM+Z+CZcc=; b=qpMfEg+ky5+kybH5GiU3FygKpLPXBkQgDnr/3KR5R0tQLuTL3mwtgPCGe4GIo8Mxn9+BrW ZgPpsXFmVtKCaGxM+qAgCBwAlzTGk9z0yVPzyMaY5aW8b0dTpFI+i1VPhrUkB54R7hZ3An w9CDkI9NyciCPbMlPpDYPiBMx/f8nNmqFCjt5T0m8i3wVOdGnFwMT8RZrIXb1gBE932ClZ ObL/NV5KAGyIK5dau7C/gcV8509twVO9S+8tAG+GVoUZqqGUlulGSBbHjHDYfBzi+UNOKq 2JdXKxBzA1bHyNGOaHWvjJKbXjgSwZvygbODziOFIRT0haAlsl/YHyFuJ4eV3A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712853518; a=rsa-sha256; cv=none; b=A8CR+bR9Ghe9C4sJqozIF4bw6mNSW/0kyJ02p7N/L6S6M3PfrPsnrvktyMl1ODMusOE2tE 9/s3yWTdU/YeGLZEgVL5oe59ViRACQc3bsMTrxHhX/7zQCz61bvf1P9z035HwR6TniOLXu mspgGRPF3H+bqiz7Y7jqjspyDj/d5e1tHdCZb+YT8yiSTcYuYTYhIWHLiihMkxBvkafXYX iQg9NsqgOHOu1h75GAl7AqmPx90pIcFckAg8gHkNu3dPWeY8FOwQ0f1fKWOztxQ/L4fNiY cXZdl7Z6tti5iuczg9odFI6PFm13bkz7i9/mZSuaXELI24h1WjmV4PW8ycM2Tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=KN0cYziQ; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 59FC510C9F for ; Thu, 11 Apr 2024 18:38:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruxQq-0007EW-A0; Thu, 11 Apr 2024 12:37:48 -0400 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 1ruxQo-0007EM-Dq for emacs-orgmode@gnu.org; Thu, 11 Apr 2024 12:37:46 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruxQm-0006sR-Uf for emacs-orgmode@gnu.org; Thu, 11 Apr 2024 12:37:46 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d895138ce6so55284711fa.0 for ; Thu, 11 Apr 2024 09:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712853462; x=1713458262; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=swtIaNDwN/n6UQjBTwLGza039EIWIfX4QCXM+Z+CZcc=; b=KN0cYziQTPTmlTSNxtI6/nSS/52ezrujW/rHbdYSduTJOF8bCiJ7tGWLXR+uu5OCz0 Pa960cAvvFvWtRZAW1ofIfloYoPo0VYAA+7lxM8HhvDjbpPSwHMOyXZPElI+Kc1BRfPU 3/clIX5P+Tot/f8GPf+RE5otJe7d9pl6T3ss6I5zy/uUr5ZRbn9lIXK1RbMqwN5fBKLY FC7vnYkcwe9cRnkdSoXI4LYIJlMRZuAkGKGK4bV6mafnO+KxTT5b+3P7foX8RFcmeT9o rYtOQU5s2qjS26Ajp93WSQtifV5D2TSERZgGhJlu/T/ss3JRp9JQ2gkQamMBzx8hQO4O ozMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712853462; x=1713458262; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=swtIaNDwN/n6UQjBTwLGza039EIWIfX4QCXM+Z+CZcc=; b=QOhUBmnXq7KdDNoyWFkuq7BdKHVVWfB4NxbQX/EohPve4A060/Ap6vwuuZzJR4L1VO HRBGe+S8mJmBZjzcXxHPL8veKDcffnqks9F+wOJKiclstZX+hhxd2LUYZI1tMXCHsDIW 35sG372lEYlXNWg/Iqd6U25LP86AY0LIyiS8faOZu+LaOEft/kOwYzvSDVVdASMBgvBB bc+alPIM9jD2Isv11CHDlcCgZWIXxEFRhbGDlodhjQxatAmks2qyUJ6+/rrPg2ioXns6 jMYMT+J7PJKZtYOSsmf/6K3HAux8a+klKhLCjQgRWMfWyo8xUprNhVLQ0nH13JRAIP/5 A1uA== X-Forwarded-Encrypted: i=1; AJvYcCXOikF0rpvRdETyVutG/WA4sDLVcyHoeyR72sbitsY6L/l5mDPeu3VSTZUuHoXExVLcNw4xLAorbf+rIA48IiSzfToPzq4= X-Gm-Message-State: AOJu0YzZXD0/DpWgxCoopdzpZ6pY3ENkZlT1pUzadoHdCXnCVW0k8uek 1IOWWbqMQ8zOEch47esYsmTgAui1aDmkENy0ON9V5XhIJCDoEdSv X-Google-Smtp-Source: AGHT+IF9LH5XiSrsGyZHCMAwIHoujSi1J0Ixr5UFVcK2Z8/lICsK9MvNMmJHg1V2dPT9/kCkUGkQEA== X-Received: by 2002:a05:6512:4887:b0:515:d335:a0ab with SMTP id eq7-20020a056512488700b00515d335a0abmr159781lfb.37.1712853462112; Thu, 11 Apr 2024 09:37:42 -0700 (PDT) Received: from [192.168.0.102] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id a12-20020a19ca0c000000b00516c5aeb683sm251510lfg.179.2024.04.11.09.37.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Apr 2024 09:37:41 -0700 (PDT) Message-ID: <5ed77d9e-cd83-4db4-a17e-c3d4e374092b@gmail.com> Date: Thu, 11 Apr 2024 23:37:40 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Q] startup hook: How do I detect if the current buffer has been opened programmatically? To: Rudi C , emacs-orgmode@gnu.org References: Content-Language: en-US, ru-RU From: Max Nikulin Mail-Followup-To: Rudi C , emacs-orgmode@gnu.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=manikulin@gmail.com; helo=mail-lj1-x235.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.06 X-Spam-Score: -4.06 X-Migadu-Queue-Id: 59FC510C9F X-Migadu-Scanner: mx13.migadu.com X-TUID: S3mLLUuBsgds On 09/04/2024 00:31, Rudi C wrote: > I want to automatically preview all LaTeX fragments if the buffer was > opened by the user Be careful and limit automatic preview to files you created yourself. Doing so for an arbitrary file downloaded from net might cause huge amount of garbage files in /tmp. Emacs-29.3 includes a fix for CVE-2024-30204 that is specific for email attachment inline preview. When a regular file is opened, weird LaTeX code inside still may be executed. There is no general way to determine if specific file should be treated as trusted.