From 538a536d0da678a753f4e5db17b2e13c6fb1876b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 17 Feb 2009 22:23:50 +0100 Subject: [PATCH] Quoting: Make =http:a.b.com= work as a quoted string. --- lisp/ChangeLog | 4 ++++ lisp/org-exp.el | 2 +- lisp/org-macs.el | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc8f99757..1e2c4dbc6 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2009-02-17 Carsten Dominik + * org-exp.el (org-export-normalize-links): Use new macro. + + * org-macs.el (org-if-unprotected-at): New macro. + * org-agenda.el (org-agenda-show): Allow numerical prefix arguments to specify how much context should be shown. (org-agenda-cycle-show): New command, could be bound to SPC in diff --git a/lisp/org-exp.el b/lisp/org-exp.el index e1c35031a..732d72524 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2050,7 +2050,7 @@ When it is nil, all comments will be removed." (goto-char (point-min)) (while (re-search-forward re-plain-link nil t) (goto-char (1- (match-end 0))) - (org-if-unprotected + (org-if-unprotected-at (1+ (match-beginning 0)) (let* ((s (concat (match-string 1) "[[" (match-string 2) ":" (match-string 3) "]]"))) ;; added 'org-link face to links diff --git a/lisp/org-macs.el b/lisp/org-macs.el index d449b8ffe..86496b67d 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -110,6 +110,11 @@ We use a macro so that the test can happen at compilation time." `(unless (get-text-property (1- (point)) 'org-protected) ,@body)) +(defmacro org-if-unprotected-at (pos &rest body) + "Execute BODY if there is no `org-protected' text property at point-1." + `(unless (get-text-property ,pos 'org-protected) + ,@body)) + (defmacro org-with-remote-undo (_buffer &rest _body) "Execute BODY while recording undo information in two buffers." `(let ((_cline (org-current-line))