* [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring
@ 2024-01-29 10:42 gerard.vermeulen
2024-01-29 15:51 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: gerard.vermeulen @ 2024-01-29 10:42 UTC (permalink / raw)
To: Emacs orgmode, Ihor Radchenko
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
Hi,
I have found by trial and error that `org-indent-block' honors
`org-preserve-indentation' which is missing from its docstring.
The attached patch contains a proposal to add this fact to the
docstring.
Regards -- Gerard
[-- Attachment #2: 0001-lisp-org-src.el-complete-org-src-preserve-indentatio.patch --]
[-- Type: application/octet-stream, Size: 1905 bytes --]
From 1d3883bce7d249f64248535c1616d527f377e11c Mon Sep 17 00:00:00 2001
From: Gerard Vermeulen <gerard.vermeulen@posteo.net>
Date: Mon, 29 Jan 2024 11:12:18 +0100
Subject: [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation'
docstring
* lisp/org-src.el (org-src-preserve-indentation): Add that this
option is also honored by `org-indent-block'. Remove \\<org-mode-map>
since such forms serve for major mode documentation strings.
---
lisp/org-src.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 7a4d2e4ce..300c883df 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -119,15 +119,16 @@ These are the regions where each line starts with a colon."
(defcustom org-src-preserve-indentation nil
"If non-nil preserve leading whitespace characters on export.
-\\<org-mode-map>
-If non-nil leading whitespace characters in source code blocks
-are preserved on export, and when switching between the org
-buffer and the language mode edit buffer.
-
-When this variable is nil, after editing with `\\[org-edit-src-code]',
-the minimum (across-lines) number of leading whitespace characters
-are removed from all lines, and the code block is uniformly indented
-according to the value of `org-edit-src-content-indentation'."
+
+If non-nil leading whitespace characters in source code blocks are
+preserved on export, or adjusted while indenting or when switching
+between the org buffer and the language mode edit buffer.
+
+When this variable is nil, while indenting with `\\[org-indent-block]'
+or after editing with `\\[org-edit-src-code]', the minimum (across-lines)
+number of leading whitespace characters are removed from all lines,
+and the code block is uniformly indented according to the value of
+`org-edit-src-content-indentation'."
:group 'org-edit-structure
:type 'boolean)
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring
2024-01-29 10:42 [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring gerard.vermeulen
@ 2024-01-29 15:51 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-01-29 15:51 UTC (permalink / raw)
To: gerard.vermeulen; +Cc: Emacs orgmode
gerard.vermeulen@posteo.net writes:
> I have found by trial and error that `org-indent-block' honors
> `org-preserve-indentation' which is missing from its docstring.
>
> The attached patch contains a proposal to add this fact to the
> docstring.
Thanks!
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=813614cff
--
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-29 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 10:42 [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring gerard.vermeulen
2024-01-29 15:51 ` Ihor Radchenko
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).