Re: [O] org-element-context doesn't parse consistently link with spaces
Hi Nicolas, Nicolas Richard theonewiththeevill...@yahoo.fr writes: Could you review this ? thanks. Applied, thanks! -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
Hello, Bastien b...@gnu.org writes: Please do ~$ git fetch --tags to update all your tags, and make again. That worked. Thank you. Tags are on commits, not on branches, and commmits can belong to multiple branches. Since the tagged commit is both on the maint and the master branch, make autoloads will use the same tag to generate Org's version in both case. Ah, right. Oddly, I was pretty sure that some tags were identifying master branch only, e.g, I can't remember seeing 8.2.5c on master. Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
Nicolas Goaziou writes: That is what I don't understand. You added 8.2.5h to maint, and master wasn't merged into maint since then. How can the tag propagate to master? It doesn't. But maint is included in master as an ancestor and git describe uses the most recent tag in common ancestry to label a commit from. You can add the option --first-parent to only check tags in the current branch. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] org-element-context doesn't parse consistently link with spaces
Hello, Daimrod daim...@gmail.com writes: I think that there is a bug in `org-element-context' because it doesn't seem to parse link with spaces consistently. For example: #+BEGIN_EXAMPLE v [[file:test 1 2 3]] ^ #+END_EXAMPLE If the cursor is before the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test :raw-link file:test :application nil :search-option nil :begin 26 ...)) #+END_EXAMPLE if the cursor is one or after the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test%201%202%203 :raw-link file:test%201%202%203 :application nil :search-option nil :begin 1 ...)) #+END_EXAMPLE I cannot reproduce it. What Org version do you use? Did you try to disable `org-element-use-cache'? Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Daimrod daim...@gmail.com writes: I think that there is a bug in `org-element-context' because it doesn't seem to parse link with spaces consistently. For example: #+BEGIN_EXAMPLE v [[file:test 1 2 3]] ^ #+END_EXAMPLE If the cursor is before the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test :raw-link file:test :application nil :search-option nil :begin 26 ...)) #+END_EXAMPLE if the cursor is one or after the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test%201%202%203 :raw-link file:test%201%202%203 :application nil :search-option nil :begin 1 ...)) #+END_EXAMPLE I cannot reproduce it. What Org version do you use? Did you try to disable `org-element-use-cache'? Sorry, it happens with: #+BEGIN_EXAMPLE [[file:test%201%202%203][file:test 1 2 3]] #+END_EXAMPLE I use org-mode version release_8.0.2-101-gce5988 (I follow the git upstream) and I tried it with `org-element-use-cache' set to nil. It doesn't happen with: #+BEGIN_EXAMPLE [[file:test 1 2 3]] #+END_EXAMPLE but as soon as the cursor leaves the link, org-mode rewrite the link to: #+BEGIN_EXAMPLE [[file:test%201%202%203][file:test 1 2 3]] #+END_EXAMPLE Best, -- Daimrod/Greg
Re: [O] org-element-context doesn't parse consistently link with spaces
Hello, Daimrod daim...@gmail.com writes: I use org-mode version release_8.0.2-101-gce5988 (I follow the git upstream) and I tried it with `org-element-use-cache' set to nil. There was no `org-element-use-cache' in Org 8.0. Could you update Org and try again? Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Daimrod daim...@gmail.com writes: I use org-mode version release_8.0.2-101-gce5988 (I follow the git upstream) and I tried it with `org-element-use-cache' set to nil. There was no `org-element-use-cache' in Org 8.0. Could you update Org and try again? I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. And you're right, it doesn't happen when `org-element-use-cache' is set to nil. However, when `org-element-use-cache' is set to t, then it looks like `org-element-context' uses the link's title instead of the link's value. e.g. #+BEGIN_EXAMPLE v-- with the cursor here, it returns (link (:type file :path foo ...)) [[file:foo][file:test 1 2 3]] ^-^ when the cursor is in this zone, it returns (link (:type file :path test ...)) ^-- when the cursor is after this point (after the first space) it returns (link (:type file :path test 1 2 3 ...)) #+END_EXAMPLE Best, -- Daimrod/Greg
Re: [O] org-element-context doesn't parse consistently link with spaces
Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. When I compile the latest release on master, I get: Org-mode version 8.2.5e (release_8.2.5e-231-g51718d) So, I'm confused. On what branch are you? Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
Hi Nicolas and Greg, Nicolas Goaziou n.goaz...@gmail.com writes: Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. I think Greg did C-h v org-version RET, which returns 8.2.5h both from the maint and the master branch. Greg: M-x org-version RET gives all the information we need. When I compile the latest release on master, I get: Org-mode version 8.2.5e (release_8.2.5e-231-g51718d) So, I'm confused. On what branch are you? Mhh... now *I* am confused. The latest release on master is Org-mode version 8.2.5h (release_8.2.5h-676-gfb8a04) How can it be 8.2.5e for you? -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
Hello Nicolas On 5 March 2014 09:25, Nicolas Goaziou n.goaz...@gmail.com wrote: Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. When I compile the latest release on master, I get: Org-mode version 8.2.5e (release_8.2.5e-231-g51718d) So, I'm confused. On what branch are you? Output from eshell freshly pulling right now: ,-- | ~/build/org $ git stat | git: 'stat' is not a git command. See 'git --help'. | | Did you mean one of these? | status | stage | stash | ~/build/org $ git status | On branch master | Your branch is up-to-date with 'origin/master'. | | nothing to commit, working directory clean | ~/build/org $ c:/cygwin/bin/make autoloads | /usr/bin/make -C lisp autoloads | make[1]: Entering directory '/cygdrive/c/Users/jonpe/build/org/lisp' | rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc | cygwin warning: | MS-DOS style path detected: c:/Users/jonpe/build/org | Preferred POSIX equivalent is: /cygdrive/c/Users/jonpe/build/org | CYGWIN environment variable option nodosfilewarning turns off this warning. | Consult the user's guide for more details about POSIX paths: | http://cygwin.com/cygwin-ug-net/using.html#using-pathnames | org-version: 8.2.5h (release_8.2.5h-678-g51718d) `-- I initially cloned Org onto this machine 1 week ago. 8.2.5h should be on master as well according to the above Regards, -- Nicolas Goaziou Regards, Jon
Re: [O] org-element-context doesn't parse consistently link with spaces
Nicolas Goaziou n.goaz...@gmail.com writes: Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. When I compile the latest release on master, I get: Org-mode version 8.2.5e (release_8.2.5e-231-g51718d) So, I'm confused. On what branch are you? I really don't understand. I am on the master branch, the latest commit I see is yours (51718d9 Fix last commit). I'm trying with a fresh clone. Regards, -- Daimrod/Greg
Re: [O] org-element-context doesn't parse consistently link with spaces
Bastien b...@gnu.org writes: Hi Nicolas and Greg, Nicolas Goaziou n.goaz...@gmail.com writes: Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. I think Greg did C-h v org-version RET, which returns 8.2.5h both from the maint and the master branch. Greg: M-x org-version RET gives all the information we need. Awww that's tricky, M-x org-version doesn't have the same behavior than M-: (org-version) M-x org-version returns: Org-mode version 8.2.5h (release_8.2.5h-678-gd8c717 @ ...) -- Daimrod/Greg
Re: [O] org-element-context doesn't parse consistently link with spaces
Hello, Bastien b...@gnu.org writes: Mhh... now *I* am confused. The latest release on master is Org-mode version 8.2.5h (release_8.2.5h-676-gfb8a04) How can it be 8.2.5e for you? Good question. I have absolutely no clue. OTOH, my tree looks up-to-date, and my .git/config reports: [remote origin] fetch = +refs/heads/*:refs/remotes/origin/* url = orgm...@orgmode.org:org-mode.git [branch master] remote = origin merge = refs/heads/master I don't see anything suspicious here. Also, how comes that master gets a maint tag? AFAIU, release_8.2.5h was put on 53c664c, which belongs to maint. Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
Daimrod daim...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: Daimrod daim...@gmail.com writes: I had forgotten to rerun make after I pulled the latest version. `org-version' now returns 8.2.5h. This is still not right. 8.2.5h refers to maint branch, where cache doesn't exist. When I compile the latest release on master, I get: Org-mode version 8.2.5e (release_8.2.5e-231-g51718d) So, I'm confused. On what branch are you? I really don't understand. I am on the master branch, the latest commit I see is yours (51718d9 Fix last commit). I'm trying with a fresh clone. Still the same with a fresh clone. Regards, -- Daimrod/Greg
Re: [O] org-element-context doesn't parse consistently link with spaces
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Good question. I have absolutely no clue. OTOH, my tree looks up-to-date, and my .git/config reports: [remote origin] fetch = +refs/heads/*:refs/remotes/origin/* url = orgm...@orgmode.org:org-mode.git [branch master] remote = origin merge = refs/heads/master I don't see anything suspicious here. Well, make sure you did a ~$ make or ~$ make autoloads so that lisp/org-version.el is correct. Also, how comes that master gets a maint tag? AFAIU, release_8.2.5h was put on 53c664c, which belongs to maint. I always add the release tag on maint, that's where both minor and major releases are made from (expect that I merge master into maint before a major release.) We could have a dedicated tag for the master branch, but for any move here I'd refer to Achim. -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
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.) -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
Bastien b...@gnu.org writes: Well, make sure you did a ~$ make or ~$ make autoloads so that lisp/org-version.el is correct. I always do: make org-reload from Eshell. That doesn't change anything. I always add the release tag on maint, that's where both minor and major releases are made from (expect that I merge master into maint before a major release.) That is what I don't understand. You added 8.2.5h to maint, and master wasn't merged into maint since then. How can the tag propagate to master? Regards, -- Nicolas Goaziou
Re: [O] org-element-context doesn't parse consistently link with spaces
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.) Now I understand this annoying behaviour - whenever I wrote a function for quick insertion of system-info into a mail I only got the short version but wanted the long one. So it must be #+begin_src emacs-lisp (call-interactively 'org-version) #+end_src #+results: : Org-mode version 8.2.5g (release_8.2.5g-564-ge45d13 @ /usr/share/emacs/24.3/lisp/org/lisp/) instead of #+begin_src emacs-lisp (org-version) #+end_src #+results: : 8.2.5g -- cheers, Thorsten
Re: [O] org-element-context doesn't parse consistently link with spaces
Nicolas Goaziou n.goaz...@gmail.com writes: I always do: make org-reload from Eshell. That doesn't change anything. Please do ~$ git fetch --tags to update all your tags, and make again. I always add the release tag on maint, that's where both minor and major releases are made from (expect that I merge master into maint before a major release.) That is what I don't understand. You added 8.2.5h to maint, and master wasn't merged into maint since then. How can the tag propagate to master? Tags are on commits, not on branches, and commmits can belong to multiple branches. Since the tagged commit is both on the maint and the master branch, make autoloads will use the same tag to generate Org's version in both case. -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
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
Re: [O] org-element-context doesn't parse consistently link with spaces
Hi Nicolas, Nicolas Richard theonewiththeevill...@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! -- Bastien
Re: [O] org-element-context doesn't parse consistently link with spaces
Bastien b...@gnu.org writes: Hi Nicolas, Nicolas Richard theonewiththeevill...@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 theonewiththeevill...@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
[O] org-element-context doesn't parse consistently link with spaces
Hello, I think that there is a bug in `org-element-context' because it doesn't seem to parse link with spaces consistently. For example: #+BEGIN_EXAMPLE v [[file:test 1 2 3]] ^ #+END_EXAMPLE If the cursor is before the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test :raw-link file:test :application nil :search-option nil :begin 26 ...)) #+END_EXAMPLE if the cursor is one or after the '1', then `org-element-context' will return: #+BEGIN_EXAMPLE (link (:type file :path test%201%202%203 :raw-link file:test%201%202%203 :application nil :search-option nil :begin 1 ...)) #+END_EXAMPLE Best, -- Daimrod/Greg signature.asc Description: PGP signature