From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Bastien <bzg@gnu.org>
Cc: Daimrod <daimrod@gmail.com>,
Nicolas Richard <theonewiththeevillook@yahoo.fr>,
emacs-orgmode@gnu.org
Subject: Re: org-element-context doesn't parse consistently link with spaces
Date: Wed, 05 Mar 2014 17:27:50 +0100 [thread overview]
Message-ID: <87siqwwqyh.fsf@yahoo.fr> (raw)
In-Reply-To: <87k3c8lji8.fsf@bzg.ath.cx> (Bastien's message of "Wed, 05 Mar 2014 17:04:15 +0100")
Bastien <bzg@gnu.org> writes:
> Hi Nicolas,
>
> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
>
>> 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.
>
> Of course I'm interested, thanks in advance!
Could you review this ? thanks.
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Wed, 5 Mar 2014 17:25:45 +0100
Subject: [PATCH] lisp/org.el (org-version): obey all arguments in
non-interactive uses.
---
lisp/org.el | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 5c1b61e..11184cc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -297,12 +297,11 @@ identifier."
;;;###autoload
(defun org-version (&optional here full message)
- "Show the org-mode version in the echo area.
-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")
+ "Show the org-mode version.
+Interactively, or when MESSAGE is non-nil, show it in echo area.
+With prefix argument, or when HERE is non-nil, insert it at point.
+In non-interactive uses, a reduced version string is output unless FULL is given."
+ (interactive (list current-prefix-arg t (not current-prefix-arg)))
(let* ((org-dir (ignore-errors (org-find-library-dir "org")))
(save-load-suffixes (when (boundp 'load-suffixes) load-suffixes))
(load-suffixes (list ".el"))
@@ -322,12 +321,12 @@ When MESSAGE is non-nil, display a message with the version."
(concat "mixed installation! " org-install-dir " and " org-dir))
"org-loaddefs.el can not be found!")))
(version1 (if full version org-version)))
- (if (org-called-interactively-p 'interactive)
- (if here
- (insert version)
- (message version))
- (if message (message version1))
- version1)))
+ (when here (insert version1))
+ (when message (message "%s" version1))
+ version1))
+
+
+
(defconst org-version (org-version))
--
1.8.3.2
next prev parent reply other threads:[~2014-03-05 16:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 8:53 org-element-context doesn't parse consistently link with spaces Daimrod
2014-03-05 13:22 ` Nicolas Goaziou
2014-03-05 13:37 ` Daimrod
2014-03-05 13:45 ` Nicolas Goaziou
2014-03-05 14:12 ` Daimrod
2014-03-05 14:25 ` Nicolas Goaziou
2014-03-05 14:29 ` Bastien
2014-03-05 14:36 ` Daimrod
2014-03-05 15:02 ` Bastien
2014-03-05 15:35 ` Thorsten Jolitz
2014-03-05 15:42 ` Nicolas Richard
2014-03-05 16:04 ` Bastien
2014-03-05 16:27 ` Nicolas Richard [this message]
2014-03-13 15:01 ` Bastien
2014-03-05 14:51 ` Nicolas Goaziou
2014-03-05 15:00 ` Bastien
2014-03-05 15:16 ` Nicolas Goaziou
2014-03-05 15:40 ` Bastien
2014-03-10 14:25 ` Nicolas Goaziou
2014-03-08 12:45 ` Achim Gratz
2014-03-05 14:30 ` Jonathan Leech-Pepin
2014-03-05 14:32 ` Daimrod
2014-03-05 14:52 ` Daimrod
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=87siqwwqyh.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=bzg@gnu.org \
--cc=daimrod@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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.