1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-27 10:55:04 +00:00

Remove remember support

* org-protocol.el:
* org-bibtex.el: Remove remember support.

* org-clock.el (org-clock-heading-for-remember): Delete.
(org-clock-in): Do not set the heading for remember.

Users are encouraged to migrate their remember templates to
`org-capture-templates' instead of `org-remember-templates'.
See `org-capture-import-remember-templates' on how to ease
the transition.
This commit is contained in:
Bastien Guerry 2013-02-22 11:44:29 +01:00
parent 6c788fe738
commit 65399674d5
3 changed files with 13 additions and 46 deletions

View File

@ -5,7 +5,7 @@
;; Authors: Bastien Guerry <bzg at altern dot org>
;; Carsten Dominik <carsten dot dominik at gmail dot com>
;; Eric Schulte <schulte dot eric at gmail dot com>
;; Keywords: org, wp, remember
;; Keywords: org, wp, capture
;;
;; This file is part of GNU Emacs.
;;
@ -31,7 +31,7 @@
;; the link that contains the author name, the year and a short title.
;;
;; It also stores detailed information about the entry so that
;; remember templates can access and enter this information easily.
;; capture templates can access and enter this information easily.
;;
;; The available properties for each entry are listed here:
;;
@ -41,14 +41,14 @@
;; :booktitle :month :annote :abstract
;; :key :btype
;;
;; Here is an example of a remember template that use some of this
;; Here is an example of a capture template that use some of this
;; information (:author :year :title :journal :pages):
;;
;; (setq org-remember-templates
;; (setq org-capure-templates
;; '((?b "* READ %?\n\n%a\n\n%:author (%:year): %:title\n \
;; In %:journal, %:pages.")))
;;
;; Let's say you want to remember this BibTeX entry:
;; Let's say you want to capture this BibTeX entry:
;;
;; @Article{dolev83,
;; author = {Danny Dolev and Andrew C. Yao},
@ -61,7 +61,7 @@
;; month = {Mars}
;; }
;;
;; M-x `org-remember' on this entry will produce this buffer:
;; M-x `org-capture' on this entry will produce this buffer:
;;
;; =====================================================================
;; * READ <== [point here]
@ -94,7 +94,7 @@
;;
;; The link creation part has been part of Org-mode for a long time.
;;
;; Creating better remember template information was inspired by a request
;; Creating better capture template information was inspired by a request
;; of Austin Frank: http://article.gmane.org/gmane.emacs.orgmode/4112
;; and then implemented by Bastien Guerry.
;;

View File

@ -434,7 +434,6 @@ to add an effort property.")
(defvar org-clock-mode-line-timer nil)
(defvar org-clock-idle-timer nil)
(defvar org-clock-heading) ; defined in org.el
(defvar org-clock-heading-for-remember "")
(defvar org-clock-start-time "")
(defvar org-clock-leftover-time nil
@ -1202,11 +1201,6 @@ make this the default behavior.)"
org-clock-in-switch-to-state
"\\>"))))
(org-todo org-clock-in-switch-to-state)))
(setq org-clock-heading-for-remember
(and (looking-at org-complex-heading-regexp)
(match-end 4)
(org-trim (buffer-substring (match-end 1)
(match-end 4)))))
(setq org-clock-heading
(cond ((and org-clock-heading-function
(functionp org-clock-heading-function))

View File

@ -91,11 +91,6 @@
;; Org-link of which the page title will be the description part. If text
;; was select in the browser, that text will be the body of the entry.
;;
;; * Call `org-protocol-remember' by using the sub-protocol \"remember\".
;; This is provided for backward compatibility.
;; You may read `org-capture' as `org-remember' throughout this file if
;; you still use `org-remember'.
;;
;; You may use the same bookmark URL for all those standard handlers and just
;; adjust the sub-protocol used:
;;
@ -155,8 +150,7 @@ for `org-protocol-the-protocol' and sub-protocols defined in
;;; Variables:
(defconst org-protocol-protocol-alist-default
'(("org-remember" :protocol "remember" :function org-protocol-remember :kill-client t)
("org-capture" :protocol "capture" :function org-protocol-capture :kill-client t)
'(("org-capture" :protocol "capture" :function org-protocol-capture :kill-client t)
("org-store-link" :protocol "store-link" :function org-protocol-store-link)
("org-open-source" :protocol "open-source" :function org-protocol-open-source))
"Default protocols to use.
@ -391,24 +385,6 @@ The sub-protocol used to reach this function is set in
uri))
nil)
(defun org-protocol-remember (info)
"Process an org-protocol://remember:// style url.
The location for a browser's bookmark has to look like this:
javascript:location.href='org-protocol://remember://'+ \\
encodeURIComponent(location.href)+'/' \\
encodeURIComponent(document.title)+'/'+ \\
encodeURIComponent(window.getSelection())
See the docs for `org-protocol-capture' for more information."
(if (and (boundp 'org-stored-links)
(fboundp 'org-capture)
(org-protocol-do-capture info 'org-remember))
(message "Item remembered."))
nil)
(defun org-protocol-capture (info)
"Process an org-protocol://capture:// style url.
@ -431,14 +407,12 @@ But you may prepend the encoded URL with a character and a slash like so:
Now template ?b will be used."
(if (and (boundp 'org-stored-links)
(fboundp 'org-capture)
(org-protocol-do-capture info 'org-capture))
(org-protocol-do-capture info))
(message "Item captured."))
nil)
(defun org-protocol-do-capture (info capture-func)
"Support `org-capture' and `org-remember' alike.
CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
(defun org-protocol-do-capture (info)
"Support `org-capture'."
(let* ((parts (org-protocol-split-data info t org-protocol-data-separator))
(template (or (and (>= 2 (length (car parts))) (pop parts))
org-protocol-default-template-key))
@ -449,8 +423,7 @@ CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
(region (or (caddr parts) ""))
(orglink (org-make-link-string
url (if (string-match "[^[:space:]]" title) title url)))
(org-capture-link-is-already-stored t) ;; avoid call to org-store-link
remember-annotation-functions)
(org-capture-link-is-already-stored t)) ;; avoid call to org-store-link
(setq org-stored-links
(cons (list url title) org-stored-links))
(kill-new orglink)
@ -460,7 +433,7 @@ CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
:annotation orglink
:initial region)
(raise-frame)
(funcall capture-func nil template)))
(funcall 'org-capture nil template)))
(defun org-protocol-open-source (fname)
"Process an org-protocol://open-source:// style url.