emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is function 'org-insert-property-drawer' usable?


From: Ihor Radchenko
Subject: Re: Is function 'org-insert-property-drawer' usable?
Date: Sun, 01 Jan 2023 13:23:38 +0000

Ruijie Yu via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:

> According to the source code of `org-insert-drawer', I think the manual
> is saying that when ARG is non-nil, the function simply calls
> `org-insert-property-drawer'.  However, `org-insert-property-drawer' is
> not declared interactive, so you wouldn't be able to M-x it.

I guess we can just make it into a command. I see no downsides.

See the attached.

>From a32e4791ee3b0f12d8b9ce006c2ec4cede3829eb Mon Sep 17 00:00:00 2001
Message-Id: 
<a32e4791ee3b0f12d8b9ce006c2ec4cede3829eb.1672579366.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Sun, 1 Jan 2023 16:21:32 +0300
Subject: [PATCH] org-insert-property-drawer: Make into a command

* lisp/org.el (org-insert-property-drawer): Make interactive.  This
function is mentioned in the manual and may be used by users.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25520.25134.831330.318368@gargle.gargle.HOWL
---
 lisp/org.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org.el b/lisp/org.el
index db32ec562..6cb326ca0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13062,6 +13062,7 @@ (defun org-insert-property-drawer ()
   "Insert a property drawer into the current entry.
 Do nothing if the drawer already exists.  The newly created
 drawer is immediately hidden."
+  (interactive)
   (org-with-wide-buffer
    ;; Set point to the position where the drawer should be inserted.
    (if (or (not (featurep 'org-inlinetask)) (org-inlinetask-in-task-p))
-- 
2.38.1

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]