emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: gerard.vermeulen@posteo.net
To: Emacs orgmode <emacs-orgmode@gnu.org>,
	Ihor Radchenko <yantar92@posteo.net>
Subject: [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring
Date: Mon, 29 Jan 2024 10:42:24 +0000	[thread overview]
Message-ID: <c52b641a22f010965a69465cd05c1661@posteo.net> (raw)

[-- 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


             reply	other threads:[~2024-01-29 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 10:42 gerard.vermeulen [this message]
2024-01-29 15:51 ` [PATCH] lisp/org-src.el: complete `org-src-preserve-indentation' docstring Ihor Radchenko

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=c52b641a22f010965a69465cd05c1661@posteo.net \
    --to=gerard.vermeulen@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).