emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-element-context doesn't parse consistently link with spaces


From: Nicolas Richard
Subject: Re: [O] org-element-context doesn't parse consistently link with spaces
Date: Wed, 05 Mar 2014 16:42:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Bastien <address@hidden> writes:

> Daimrod <address@hidden> writes:
>
>> Awww that's tricky, M-x org-version doesn't have the same behavior than
>> M-: (org-version)
>
> That's on purpose: (org-version) is what you want to call in a
> program, hence the short version, while M-x org-version RET is what
> you want to call interactively (hence the longer one.)

I tried (org-version t) C-x C-e but it inserted nothing. Looking at the
code, I'd suggest the following patch.

OTOH, I find it a bad idea that some arguments are ignored in
non-interactive uses, it'd be better to have a function which fully
obeys its arguments, and has an interactive spec which sets the
argument. If you're interested I can do that.


From: Nicolas Richard <address@hidden>
Date: Wed, 5 Mar 2014 16:38:58 +0100
Subject: [PATCH] org.el (org-version): mention that HERE is ignored in
 non-interactive uses.

---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 64ee668..5c1b61e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -298,7 +298,8 @@ identifier."
 ;;;###autoload
 (defun org-version (&optional here full message)
   "Show the org-mode version in the echo area.
-With prefix argument HERE, insert it at point.
+With prefix argument HERE (this is ignored in non-interactive
+uses), insert it at point.
 When FULL is non-nil, use a verbose version string.
 When MESSAGE is non-nil, display a message with the version."
   (interactive "P")
-- 
1.8.3.2



reply via email to

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