forked from bastibe/org-journal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorg-journal.elc
executable file
·315 lines (243 loc) · 64.5 KB
/
org-journal.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
;ELC
;;; Compiled
;;; in Emacs version 29.1
;;; with all optimizations.
(byte-code "\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\310\311\"\203$ \312\313\314\"\210\315\316!\2044 \312\317\320\"\210\312\316\317\"\210\321\322\323\324\325\326\327\304\327\322& \207" [org-version require cal-iso epa org org-crypt seq subr-x version< "9.2" defalias org-set-tags-to org-set-tags fboundp org--tag-add-to-alist org-tag-add-to-alist #[514 "\211\204 \207\204 \207\300\301\"\302\211\203* \211@\211\242\235\204# \211B\262A\266\202\202 \210\303\"\207" [mapcar #[257 "\211\242\207" [] 2 "\n\n(fn X)"] nil append] 8 "Append ALIST1 elements to ALIST2 if they are not there yet.\n\nFrom branch \"emacs-26\", added for compatibility.\n\n(fn ALIST1 ALIST2)"] custom-declare-group org-journal nil "Settings for the personal journal" :version "1.15.1" :group] 10)
(custom-declare-face 'org-journal-highlight '((t (:foreground "#ff1493"))) "Face for highlighting org-journal buffers.")#@43 Highlight STR in current-buffer
(fn STR)
(defalias 'org-journal-highlight #[257 "eb\210\300\301\302#\205 \303\304\224\304\225\305\306$\210\202 \207" [search-forward nil t put-text-property 0 font-lock-face org-journal-highlight] 6 (#$ . 1022)])
(custom-declare-face 'org-journal-calendar-entry-face '((t (:foreground "#aa0000" :slant italic))) "Face for highlighting org-journal entries in M-x calendar.")
(custom-declare-face 'org-journal-calendar-scheduled-face '((t (:foreground "#600000" :slant italic))) "Face for highlighting future org-journal entries in M-x calendar.")
(byte-code "\300\301\302\303\304DD\305\306\307%\210\300\310\302\303\311DD\312\306\313%\210\300\314\302\303\315DD\316\306\317\320\321&\210\300\322\302\303\323DD\324\306\325%\210\300\326\302\303\327DD\330\306\331%\210\300\332\302\303\333DD\334\306\325%\210\300\335\302\303\336DD\337\306\325%\210\300\340\302\303\341DD\342\306\325%\210\300\343\302\303\344DD\345\306\325%\210\300\346\302\303\347DD\350\306\325%\210\300\351\302\303\352DD\353\306\354%\210\300\355\302\303\356DD\357\306\354%\210\300\360\302\303\361DD\362\306\354%\210\300\363\302\303\364DD\365\306\303%\210\300\366\302\303\367DD\370\306\354%\210\300\371\302\303\372DD\373\306\303%\210\300\374\302\303\375DD\376\306\325%\210\300\377\302\303\201@ DD\201A \306\201B %\210\300\201C \302\303\201D DD\201E \306\354%\210\300\201F \302\303\201G DD\201H \306\303%\210\300\201I \302\303\201J DD\201K \306\201L %\210\300\201M \302\303\201N DD\201O \306\201P %\210\300\201Q \302\303\201R DD\201S \306\201T \201U N%\210\300\201V \302\303\201W DD\201X \306\201Y \201U N%\210\300\201Z \302\303\201[ DD\201\\ \306\303%\207" [custom-declare-variable org-journal-file-type funcall function #[0 "\300\207" [daily] 1 #1=""] "What type of journal file to create.\n\nWhen switching from daily to weekly, monthly, yearly, or from weekly,\nmonthly, yearly to daily, you need to invalidate the cache. This has currently\nto be done manually by calling `org-journal-invalidate-cache'." :type (choice (const :tag "Daily" daily) (const :tag "Weekly" weekly) (const :tag "Monthly" monthly) (const :tag "Yearly" yearly)) org-journal-start-on-weekday #[0 "\300\207" [1] 1 #1#] "What day of the week to start a weekly journal.\n\nWhen `org-journal-file-type' is set to \\='weekly, start the week on\nthis day. Default is Monday." (choice (const :tag "Sunday" 0) (const :tag "Monday" 1) (const :tag "Tuesday" 2) (const :tag "Wednesday" 3) (const :tag "Thursday" 4) (const :tag "Friday" 5) (const :tag "Saturday" 6)) org-journal-dir #[0 "\300\207" ["~/Documents/journal/"] 1 #1#] "Directory containing journal entries." directory :risky t org-journal-file-format #[0 "\300\207" ["%Y%m%d"] 1 #1#] "Format string for journal file names (Default \"YYYYMMDD\").\n\nThis pattern MUST include `%Y', `%m' and `%d' when `org-journal-file-type' is\n`daily' or `weekly'. When `org-journal-file-type' is `monthly' this pattern\nMUST at least include `%Y' and `%m', and at least `%Y' when\n`org-journalf-file-type' is `yearly'.\n\nCurrently supported placeholders are:\n\n%Y is the year as decimal number, including the century.\n%m is the month as a decimal number (range 01 to 12).\n%d is the day as a decimal number (range 01 to 31).\n%V is the ISO 8601 week number as a decimal number (range 01 to 53).\n%a is the locale’s abbreviated name of the day of week, %A the full name.\n%b is the locale's abbreviated name of the month, %B the full name.\n%F is the ISO 8601 date format (equivalent to \"%Y-%m-%d\")." string org-journal-date-format #[0 "\300\207" ["%A, %x"] 1 #1#] "Format string for date entries.\n\nBy default \"WEEKDAY, DATE\", where DATE is what Emacs thinks is an\nappropriate way to format days in your language.\nIf the value is a function, the function will be evaluated and the return\nvalue will be inserted." (choice (string :tag "String") (function :tag "Function")) org-journal-search-result-date-format #[0 "\300\207" ["%A, %x"] 1 #1#] "Date format string for search result.\n\nBy default \"WEEKDAY, DATE\", where DATE is what Emacs thinks is an\nappropriate way to format days in your language." org-journal-date-prefix #[0 "\300\207" ["* "] 1 #1#] "Prefix for `org-journal-date-format'.\n\nThe default prefix creates an `org-mode' heading. This default\nshould not be changed for weekly, monthly or yearly journal\nfiles. An alternative for daily journal files could be\n\"#+title: \" creating a title rather than a heading. To create\na \"#+title: \" for weekly, monthly or yearly (but also daily)\njournal files, customize `org-journal-file-header' instead." org-journal-time-format #[0 "\300\207" ["%R "] 1 #1#] "Format string for time entries.\n\nBy default HH:MM. Set it to a blank string if you want to disable timestamps." org-journal-time-format-post-midnight #[0 "\300\207" [#1#] 1 #1#] "When non-blank, a separate time format string for after midnight.\n\nWhen the current time is before the hour set by `org-extend-today-until'." org-journal-time-prefix #[0 "\300\207" ["** "] 1 #1#] "String that is put before every time entry in a journal file.\n\nBy default, this is an org-mode sub-heading." org-journal-hide-entries-p #[0 "\300\207" [t] 1 #1#] "If true, `org-journal-mode' will hide all but the current entry\nwhen creating a new one." boolean org-journal-enable-encryption #[0 "\300\207" [nil] 1 #1#] "If non-nil, new journal entries will have a `org-crypt-tag-matcher' tag\nfor encrypting.\n\nWhenever a user saves/opens these journal entries, emacs asks a user passphrase\nto encrypt/decrypt it." org-journal-encrypt-journal #[0 "\300\207" [nil] 1 #1#] "If non-nil, encrypt journal files using gpg.\n\nThe journal files will have the file extension \".gpg\"." org-journal-encrypt-on #[0 "\300\207" [before-save-hook] 1 #1#] "Hook on which to encrypt entries.\n\nIt can be set to other hooks like `kill-buffer-hook'." org-journal-enable-agenda-integration #[0 "\300\207" [nil] 1 #1#] "If non-nil, automatically adds current and future org-journal files\nto `org-agenda-files'." org-journal-find-file #[0 "\300\207" [find-file-other-window] 1 #1#] "The function to use when opening an entry.\n\nSet this to `find-file' if you don't want org-journal to split your window." org-journal-carryover-items #[0 "\300\207" ["TODO=\"TODO\""] 1 #1#] "Carry over items that match these criteria from the previous entry to\nnew entries.\n\nSee agenda tags view match description for the format of this." org-journal-skip-carryover-drawers #[0 "\300\207" [nil] 1 #1#] "By default, we carry over all the drawers associated with the items.\n\nThis option can be used to skip certain drawers being carried over.\nThe drawers listed here will be wiped completely, when the item gets\ncarried over." list org-journal-carryover-headings-only #[0 "\300\207" [nil] 1 #1#] "If non-nil, carry over only headings plus assosiated drawers available.\n\n--added by dks" org-journal-handle-old-carryover #[0 "\300\207" [org-journal--delete-old-carryover] 1 #1#] "The function to handle the carryover entries in the previous journal.\n\nThis function takes one argument, which is a list of the carryover entries\nin the journal of previous day.\nThe list is in form of ((START_POINT (END_POINT . \"TEXT\")) ...\n(START_POINT (END_POINT . \"TEXT\"))); and in ascending order of START_POINT.\n\nDefault is the function `org-journal--delete-old-carryover' to delete them all." org-journal-carryover-delete-empty-journal #[0 "\300\207" [never] 1 #1#] "Delete empty journal entry/file after carryover.\n\nDefault is to `never' delete an empty journal entry/file.\nOther options are `always',i.e. don't prompt, just delete or `ask'" (choice (const :tag "never" never) (const :tag "always" always) (const :tag "ask" ask)) org-journal-search-results-order-by #[0 "\300\207" [:asc] 1 #1#] "When :desc, make search results ordered by date descending,\notherwise date ascending." symbol org-journal-tag-alist #[0 "\300\207" [nil] 1 #1#] "Default tags for use in Org-Journal mode.\n\nThis is analogous to `org-tag-alist', and uses the same format.\nIf nil, the default, then `org-tag-alist' is used instead.\nThis can also be overridden on a file-local level by using a “#+TAGS:”\nkeyword." org-tag-alist custom-type org-journal-tag-persistent-alist #[0 "\300\207" [nil] 1 #1#] "Persistent tags for use in Org-Journal mode.\n\nThis is analogous to `org-tag-persistent-alist', and uses the same\nformat. If nil, the default, then `org-tag-persistent-alist' is used\ninstead. These tags cannot be overridden with a “#+TAGS:” keyword, but\nthey can be disabled per-file by adding the line “#+STARTUP: noptag”\nanywhere in your file." org-tag-persistent-alist org-journal-search-forward-fn #[0 "\300\207" [search-forward] 1 #1#] "The function used by `org-journal-search` to look for the string forward\nin a buffer.\n\nDefaults to search-forward.\nYou can, for example, set it to `search-forward-regexp` so the\nsearch works with regexps."] 8)
(byte-code "\300\301\302\303\304DD\305\306\307%\210\300\310\302\303\311DD\312\306\307%\210\300\313\302\303\314DD\315\306\316%\210\300\317\302\303\320DD\321\306\322%\210\300\323\302\303\324DD\325\306\322%\207" [custom-declare-variable org-journal-follow-mode funcall function #[0 "\300\207" [nil] 1 #1=""] "If `t', follow journal entry in calendar." :type boolean org-journal-enable-cache #[0 "\300\207" [nil] 1 #1#] "If `t', journal entry dates will be cached for faster calendar operations." org-journal-file-header #[0 "\300\207" [#1#] 1 #1#] "A string which should be inserted at the top of a new journal file.\n\nThe string will be passed to `format-time-string' along with the time\nof the new journal entry.\n\nThe value can also be a function expecting a time value." (choice (string :tag "String") (function :tag "Function")) org-journal-created-property-timestamp-format #[0 "\300\207" ["%Y%m%d"] 1 #1#] "The created property timestamp format-string.\n\nWe must be able to reconstruct the timestamp from year,\nmonth and day.\n\nCurrently supported placeholders are:\n\n%Y is the year as decimal number, including the century.\n%m is the month as a decimal number (range 01 to 12).\n%d is the day as a decimal number (range 01 to 31).\n%V is the ISO 8601 week number as a decimal number (range 01 to 53).\n%a is the locale’s abbreviated name of the day of week, %A the full name.\n%b is the locale's abbreviated name of the month, %B the full name.\n%F is the ISO 8601 date format (equivalent to \"%Y-%m-%d\").\n\nYou must call `org-journal-convert-created-property-timestamps' afterwards,\nif you have existing journal entries." string org-journal-prefix-key #[0 "\300\207" ["C-c C-"] 1 #1#] "The default prefix key inside `org-journal-mode'.\n\nThis variable needs to set before `org-journal' gets loaded.\nWhen this variable is set to an empty string or `nil' no bindings will\nbe made.\n\nThis prefix key is used for:\n - `org-journal-next-entry' (key \"f\")\n - `org-journal-previous-entry' (key \"b\")\n - `org-journal-new-entry' (key \"j\")\n - `org-journal-search' (key \"s\")"] 6)#@43 Hook called after journal entry creation.
(defvar org-journal-after-entry-create-hook nil (#$ . 12093))#@180 Hook called after journal header creation.
The header is the string described by `org-journal-date-format'.
This runs once per date, before `org-journal-after-entry-create-hook'.
(defvar org-journal-after-header-create-hook nil (#$ . 12203))
(defvar org-journal--search-buffer "*Org-journal search*")#@246 Will be set to \='t\=' if `org-journal-new-entry' function creates a new
journal(i.e., insert a date entry) for today or the given time.
When today's journal was created before and re-opened later,
this buffer-local variable remains to be nil.
(defvar org-journal--newly-created-p nil (#$ . 12510))
(byte-code "\300\301!\210\302\303\304\"\210\302\305\304\"\207" [make-variable-buffer-local org-journal--newly-created-p add-hook calendar-today-visible-hook org-journal-mark-entries calendar-today-invisible-hook] 3)
(defvar org-journal-mode-hook nil)
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [org-journal-mode-hook variable-documentation put "Hook run after entering Journal mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp org-journal-mode-map definition-name org-journal-mode] 4)
(defvar org-journal-mode-map (make-sparse-keymap))
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204* \303\307\310\311#\210\312\307\306\307!\203&