* Handling of org-edit-src-content-indentation
@ 2019-10-06 15:40 Sebastian Miele
0 siblings, 0 replies; only message in thread
From: Sebastian Miele @ 2019-10-06 15:40 UTC (permalink / raw)
To: emacs-orgmode
Dear fellows!
GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-29
Org mode version 9.2.6 (release_9.2.6-544-gd215c3 @ /home/w/borg/emacs/org/lisp/)
The variable org-edit-src-content-indentation has a default value of 2.
Buffer-local values for that variable currently are not respected when
using org-edit-src-code. Buffer-local values for this variable are set
in e.g. worg/.dir-locals.el.
The bug can be fixed by changing
org-edit-src-content-indentation
into
(with-current-buffer (marker-buffer org-src--beg-marker)
org-edit-src-content-indentation)
in the definition of org-src--contents-for-write-back. However, the
general patterns in the org-src.el suggest, that something similar to
(defvar-local org-src--preserve-indentation nil)
(put 'org-src--preserve-indentation 'permanent-local t)
should be introduced, set up, and used.
But except following the pattern, I see no advantage in the latter
approach, even two slight disadvantages. The first beeing that it uses
more lines of code, and the second being so minor and opinionated that I
don't mention it.
Which route shall I take when preparing a patch?
Best wishes
Sebastian
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-06 15:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-06 15:40 Handling of org-edit-src-content-indentation Sebastian Miele
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).