From: Sebastian Miele <sebastian.miele@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Handling of org-edit-src-content-indentation
Date: Sun, 06 Oct 2019 15:40:13 +0000 [thread overview]
Message-ID: <87lftxj31e.fsf@gmail.com> (raw)
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
reply other threads:[~2019-10-06 15:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87lftxj31e.fsf@gmail.com \
--to=sebastian.miele@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).