annotate lisp/textmodes/remember.el @ 85810:0ab0355c4c17

(msb-unload-hook): Remove function and variable. (msb-unload-function): New-style unload function, adapted from `msb-unload-hook'.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 31 Oct 2007 00:30:09 +0000
parents 2a9d361b3986
children 70f347d257ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
85772
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
1 ;;; remember --- a mode for quickly jotting down things to remember
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
2
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
4 ;; 2007 Free Software Foundation, Inc.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
5
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
6 ;; Author: John Wiegley <johnw@gnu.org>
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
7 ;; Created: 29 Mar 1999
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
8 ;; Version: 1.9
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
9 ;; Keywords: data memory todo pim
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
10 ;; URL: http://gna.org/projects/remember-el/
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
11
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
13
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
16 ;; the Free Software Foundation; either version 3, or (at your option)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
17 ;; any later version.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
18
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
22 ;; GNU General Public License for more details.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
23
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
27 ;; Boston, MA 02110-1301, USA.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
28
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
29 ;;; Commentary:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
30
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
31 ;; The idea
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
32 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
33 ;; Todo lists, schedules, phone databases... everything we use
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
34 ;; databases for is really just a way to extend the power of our
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
35 ;; memory. To be able to remember what our conscious mind may not
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
36 ;; currently have access to.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
37 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
38 ;; There are many different databases out there -- and good ones --
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
39 ;; which this mode is not trying to replace. Rather, it's how that
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
40 ;; data gets there that's the question. Most of the time, we just
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
41 ;; want to say "Remember so-and-so's phone number, or that I have to
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
42 ;; buy dinner for the cats tonight." That's the FACT. How it's
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
43 ;; stored is really the computer's problem. But at this point in
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
44 ;; time, it's most definitely also the user's problem, and sometimes
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
45 ;; so laboriously so that people just let data slip, rather than
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
46 ;; expend the effort to record it.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
47 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
48 ;; "Remember" is a mode for remembering data. It uses whatever
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
49 ;; back-end is appropriate to record and correlate the data, but it's
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
50 ;; main intention is to allow you to express as _little_ structure as
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
51 ;; possible up front. If you later want to express more powerful
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
52 ;; relationships between your data, or state assumptions that were at
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
53 ;; first too implicit to be recognized, you can "study" the data later
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
54 ;; and rearrange it. But the initial "just remember this" impulse
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
55 ;; should be as close to simply throwing the data at Emacs as
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
56 ;; possible.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
57 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
58 ;; Implementation
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
59 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
60 ;; Hyperbole, as a data presentation tool, always struck me as being
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
61 ;; very powerful, but it seemed to require a lot of "front-end" work
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
62 ;; before that data was really available. The problem with BBDB, or
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
63 ;; keeping up a Bibl-mode file, is that you have to use different
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
64 ;; functions to record the data, and it always takes time to stop what
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
65 ;; you're doing, format the data in the manner expected by that
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
66 ;; particular data interface, and then resume your work.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
67 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
68 ;; With "remember", you just hit `M-x remember' (you'd probably want
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
69 ;; to bind this to an easily accessible keystroke, like C-x M-r), slam
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
70 ;; in your text however you like, and then hit C-c C-c. It will file
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
71 ;; the data away for later retrieval, and possibly indexing.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
72 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
73 ;; Indexing is to data what "studying" is in the real world. What you
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
74 ;; do when you study (or lucubrate, for some of us) is to realize
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
75 ;; certain relationships implicit in the data, so that you can make
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
76 ;; use of those relationships. Expressing that a certain quote you
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
77 ;; remembered was a religious quote, and that you want the ability to
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
78 ;; pull up all quotes of a religious nature, is what studying does.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
79 ;; This is a more labor intensive task than the original remembering
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
80 ;; of the data, and it's typical in real life to set aside a special
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
81 ;; period of time for doing this work.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
82 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
83 ;; "Remember" works in the same way. When you enter data, either by
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
84 ;; typing it into a buffer, or using the contents of the selected
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
85 ;; region, it will store that data -- unindexed, uninterpreted -- in a
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
86 ;; data pool. It will also try to remember as much context
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
87 ;; information as possible (any text properties that were set, where
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
88 ;; you copied it from, when, how, etc). Later, you can walk through
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
89 ;; your accumulated set of data (both organized, and unorganized) and
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
90 ;; easily begin moving things around, and making annotations that will
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
91 ;; express the full meaning of that data, as far as you know it.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
92 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
93 ;; Obviously this latter stage is more user-interface intensive, and
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
94 ;; it would be nice if "remember" could do it as elegantly as
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
95 ;; possible, rather than requiring a billion keystrokes to reorganize
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
96 ;; your hierarchy. Well, as the future arrives, hopefully experience
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
97 ;; and user feedback will help to make this as intuitive a tool as
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
98 ;; possible.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
99 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
100 ;; Future Goals
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
101 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
102 ;; This tool hopes to track (and by doing it with as little new code
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
103 ;; as possible):
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
104 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
105 ;; - The raw data that gets entered
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
106 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
107 ;; - The relationships between that data (either determined
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
108 ;; implicitly by parsing the input, or explicitly by the user's
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
109 ;; studying the data).
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
110 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
111 ;; - Revisioning of the data
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
112 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
113 ;; - Where it came from, and any context information that can be
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
114 ;; programmatically determined.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
115 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
116 ;; - Allowing particular views of the initially amorphous data pool
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
117 ;; (ala the Xanadu concept).
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
118 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
119 ;; - Storage of the data in a manner most appopriate to that data,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
120 ;; such as keeping address-book type information in BBDB, etc.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
121 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
122 ;; Using "remember"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
123 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
124 ;; As a rough beginning, what I do is to keep my .notes file in
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
125 ;; outline-mode format, with a final entry called "* Raw data". Then,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
126 ;; at intervals, I can move the data that gets appended there into
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
127 ;; other places. But certainly this should evolve into an intuitive
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
128 ;; mechanism for shuffling data off to its appropriate corner of the
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
129 ;; universe.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
130 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
131 ;; Mapping the remember functions to very accessible keystrokes
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
132 ;; facilities using the mode:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
133 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
134 ;; (autoload 'remember "remember" nil t)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
135 ;; (autoload 'remember-region "remember" nil t)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
136 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
137 ;; (define-key global-map [f8] 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
138 ;; (define-key global-map [f9] 'remember-region)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
139 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
140 ;; planner.el users should use `remember-to-planner' instead of `remember'
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
141 ;; to save more context information.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
142 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
143 ;; Feedback
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
144 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
145 ;; If Emacs could become a more intelligent data store, where
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
146 ;; brainstorming would focus on the IDEAS involved -- rather than the
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
147 ;; structuring and format of those ideas, or having to stop your
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
148 ;; current flow of work in order to record them -- it would map much
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
149 ;; more closely to how the mind (well, at least mine) works, and hence
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
150 ;; would eliminate that very manual-ness which computers from the very
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
151 ;; beginning have been championed as being able to reduce.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
152 ;;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
153 ;; Have you ever noticed that having a laptop to write on doesn't
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
154 ;; _actually_ increase the amount of quality material that you turn
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
155 ;; out, in the long run? Perhaps its because the time we save
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
156 ;; electronically in one way, we're losing electronically in another;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
157 ;; the tool should never dominate one's focus. As the mystic
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
158 ;; Faridu'd-Din `Attar wrote: "Be occupied as little as possible with
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
159 ;; things of the outer world but much with things of the inner world;
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
160 ;; then right action will overcome inaction."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
161
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
162 ;;; History:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
163
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
164 ;;; Code:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
165
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
166 (provide 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
167
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
168 (defconst remember-version "1.9"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
169 "This version of remember.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
170
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
171 (defgroup remember nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
172 "A mode to remember information."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
173 :group 'data)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
174
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
175 ;;; User Variables:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
176
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
177 (defcustom remember-mode-hook nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
178 "Functions run upon entering `remember-mode'."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
179 :type 'hook
85798
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
180 :options '(flyspell-mode turn-on-auto-fill org-remember-apply-template)
85772
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
181 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
182
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
183 (defcustom remember-in-new-frame nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
184 "Non-nil means use a separate frame for capturing remember data."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
185 :type 'boolean
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
186 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
187
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
188 (defcustom remember-register ?R
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
189 "The register in which the window configuration is stored."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
190 :type 'character
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
191 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
192
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
193 (defcustom remember-filter-functions nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
194 "*Functions run to filter remember data.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
195 All functions are run in the remember buffer."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
196 :type 'hook
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
197 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
198
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
199 (defcustom remember-handler-functions '(remember-append-to-file)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
200 "*Functions run to process remember data.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
201 Each function is called with the current buffer narrowed to what the
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
202 user wants remembered.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
203 If any function returns non-nil, the data is assumed to have been
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
204 recorded somewhere by that function. "
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
205 :type 'hook
85798
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
206 :options '(remember-store-in-mailbox
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
207 remember-append-to-file
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
208 remember-diary-extract-entries
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
209 org-remember-handler)
85772
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
210 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
211
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
212 (defcustom remember-all-handler-functions nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
213 "If non-nil every function in `remember-handler-functions' is
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
214 called."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
215 :type 'boolean
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
216 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
217
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
218 ;;; Internal Variables:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
219
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
220 (defvar remember-buffer "*Remember*"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
221 "The name of the remember data entry buffer.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
222
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
223 (defcustom remember-save-after-remembering t
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
224 "*Non-nil means automatically save after remembering."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
225 :type 'boolean
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
226 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
227
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
228 ;;; User Functions:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
229
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
230 ;; People with planner.el can set this to planner-annotation-functions:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
231 ;; (defvaralias 'remember-annotation-functions 'planner-annotation-functions)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
232 ;; or (defalias 'remember-annotation-functions 'planner-annotation-functions)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
233 (defcustom remember-annotation-functions
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
234 (if (boundp 'planner-annotation-functions)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
235 planner-annotation-functions
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
236 '(buffer-file-name))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
237 "Hook that returns an annotation to be inserted into the remember buffer.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
238 If you have planner.el, it's nice to set this to
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
239 `planner-annotation-functions'."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
240 :type 'hook
85798
5810ee84e0f9 remember.el: Add additional items to some defcustom options
Michael Olson <mwolson@gnu.org>
parents: 85772
diff changeset
241 :options '(org-remember-annotation buffer-file-name)
85772
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
242 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
243
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
244 (defvar remember-annotation nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
245 "Current annotation.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
246 (defvar remember-initial-contents nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
247 "Initial contents to place into *Remember* buffer.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
248 (defvar remember-before-remember-hook nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
249 "Functions run before switching to the *Remember* buffer.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
250
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
251 (defcustom remember-run-all-annotation-functions-flag nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
252 "Non-nil means use all annotations returned by
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
253 `remember-annotation-functions'."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
254 :type 'boolean
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
255 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
256
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
257 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
258 (defun remember (&optional initial)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
259 "Remember an arbitrary piece of data.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
260 With a prefix, uses the region as INITIAL."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
261 (interactive
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
262 (list (when current-prefix-arg
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
263 (buffer-substring (point) (mark)))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
264 (funcall (if remember-in-new-frame
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
265 #'frame-configuration-to-register
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
266 #'window-configuration-to-register) remember-register)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
267 (let* ((annotation
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
268 (if remember-run-all-annotation-functions-flag
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
269 (mapconcat 'identity
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
270 (delq nil
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
271 (mapcar 'funcall remember-annotation-functions))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
272 "\n")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
273 (run-hook-with-args-until-success
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
274 'remember-annotation-functions)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
275 (buf (get-buffer-create remember-buffer)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
276 (run-hooks 'remember-before-remember-hook)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
277 (funcall (if remember-in-new-frame
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
278 #'switch-to-buffer-other-frame
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
279 #'switch-to-buffer-other-window) buf)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
280 (if remember-in-new-frame
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
281 (set-window-dedicated-p
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
282 (get-buffer-window (current-buffer) (selected-frame)) t))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
283 (remember-mode)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
284 (when (= (point-max) (point-min))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
285 (when initial (insert initial))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
286 (setq remember-annotation annotation)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
287 (when remember-initial-contents (insert remember-initial-contents))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
288 (when (and (stringp annotation)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
289 (not (equal annotation "")))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
290 (insert "\n\n" annotation))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
291 (setq remember-initial-contents nil)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
292 (goto-char (point-min)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
293 (message "Use C-c C-c to remember the data.")))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
294
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
295 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
296 (defun remember-other-frame (&optional initial)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
297 "Call `remember' in another frame."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
298 (interactive
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
299 (list (when current-prefix-arg
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
300 (buffer-substring (point) (mark)))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
301 (let ((remember-in-new-frame t))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
302 (remember initial)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
303
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
304 (defsubst remember-time-to-seconds (time)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
305 "Convert TIME to a floating point number."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
306 (+ (* (car time) 65536.0)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
307 (cadr time)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
308 (/ (or (car (cdr (cdr time))) 0) 1000000.0)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
309
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
310 (defsubst remember-mail-date (&optional rfc822-p)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
311 "Return a simple date. Nothing fancy."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
312 (if rfc822-p
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
313 (format-time-string "%a, %e %b %Y %T %z" (current-time))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
314 (format-time-string "%c" (current-time))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
315
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
316 (defun remember-buffer-desc ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
317 "Using the first line of the current buffer, create a short description."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
318 (buffer-substring (point-min)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
319 (save-excursion
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
320 (goto-char (point-min))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
321 (end-of-line)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
322 (if (> (- (point) (point-min)) 60)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
323 (goto-char (+ (point-min) 60)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
324 (point))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
325
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
326 ;; Remembering to UNIX mailboxes
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
327
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
328 (defcustom remember-mailbox "~/Mail/remember"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
329 "*The file in which to store remember data as mail."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
330 :type 'file
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
331 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
332
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
333 (defcustom remember-default-priority "medium"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
334 "*The default priority for remembered mail messages."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
335 :type 'string
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
336 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
337
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
338 (defun remember-store-in-mailbox ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
339 "Store remember data as if it were incoming mail.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
340 In which case `remember-mailbox' should be the name of the mailbox.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
341 Each piece of psuedo-mail created will have an `X-Todo-Priority'
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
342 field, for the purpose of appropriate splitting."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
343 (let ((who (read-string "Who is this item related to? "))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
344 (moment
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
345 (format "%.0f" (remember-time-to-seconds (current-time))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
346 (desc (remember-buffer-desc))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
347 (text (buffer-string)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
348 (with-temp-buffer
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
349 (insert (format "
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
350 From %s %s
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
351 Date: %s
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
352 From: %s
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
353 Message-Id: <remember-%s@%s>
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
354 X-Todo-Priority: %s
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
355 To: %s <%s>
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
356 Subject: %s\n\n"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
357 (user-login-name)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
358 (remember-mail-date)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
359 (remember-mail-date t)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
360 who
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
361 moment (system-name)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
362 remember-default-priority
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
363 (user-full-name) user-mail-address
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
364 desc))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
365 (let ((here (point)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
366 (insert text)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
367 (unless (bolp)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
368 (insert "\n"))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
369 (insert "\n")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
370 (goto-char here)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
371 (while (re-search-forward "^\\(From[: ]\\)" nil t)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
372 (replace-match ">\\1")))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
373 (append-to-file (point-min) (point-max) remember-mailbox)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
374 t)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
375
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
376 ;; Remembering to plain files
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
377
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
378 (defcustom remember-data-file "~/.notes"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
379 "*The file in which to store unprocessed data."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
380 :type 'file
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
381 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
382
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
383 (defcustom remember-leader-text "** "
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
384 "*The text used to begin each remember item."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
385 :type 'string
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
386 :group 'remember)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
387
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
388 (defun remember-append-to-file ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
389 "Remember, with description DESC, the given TEXT."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
390 (let ((text (buffer-string))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
391 (desc (remember-buffer-desc)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
392 (with-temp-buffer
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
393 (insert "\n" remember-leader-text (current-time-string)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
394 " (" desc ")\n\n" text)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
395 (if (not (bolp))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
396 (insert "\n"))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
397 (if (find-buffer-visiting remember-data-file)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
398 (let ((remember-text (buffer-string)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
399 (set-buffer (get-file-buffer remember-data-file))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
400 (save-excursion
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
401 (goto-char (point-max))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
402 (insert remember-text)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
403 (when remember-save-after-remembering (save-buffer))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
404 (append-to-file (point-min) (point-max) remember-data-file)))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
405
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
406 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
407 (defun remember-region (&optional beg end)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
408 "Remember the data from BEG to END.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
409 If called from within the remember buffer, BEG and END are ignored,
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
410 and the entire buffer will be remembered.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
411
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
412 This function is meant to be called from the *Remember* buffer.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
413 If you want to remember a region, supply a universal prefix to
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
414 `remember' instead. For example: C-u M-x remember."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
415 ;; Sacha: I have no idea where remember.el gets this context information, but
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
416 ;; you can just use remember-annotation-functions.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
417 (interactive)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
418 (let ((b (or beg (min (point) (or (mark) (point-min)))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
419 (e (or end (max (point) (or (mark) (point-max))))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
420 (save-restriction
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
421 (narrow-to-region b e)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
422 (if remember-all-handler-functions
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
423 (run-hooks 'remember-handler-functions)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
424 (run-hook-with-args-until-success 'remember-handler-functions))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
425 (remember-destroy))))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
426
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
427 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
428 (defun remember-clipboard ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
429 "Remember the contents of the current clipboard.
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
430 Most useful for remembering things from Netscape or other X Windows
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
431 application."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
432 (interactive)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
433 (remember (current-kill 0)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
434
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
435 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
436 (defun remember-buffer ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
437 "Remember the contents of the current buffer."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
438 (interactive)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
439 (remember-region (point-min) (point-max)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
440
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
441 ;;;###autoload
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
442 (defun remember-destroy ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
443 "Destroy the current *Remember* buffer."
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
444 (interactive)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
445 (when (equal remember-buffer (buffer-name))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
446 (kill-buffer (current-buffer))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
447 (jump-to-register remember-register)))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
448
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
449 ;;; Internal Functions:
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
450
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
451 (defvar remember-mode-map ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
452 "Keymap used in Remember mode.")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
453 (when (not remember-mode-map)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
454 (setq remember-mode-map (make-sparse-keymap))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
455 (define-key remember-mode-map "\C-x\C-s" 'remember-buffer)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
456 (define-key remember-mode-map "\C-c\C-c" 'remember-buffer)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
457 (define-key remember-mode-map "\C-c\C-k" 'remember-destroy))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
458
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
459 (defun remember-mode ()
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
460 "Major mode for output from \\[remember].
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
461 \\<remember-mode-map>This buffer is used to collect data that you want
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
462 remember. Just hit \\[remember-region] when you're done entering, and
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
463 it will go ahead and file the data for latter retrieval, and possible
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
464 indexing. \\{remember-mode-map}"
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
465 (interactive)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
466 (kill-all-local-variables)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
467 (indented-text-mode)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
468 (use-local-map remember-mode-map)
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
469 (setq major-mode 'remember-mode
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
470 mode-name "Remember")
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
471 (run-hooks 'remember-mode-hook))
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
472
85806
2a9d361b3986 Add arch tagline
Miles Bader <miles@gnu.org>
parents: 85798
diff changeset
473 ;; arch-tag: 59312a05-06c7-4da1-b6f7-5ea41c9d5577
85772
6b9c41aaadf8 Check in Remember Mode
Michael Olson <mwolson@gnu.org>
parents:
diff changeset
474 ;;; remember.el ends here