Re: [O] [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
Hi Albert, Achim Gratz writes: > Albert Krewinkel writes: >> Done. As an aside: I did sign the copyright assignment papers to be >> able to contrivute to Gnus, but that probably wouldn't help much, as >> Org is a different project. Is that correct? > > If you assigned copyright just for Gnus, then you'd have to do it again > for Org. I've just checked and yes, Albert's assignment is made for EMACS/GNUS. So I'm afraid Albert you have to go through the process of assigning your copyright again for Emacs :/ You can use the form here: http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt HTH, -- Bastien
Re: [O] [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
Albert Krewinkel writes: > Done. As an aside: I did sign the copyright assignment papers to be > able to contrivute to Gnus, but that probably wouldn't help much, as > Org is a different project. Is that correct? If you assigned copyright just for Gnus, then you'd have to do it again for Org. If instead you've assigned it for Emacs, then everything is already OK, just let Bastien know and perhaps give him the number of your assignment so it's easier for him to check. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Waldorf MIDI Implementation & additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Re: [O] [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
Hi Bastien, Bastien writes: > Albert Krewinkel writes: > >> * org.el (org-offer-links-in-entry): Use `org-any-link-re' to avoid >> code duplication. > > This is not really code duplication, as the output of `org-any-link-re' > is different from the output of the current sexp in the code. I'm not exactly sure what you mean, are you referring to the variables' different representation in the source? I double checked that (string-equal re org-any-link-re) => t when `re' is set to the old value (as of commit 7c8559e). > That said, the change looks good anyway. Can you double-check there > cannot be any problem with the value of `org-any-link-re'? The variable is only ever changed when calling `org-make-link-regexps', so I'm quite positive that the change does not have any unintended side effects. The test suite passes, too. >> This is a TINYCHANGE. > > (TINYCHANGE should stand alone on the line.) Done. As an aside: I did sign the copyright assignment papers to be able to contrivute to Gnus, but that probably wouldn't help much, as Org is a different project. Is that correct? > Thanks! No, thank you all for all the work you put into this! It is truly amazing! Albert Krewinkel (1): org.el (org-offer-links-in-entry): Reuse global variable lisp/org.el | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.0.0.rc0
Re: [O] [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
Hi Albert, thanks for the patch. Albert Krewinkel writes: > * org.el (org-offer-links-in-entry): Use `org-any-link-re' to avoid > code duplication. This is not really code duplication, as the output of `org-any-link-re' is different from the output of the current sexp in the code. That said, the change looks good anyway. Can you double-check there cannot be any problem with the value of `org-any-link-re'? > The `re' variable defined in function `org-offer-links-in-entry' is > string-equal to `org-any-link-re' and is hence replaced by the latter. > > This is a TINYCHANGE. (TINYCHANGE should stand alone on the line.) Thanks! -- Bastien
[O] [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
* org.el (org-offer-links-in-entry): Use `org-any-link-re' to avoid code duplication. The `re' variable defined in function `org-offer-links-in-entry' is string-equal to `org-any-link-re' and is hence replaced by the latter. This is a TINYCHANGE. --- lisp/org.el | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ad76e67..741529b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10694,10 +10694,7 @@ there is one, return it." (save-restriction (widen) (goto-char marker) - (let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|" - "\\(" org-angle-link-re "\\)\\|" - "\\(" org-plain-link-re "\\)")) - (cnt ?0) + (let ((cnt ?0) (in-emacs (if (integerp nth) nil nth)) have-zero end links link c) (when (and (stringp zero) (string-match org-bracket-link-regexp zero)) @@ -10706,7 +10703,7 @@ there is one, return it." (save-excursion (org-back-to-heading t) (setq end (save-excursion (outline-next-heading) (point))) - (while (re-search-forward re end t) + (while (re-search-forward org-any-link-re end t) (push (match-string 0) links)) (setq links (org-uniquify (reverse links (cond -- 1.9.2