From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +Kg8McwyB2SdIgEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:49:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +PRfMMwyB2Sp1QAAG6o9tA (envelope-from ) for ; Tue, 07 Mar 2023 13:49:16 +0100 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 2B874CB33 for ; Tue, 7 Mar 2023 13:49:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWkJ-0003Ge-6l; Tue, 07 Mar 2023 07:48:47 -0500 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 1pZWkH-0003GV-AX for emacs-orgmode@gnu.org; Tue, 07 Mar 2023 07:48:46 -0500 Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZWkF-0003xO-Av for emacs-orgmode@gnu.org; Tue, 07 Mar 2023 07:48:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1678193321; bh=cVEXE9wjCT9OqU0Y0XhgB5RKzFGD/dBOgfvWLSbncK0=; h=From:To:Message-ID:Date:Subject:Content-type:From; b=pvTBpuqE3ilIK4nBwCJxh55BzAWXH+ooJkw0SYDsIkyITS+1ReTexSG5JWZbcHrF/ 3t8B9WC1Cb45IjuwrsB66N/cxn9chlAK6iXRuLNypne7/Y677ez1IaLyq8A2FEbCDV 6oPCe0MLUs35VrZM9v3FYSuY/+ttxNBEL6i/tm3g= Received: from mp102.fra-mediabeam.com (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4PWFcT2HdWz223r for ; Tue, 7 Mar 2023 12:48:41 +0000 (UTC) Received: from mailbackend01 (unknown [10.0.0.2]) by mp102.fra-mediabeam.com (Postfix) with ESMTP id 4PWFcT1lFGz8t3W for ; Tue, 7 Mar 2023 12:48:41 +0000 (UTC) From: "Farblos" To: emacs-orgmode@gnu.org Message-ID: <9eaf7099554d488d921e64c4b2852a0d@vodafonemail.de> Date: Tue, 07 Mar 2023 13:48:39 +0100 X-Priority: 3 Subject: [ENHANCEMENT] Make `org-babel-do-in-edit-buffer' environment detectable MIME-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 1216 X-purgate-ID: 155817::1678193321-556DF1CD-C2AE0A08/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=AKFKQU.9DF7RP@vodafonemail.de; helo=mr4.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678193356; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=cVEXE9wjCT9OqU0Y0XhgB5RKzFGD/dBOgfvWLSbncK0=; b=kpJRdL81ix9SdCE8g9E37+0S8L2fUNCSKdpyb3swMpoI1DDjgHBA6e9QWhV2wuihZWy4ih Saj1/WduqX8xOJi3PSN/d/6XJg+nY+FucZpgPquxpFgXY/sUn0UxxOmh24dM/R6b5uBOah U87cEAT+YXNyqM9beQILP8ckka8u1i+tgVWXdwvdT5SGrTc+15ZKaj0troFYUGL/Syqcgn xZVSdQqN+5IGlpmR/M6qrk1P002/rCSV33ku2q/Kap+yBIcTb9BdZtmY2+BQ1T4FoHbm5s 8M+pUBZWqa8JB8Ns8ZfKjjFQAVB+HazRXI98kI3exu/0TCTAT6DHhmgiYYWORg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=pvTBpuqE; 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=quarantine) header.from=vodafonemail.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678193356; a=rsa-sha256; cv=none; b=CsGMb4/UgxW3P6dTOOiXMINpTqArWwUMCc/+izoeXjWgBA1zqhA7wQhvmlSMxEDlOi9zxe gy7vBGaC5MBP8Uu/VQoS/e/7CeSMD6W/owGk67ZLxbSSrvRCSVzLw6wMLzC5w760Ge68Am EDvqO2QJr4oEonFf4LMGdvpiMcs8XLm3fmSFScIeTuuJRDTW7L2V+7IkwaHGctD7OOq/EW crqqknYkvauXCIdjYA8ax4GeLtSgdQjrMwPQF1BcjAO1cIwDy4RxICD1ipPnOCBezn0zii 9WiT1r3oW+Zc4FBD8eZDyboh5Ao1OgVQJ8Hq+lnou56WUpt25orxHDHPwocICw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=pvTBpuqE; 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=quarantine) header.from=vodafonemail.de X-Migadu-Spam-Score: -2.81 X-Spam-Score: -2.81 X-Migadu-Queue-Id: 2B874CB33 X-Migadu-Scanner: scn1.migadu.com X-TUID: p0B3TjdeP2X4 Concrete use case: I got fed up by sh-mode notifying me about "Indentat= ion setup for shell type bla" when editing shell source blocks in an Or= g buffer=2E (To reproduce, start "emacs -Q", open an empty org file, c= reate a shell source block with contents " echo foo", and press TAB on= that line=2E) So I wanted to advice `sh-set-shell' to surpress all messages, *but onl= y* when called from macro `org-babel-do-in-edit-buffer'=2E To detect th= at, I resorted to variable `org-inhibit-startup', but that is not reall= y intended for that purpose=2E For this and similar use cases (run/do not run some major mode hook onl= y in Org source environment), it would be helpful to have a documented = dynamic variable (`org-in-babel-environment'?) set by `org-babel-do-in-= edit-buffer' or the like that one could query as=20 (when (and (boundp 'org-in-babel-environment) org-in-babel-environmen= t) ;; do org-specific stuff) Emacs : GNU Emacs 28=2E2 (build 2, x86_64-pc-linux-gnu, X toolkit, cai= ro version 1=2E16=2E0, Xaw3d scroll bars) of 2023-01-18, modified by Debian Package: Org mode version 9=2E5=2E2 (9=2E5=2E2 @ /usr/share/emacs/site-= lisp/elpa/org-9=2E5=2E2/)