aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-05-04 16:55:57 -0700
committerGlenn Morris2013-05-04 16:55:57 -0700
commitfd3a9a6b378e556c3b09b217920d95cb129a13d6 (patch)
treef3000825ceeab99e8145e4e23d7b5f359b91c390
parentf4c7b20fc11370d032a915d67e3ad4150b162a10 (diff)
downloademacs-fd3a9a6b378e556c3b09b217920d95cb129a13d6.tar.gz
emacs-fd3a9a6b378e556c3b09b217920d95cb129a13d6.zip
* lisp/calendar/diary-lib.el (diary-from-outlook-function): New variable.
(diary-from-outlook): Respect diary-from-outlook-function. * doc/emacs/calendar.texi (Importing Diary): Mention diary-from-outlook-function. * etc/NEWS: Mention this.
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/calendar.texi3
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/diary-lib.el17
5 files changed, 30 insertions, 5 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 90e31b9923e..2c47bdd4fad 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12013-05-04 Glenn Morris <rgm@gnu.org>
2
3 * calendar.texi (Importing Diary): Mention diary-from-outlook-function.
4
12013-03-17 Paul Eggert <eggert@cs.ucla.edu> 52013-03-17 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 doc: convert some TeX accents to UTF-8 7 doc: convert some TeX accents to UTF-8
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 52b966b76e1..075d753ae7a 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -1542,7 +1542,8 @@ variety of other formats.
1542messages. While viewing such a message in Rmail or Gnus, do @kbd{M-x 1542messages. While viewing such a message in Rmail or Gnus, do @kbd{M-x
1543diary-from-outlook} to import the entry. You can make this command 1543diary-from-outlook} to import the entry. You can make this command
1544recognize additional appointment message formats by customizing the 1544recognize additional appointment message formats by customizing the
1545variable @code{diary-outlook-formats}. 1545variable @code{diary-outlook-formats}. Other mail clients can set
1546@code{diary-from-outlook-function} to an appropriate value.
1546 1547
1547@c FIXME the name of the RFC is hardly very relevant. 1548@c FIXME the name of the RFC is hardly very relevant.
1548@cindex iCalendar support 1549@cindex iCalendar support
diff --git a/etc/NEWS b/etc/NEWS
index 0a8cf2c0325..4669021c472 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -146,6 +146,12 @@ The default separator is changed to allow surrounding spaces around the comma.
146 146
147*** Battery information via the BSD `apm' utility is now supported. 147*** Battery information via the BSD `apm' utility is now supported.
148 148
149** Calendar and Diary
150
151+++
152*** New variable `diary-from-outlook-function' for used by the command
153`diary-from-outlook'.
154
149** cl-lib 155** cl-lib
150 156
151*** New macro cl-tagbody. 157*** New macro cl-tagbody.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88bc79ad707..8c0414f7cff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-05-04 Glenn Morris <rgm@gnu.org>
2
3 * calendar/diary-lib.el (diary-from-outlook-function): New variable.
4 (diary-from-outlook): Respect diary-from-outlook-function.
5
12013-05-04 Stefan Monnier <monnier@iro.umontreal.ca> 62013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * simple.el (read-expression-map): Use completion-at-point (bug#14255). 8 * simple.el (read-expression-map): Use completion-at-point (bug#14255).
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index f4aa26a0864..2cc381122b7 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -2611,14 +2611,23 @@ user is asked to confirm its addition."
2611 (diary-from-outlook-internal subject body) 2611 (diary-from-outlook-internal subject body)
2612 (message "Diary entry added")))))) 2612 (message "Diary entry added"))))))
2613 2613
2614(defvar diary-from-outlook-function nil
2615 "If non-nil, a function of one argument for `diary-from-outlook' to call.
2616If the current buffer contains an Outlook-style appointment message,
2617this function should extract it into a diary entry. If the argument is
2618nil, it should ask for confirmation before adding this entry to the diary.
2619For examples, see `diary-from-outlook-rmail' and `diary-from-outlook-gnus'.")
2620
2614(defun diary-from-outlook (&optional noconfirm) 2621(defun diary-from-outlook (&optional noconfirm)
2615 "Maybe snarf diary entry from current Outlook-generated message. 2622 "Maybe snarf diary entry from current Outlook-generated message.
2616Currently knows about Gnus and Rmail modes. Unless the optional 2623Uses `diary-from-outlook-function' if that is non-nil, else
2617argument NOCONFIRM is non-nil (which is the case when this 2624`diary-from-outlook-rmail' for Rmail or `diary-from-outlook-gnus' for Gnus.
2618function is called interactively), then if an entry is found the 2625Unless the optional argument NOCONFIRM is non-nil (which is the
2619user is asked to confirm its addition." 2626case when this function is called interactively), then if an
2627entry is found the user is asked to confirm its addition."
2620 (interactive "p") 2628 (interactive "p")
2621 (let ((func (cond 2629 (let ((func (cond
2630 (diary-from-outlook-function)
2622 ((eq major-mode 'rmail-mode) 2631 ((eq major-mode 'rmail-mode)
2623 #'diary-from-outlook-rmail) 2632 #'diary-from-outlook-rmail)
2624 ((memq major-mode '(gnus-summary-mode gnus-article-mode)) 2633 ((memq major-mode '(gnus-summary-mode gnus-article-mode))