From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: org-element-context doesn't parse consistently link with spaces Date: Wed, 05 Mar 2014 16:42:14 +0100 Message-ID: <871tygy7mx.fsf@yahoo.fr> References: <87wqgabb08.fsf@tanger.home> <87ha7clqz3.fsf@gmail.com> <87r46gahs2.fsf@tanger.home> <877g88lpwp.fsf@gmail.com> <87mwh4ag4y.fsf@tanger.home> <8738iwlo3c.fsf@gmail.com> <87ob1kpvm0.fsf@bzg.ath.cx> <87eh2gaf06.fsf@tanger.home> <87bnxkpu31.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLDxm-0008JB-58 for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 10:42:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLDxh-0007yT-30 for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 10:42:30 -0500 In-Reply-To: <87bnxkpu31.fsf@bzg.ath.cx> (Bastien's message of "Wed, 05 Mar 2014 16:02:10 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Daimrod , emacs-orgmode@gnu.org Bastien writes: > Daimrod 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 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