* [PATCH] org-agenda-add-entry-text
@ 2009-03-08 15:28 Christopher Suckling
2009-03-08 15:53 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Suckling @ 2009-03-08 15:28 UTC (permalink / raw)
To: org-mode mailing list
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] org-agenda-add-entry-text
2009-03-08 15:28 [PATCH] org-agenda-add-entry-text Christopher Suckling
@ 2009-03-08 15:53 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-03-08 15:53 UTC (permalink / raw)
To: Christopher Suckling; +Cc: org-mode mailing list
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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-08 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-08 15:28 [PATCH] org-agenda-add-entry-text Christopher Suckling
2009-03-08 15:53 ` Carsten Dominik
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.