Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ihor Radchenko
Ship Mints writes: > Makes sense. I'm not set up to contribute to WORG, perhaps you can do it, > if you don't mind? I can add it to my todo list. But that means not soon. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org develo

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ihor Radchenko
Jens Schmidt 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

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
Makes sense. I'm not set up to contribute to WORG, perhaps you can do it, if you don't mind? On Sat, Jan 18, 2025 at 7:39 AM Ihor Radchenko wrote: > Ship Mints writes: > > > This could be added to the org-mode documentation as a hint for those who > > use native fontification. Should I send a p

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ihor Radchenko
Ship Mints writes: > This could be added to the org-mode documentation as a hint for those who > use native fontification. Should I send a patch for that or trivial enough > you'd do it, if you agree? I am not sure if this problem is so common that we need to put it into the manual. I think cre

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
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 wrote: > On 2025-01-18 12:38, Ihor Radche

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Jens Schmidt
On 2025-01-18 12:38, Ihor Radchenko wrote: > Ship Mints 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 >> s

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
This could be added to the org-mode documentation as a hint for those who use native fontification. Should I send a patch for that or trivial enough you'd do it, if you agree? On Sat, Jan 18, 2025 at 6:54 AM Ship Mints wrote: > For the record, this is what I've recommended and what I will use: >

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
For the record, this is what I've recommended and what I will use: (defun my/XXX-mode-hook () (when (or buffer-file-name (not (string-prefix-p " " (buffer-name ;; do something expensive )) On Sat, Jan 18, 2025 at 6:36 AM Ihor Radchenko wrote: > Ship Mints wr

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ihor Radchenko
Ship Mints 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 bu

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
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. On Sat, Jan 18, 2025 at 6:18 AM Ihor Radchenko wrote: > Ship Mints

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ihor Radchenko
Ship Mints writes: > Eglot was the first request cited. For python programmers that rely on per > project/directory-local or per-buffer virtual environment set up, this can > be heavier than needed just for fontification. I enable eglot manually, but > I do use python virtual environments and wou

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-18 Thread Ship Mints
Eglot was the first request cited. For python programmers that rely on per project/directory-local or per-buffer virtual environment set up, this can be heavier than needed just for fontification. I enable eglot manually, but I do use python virtual environments and would disable initialization in

Re: Add org-src-is-fontify-buffer-p (patch attached)

2025-01-17 Thread Ihor Radchenko
Ship Mints writes: > I've added the predicate function org-src-is-fontify-buffer-p which can be > used in a prog-mode hook to avoid resource-intensive features such as eglot > inside a fontification buffer. This short example should make it clear. > > (defun my/emacs-lisp-hook () > (unless (and

Add org-src-is-fontify-buffer-p (patch attached)

2025-01-17 Thread Ship Mints
Greetings, org-mode maintainers, I've become an occasional contributor over on the Emacs side. I thought I'd give an org-mode contribution a try. The attached patch came out of the discussion here https://www.reddit.com/r/emacs/comments/1i3mk6m/disable_eglot_in_orgmode_source_blocks/ I've added