Indeed if this is a valid use case for buffer identification, the approach
in the patch seems trivial (to me, buffer locals are more appropriate than
dynamic bindings), if overkill for the purpose I proposed.

On Sat, Jan 18, 2025 at 7:16 AM Jens Schmidt <jschmidt4...@vodafonemail.de>
wrote:

> On 2025-01-18  12:38, Ihor Radchenko wrote:
> > Ship Mints <shipmi...@gmail.com> writes:
> >
> >> Yes, could do, and nothing needed by org-mode or markdown-mode. Could
> also
> >> test for buffer-file-name nil. Or test both. Let's recommend that
> simpler
> >> approach and I will rescind my markdown PR in favor of this simpler
> >> suggestion.
> >
> > Well. Org or markdown should name the buffers according to the
> > convention :) Org does it though. So, we should be good.
> >
> > Closing the patch request.
> > Canceled.
>
> 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.
>
> 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?
>
> Like a variable named `org-src-environment-type' bound dynamically
> to possible values, e.g. `edit' or `fontify'?
>
> Thanks!  (In particular also for taking the responsibility of Org
> maintenance.)
>
>

Reply via email to