From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 0Dt5GzoqFGa0fAEA62LTzQ:P1 (envelope-from ) for ; Mon, 08 Apr 2024 19:32:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0Dt5GzoqFGa0fAEA62LTzQ (envelope-from ) for ; Mon, 08 Apr 2024 19:32:42 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Xg19T8sw; 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=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712597562; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eJpnruSoA/EWi3Iy1jVtm98KqBMXCwDTQYj/PmoQ3hw=; b=Xs1ECW7WwMdNEB5l8HFlJrOm/MqzqRcZy5q+moAo+nBbJE9s0N1bqvm08rnA3a71VK5/b5 kYYw7+c/LXthnMJ7Mj3REei+zGg1K0p5H21TtM5KgVTsZyFZAmdagk1a60t4HN68/LUzEL 9cOM8uiW6SW7hmRHFivdmd6Vlty7ivhXLoJ/d0pjt323uYcxNQ/HPNgzShPS7BSR99/P9G ZixefTFjf1vArRcqHha+rgwlIHFmRH6d6rDu92HgfUspHLAa5yH59JZV9Ol7SLxZOAKZb2 O2ZPnLZzw6KGb07GldGhvk+/RBBHy8ncpgiErcN0UIDlSoJ7OCVsLEXJln+B5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712597562; a=rsa-sha256; cv=none; b=djKzSWTsuIxaa4K0KCD92Qyvu6Lp3dfkeBZNqibgp9KEXSCan9sR2STaUDQDO90y/FJsZW aCN+I+ECkZPIhO31HYr1u5C8m769jlTzhcejfFL4GofiNXQm219623IED+ByZNBB8LaZ/Y 1VIfFA1TWphZGeAi4u5xn6BzQ8jDepHjrl0OI5caigvrgg6RWHTmbcnoEswBlvnwxzdKsr cTd34cs+ibVTIjMZAu0UeixINpiYptmBSsPX/iwkTG0PSWvasw7g7MfFo96IPdeL2rDYs3 65RVEuxGXq2PZj5iKNoWqQNBpq0L5JOceb97AXzqHucrgvShFJT8HCXOaeFa0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Xg19T8sw; 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=pass (policy=none) header.from=gmail.com 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 51B736260B for ; Mon, 8 Apr 2024 19:32:42 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtsqW-0006ic-DM; Mon, 08 Apr 2024 13:31:52 -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 1rtsqU-0006iI-R3 for emacs-orgmode@gnu.org; Mon, 08 Apr 2024 13:31:50 -0400 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtsqT-0000z5-7h for emacs-orgmode@gnu.org; Mon, 08 Apr 2024 13:31:50 -0400 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-5aa2a4dd0ffso568054eaf.0 for ; Mon, 08 Apr 2024 10:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712597506; x=1713202306; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=eJpnruSoA/EWi3Iy1jVtm98KqBMXCwDTQYj/PmoQ3hw=; b=Xg19T8swxMSRAjlRChD05T1RzNUXXP23j7NB2iBqHQYJvgpsapUM2oXYewNwGHgwGk mxX/F/prUw5BHjsyvk1IrTbZyrDNfGQoOulGqw6YSzvQsMaX0luGycHF/mGU5qblqviP 3Tg4s5OgJ7VWVuB1YxL3wUbTWnKcbj01S4blWDeWK3uG1+l4KGAMQzkM4Wtg7FE63QMA 0hMsNQc64UU7zyHCO5HTdtCClJyUbBexWOhfFoC4d+1X1wM5/xHb1DDCUAPcbMXBbgz1 lF5cNAvHPbzMJ5kefsEpC1tiNqTfyquypEQ1sxfD+g+Z0GNkXh7sMrUSBUUmwErBJJvA G0JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712597506; x=1713202306; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eJpnruSoA/EWi3Iy1jVtm98KqBMXCwDTQYj/PmoQ3hw=; b=MrYxCytkMRj3xp8Dpa4C4VuKnIZ8MiJx+kD1i+MHZNLdGpIon1MQTtuC5kAs/sD+6i xoFcoz0XHm5hyFRPMBVKFHRd7BpwNDKjxSRMqZRQLKOURrm9utnQtaGPD7dq4fmLceht RA8vNwC2T3VylSc49naUjeP+KNOUyL8YFbEQAAMGBSezYSBwoBpQBdbMNLfp5/wu1MB4 i1sGgt2ON2aIjsVwXQxvWGGbaaey9gXOqubWwHCYx/QqBdphlWbX+2SXx01CvDlYF+Vh FBhyoCngb5GLfq4tASRWugM4EpGQEDO0K12aGCiw/vUJsOwhNMaQ4O9gReAFQ25PPfvp T0nA== X-Gm-Message-State: AOJu0YxBc5nOV8Zx7vR9FgjGUG9DZ3JRQKUEippTJU6pho4Y3x9UkLLK FD/z70tf93Lj1v42AuxvpA6B54RByeVjyByEYx0aOuX1QaY7oeD7bViXf/Ota7dkZyhbEJ7gmoH 87jILYO4b/BBzmz/TnFJQ2m8OSLC0gY+j/zE= X-Google-Smtp-Source: AGHT+IHae5sFxDsUgO68zrI5WfnypSRHKRT414sBNSyz1UBK2xCvGZhZbecIU/E1EKhz9Qo/l8FViarOkYB3o5uAYuU= X-Received: by 2002:a05:6870:310e:b0:22d:f642:13e6 with SMTP id v14-20020a056870310e00b0022df64213e6mr145700oaa.7.1712597506227; Mon, 08 Apr 2024 10:31:46 -0700 (PDT) MIME-Version: 1.0 From: Rudi C Date: Mon, 8 Apr 2024 21:01:10 +0330 Message-ID: Subject: [Q] startup hook: How do I detect if the current buffer has been opened programmatically? To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000000087ba0615992ec1" Received-SPF: pass client-ip=2607:f8b0:4864:20::c32; envelope-from=rudiwillalwaysloveyou@gmail.com; helo=mail-oo1-xc32.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, HTML_MESSAGE=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.67 X-Spam-Score: -5.67 X-Migadu-Queue-Id: 51B736260B X-Migadu-Scanner: mx12.migadu.com X-TUID: vZHzpWlAtzdq --0000000000000087ba0615992ec1 Content-Type: text/plain; charset="UTF-8" Org-mode occasionally opens files automatically, for instance, when inserting or opening ID links, or during certain searches. I need to determine if a buffer was opened programmatically or manually by the user within the startup hooks. This distinction is important because, e.g., I want to automatically preview all LaTeX fragments if the buffer was opened by the user, but not if it was opened programmatically. PS: Please use reply-to-all. --0000000000000087ba0615992ec1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Org-mode occasionally opens files automatically, for insta= nce, when inserting or opening ID links, or during certain searches. I need= to determine if a buffer was opened programmatically or manually by the us= er within the startup hooks. This distinction is important because, e.g., I= want to automatically preview all LaTeX fragments if the buffer was opened= by the user, but not if it was opened programmatically.

=
PS: Please use reply-to-all.
--0000000000000087ba0615992ec1--