all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-store-link modifies readonly-buffer
@ 2024-01-20 19:12 Tennyson Bardwell
  2024-01-30 14:10 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Tennyson Bardwell @ 2024-01-20 19:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Hi org-mode devs,

My apologies for the sparse & trivial bug report.

It seems as though =org-store-link= does not respect the "readonly" part of
read-only buffers. I noticed it myself[1], found a bug report on
stackexchange[2], and did not see the appropriate check in the code[3].

If this is unintended, I would be happy to try to submit a PR. I have not
yet contributed to any emacs ecosystem, so I would be slow & bad at this,
but happy to try.

🌸
Tennyson

[1]
Evil spacemacs, heavily customized

[2]
https://emacs.stackexchange.com/questions/79220/how-to-ignore-buffer-read-only-when-archiving-subtrees-in-org-mode

[3]
- https://github.com/bzg/org-mode/blob/main/lisp/ol.el#L1687-L1703
-
https://github.com/bzg/org-mode/blob/9183e3c723b812360d1042196416d521db590e9f/lisp/ol.el#L1687-L1703

[-- Attachment #2: Type: text/html, Size: 1427 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-store-link modifies readonly-buffer
  2024-01-20 19:12 org-store-link modifies readonly-buffer Tennyson Bardwell
@ 2024-01-30 14:10 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-01-30 14:10 UTC (permalink / raw)
  To: Tennyson Bardwell; +Cc: emacs-orgmode

Tennyson Bardwell <tennysontaylorbardwell@gmail.com> writes:

> It seems as though =org-store-link= does not respect the "readonly" part of
> read-only buffers. I noticed it myself[1], found a bug report on
> stackexchange[2], and did not see the appropriate check in the code[3].
>
> If this is unintended, I would be happy to try to submit a PR. I have not
> yet contributed to any emacs ecosystem, so I would be slow & bad at this,
> but happy to try.

Confirmed.
This is intended, with the main purpose of not barfing with error when
users call `org-store-link' in read-only *Org goto* indirect buffers.

More generally, Org mode handling of read-only state is rather
inconsistent. We have a number of places that do ignore read-only and a
number of places that don't.

I do believe that the right things to do is respecting read-only state
with an exception to *Org goto* buffers (or maybe other buffers that we
should explicitly mark). But doing so might break user workflows.
We need to carefully study various instances where Org mode ignores
read-only state to decide what is the best course of action.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-30 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-20 19:12 org-store-link modifies readonly-buffer Tennyson Bardwell
2024-01-30 14:10 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.