Jens Schmidt <jschmidt4...@vodafonemail.de> writes: > Um, sorry for butting in, but I also have an interest of recognizing > Org's special source environments, see here: > > https://list.orgmode.org/9eaf7099554d488d921e64c4b2852...@vodafonemail.de/ > > That thread led to nowhere back then, but I think it still makes > sense to have the various Org source environments detectable in > a defined and explicit way, and Stephane's request reminded me > about that.
AFAIR, your request was not about detecting "src edit" buffers, but about detecting when a command is called in those buffers in very specific scenario - by `org-babel-do-in-edit-buffer', while keeping the normal behavior when editing those buffers interactively. > While one could use buffer names also for detecting the source edit > buffers ("*Org Src collateral.org[ shell ]*"), it feels somehow > brittle, since names can change. So why not extend on Stephane's > request and provide some variable that informs about the various > types of Org source environments? How would that help your original request? > Like a variable named `org-src-environment-type' bound dynamically > to possible values, e.g. `edit' or `fontify'? I am reluctant. This will force us to make sure that we arrange this variable appropriately in every single temporary buffer Org creates for various purposes. In other words, it will increase maintenance burden. Unless strongly justified, I am not going to do it. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>