emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org-src.el: add option `org-src-native-defun-movements'


From: Tim Cross
Subject: Re: [PATCH] org-src.el: add option `org-src-native-defun-movements'
Date: Sun, 05 Dec 2021 08:51:41 +1100
User-agent: mu4e 1.7.5; emacs 28.0.90

Sébastien Miquel <sebastien.miquel@posteo.eu> writes:

> Hi,
>
> Thank you for having a look.
>
> Tim Cross writes:
>> This also seems like an edge case and I'm not convinced yet another
>> option is justified. Why have eilisp in org blocks rather than an
>> emacs-lisp block?
>
> By org src blocks I meant an org emacs-lisp src block. The point of
> the patch is to be able to eval-defun some lisp code in an emacs-lisp
> src block from the org-buffer.
>

OK, that makes it clearer. However, I'm not convinced this is something
we need or want. You can evaluate emacs lisp blocks and you can use
edit-special buffers to evaluate individual lines in a source block.
Being able to execute arbitrary lisp forms at a top level inside an org
buffer could be considered dangerous. I don't think it should be enabled
by default. 

>> As this is a breaking change, it should not be on by default.
> Currently eval-defun errors out, and fixing that will break things
> sooner or later, I think.
>
> I do not mind updating the patch to set the new option to nil by
> default, although I'll wait for a second opinion on this.
>

That is fine. However, note that this would mean your patch can only be
applied to the next version (development version) of org and not to the
current maintenance branch because you cannot add a breaking change to
an already released version.

I think you are making it harder to get the patch applied by enabling
the option. There is a (rightly) conservative stance on breaking
changes. Adding a new option which is enabled by default and which
breaks existing functionality has almost no chance of being applied.
Adding a new option which is a breaking change that needs to be enabled
by the user is far more likely to be considered.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]