all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ruijie Yu <ruijie@netyu.xyz>
Cc: alain.cochard@unistra.fr, emacs-orgmode@gnu.org
Subject: Re: Is function 'org-insert-property-drawer' usable?
Date: Sun, 01 Jan 2023 13:23:38 +0000	[thread overview]
Message-ID: <87v8lq75id.fsf@localhost> (raw)
In-Reply-To: <sdvzgb37cbj.fsf@fw.net.yu>

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-insert-property-drawer-Make-into-a-command.patch --]
[-- Type: text/x-patch, Size: 1121 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 224 bytes --]


-- 
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	other threads:[~2023-01-01 13:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31 16:24 Is function 'org-insert-property-drawer' usable? Alain.Cochard
2022-12-31 16:36 ` Ruijie Yu via General discussions about Org-mode.
2023-01-01 13:23   ` Ihor Radchenko [this message]
2023-01-01 16:43     ` Alain.Cochard
2023-01-04 11:53     ` Max Nikulin
2023-01-05  9:41       ` Ihor Radchenko
2023-01-05 10:15         ` Bastien Guerry
2023-01-06 13:32           ` Ihor Radchenko
2023-01-05 23:13       ` When is a function an interactive function? [was Re: Is function 'org-insert-property-drawer' usable?] Alain.Cochard
2023-01-06  4:45         ` Max Nikulin
2023-01-07 20:33         ` Jean Louis
2023-02-03 11:23         ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8lq75id.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=alain.cochard@unistra.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=ruijie@netyu.xyz \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.