emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-src.el: add option `org-src-native-defun-movements'
Date: Sat, 04 Dec 2021 10:27:43 +1100	[thread overview]
Message-ID: <87r1atgsyt.fsf@gmail.com> (raw)
In-Reply-To: <5a675071-292a-1f10-9791-5085a6d8bef8@posteo.eu>


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

> Hi,
>
> The attached patch adds a new option ~org-src-native-defun-movements~
> that makes ~beginning-of-defun~, ~end-of-defun~ and ~eval-defun~ work
> natively when called from inside an org src block : those functions
> are called from an org src edit buffer, in the appropriate language
> mode. Without this patch, calling =eval-defun= on elisp code fails.
>
> With this option set to t by default, this is a breaking change. To
> get to the beginning/end of a src block you'd have to call
> ~org-backward-element~ or ~org-forward-element~ directly, instead of
> ~beginning-of-defun~. Or you could disable the new behaviour by
> setting ~org-src-native-defun-movements~ to nil.
>

As this is a breaking change, it should not be on by default.

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?


  reply	other threads:[~2021-12-03 23:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 19:01 [PATCH] org-src.el: add option `org-src-native-defun-movements' Sébastien Miquel
2021-12-03 23:27 ` Tim Cross [this message]
2021-12-04  6:50   ` Sébastien Miquel
2021-12-04 21:51     ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1atgsyt.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).