Bastien <b...@gnu.org> writes: > Daimrod <daim...@gmail.com> 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 <theonewiththeevill...@yahoo.fr> 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