emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [PATCH] org-agenda-add-entry-text


From: Carsten Dominik
Subject: Re: [Orgmode] [PATCH] org-agenda-add-entry-text
Date: Sun, 8 Mar 2009 16:53:24 +0100

Applied, thanks.

- Carsten

On Mar 8, 2009, at 4:28 PM, Christopher Suckling wrote:

There seems to be an inconsistency in how org-agenda-add-entry-text handles links. Sometimes they are exported as descriptive links and sometimes as a [[URL][descriptive]] pair.

The following patch adds a new variable, org-agenda-add-entry-text- descriptive-links, that controls which of the above formats to use when exporting the agenda.

Best wishes,

Christopher

-----

        Modified lisp/org-agenda.el
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9b34d01..be2faab 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -126,6 +126,12 @@ that is listed in the agenda view."
  :group 'org-agenda
  :type 'integer)

+(defcustom org-agenda-add-entry-text-descriptive-links t
+ "Non-nil means, export org-links as descriptive links (obfuscating the
+URL) when adding entry text to an agenda export."
+  :group 'org-agenda
+  :type 'boolean)
+
(defcustom org-agenda-export-html-style ""
  "The style specification for exported HTML Agenda files.
If this variable contains a string, it will replace the default <style> @@ -2132,6 +2138,15 @@ Drawers will be excluded, also the line with scheduling/deadline info."
                                              ".*\n?"))
                    (with-temp-buffer
                      (insert txt)
+                     (if org-agenda-add-entry-text-descriptive-links
+                         (progn (goto-char (point-min))
+                                (while (org-activate-bracket-links (point-max))
+                                  (add-text-properties (match-beginning 0) 
(match-end 0)
+                                                       '(face org-link))))
+                       (goto-char (point-min))
+                       (while (re-search-forward org-bracket-link-regexp 
(point-max) t)
+                         (set-text-properties (match-beginning 0) (match-end 0)
+                                              nil)))
                      (goto-char (point-min))
                      (while (re-search-forward drawer-re nil t)
                        (delete-region



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]