Skip to content

Commit de67ef4

Browse files
committed
emacs: setup archive for org-mode
1 parent 3c78feb commit de67ef4

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

emacs/init.el

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,15 @@
509509
(setq org-directory "~/org"
510510
org-default-notes-file (concat org-directory "/notes.org"))
511511

512+
;; set the archive
513+
(setq org-archive-location "~/org/archive/%s_archive::datetree/** Archived")
514+
(setq org-agenda-custom-commands
515+
'(("Q" . "Custom queries") ;; gives label to "Q"
516+
("Qa" "Archive search" search ""
517+
((org-agenda-files (file-expand-wildcards "~/org/archive/*.org_archive"))))
518+
;; ...other commands here
519+
))
520+
512521
;; highlight code blocks syntax
513522
(setq org-src-fontify-natively t
514523
org-src-tab-acts-natively t)
@@ -1949,7 +1958,7 @@
19491958
Browse Search Social Post │ Internet │
19501959
╭───────────────────────────────────────────────────────────────────┴──────────╯
19511960
[_w_] eww [_g_] google [_f_] elfeed [_i_] imgur
1952-
^ ^ [_m_] google maps [_t_] twitter
1961+
[_u_] url [_m_] google maps [_t_] twitter
19531962
^ ^ [_s_] surfraw [_x_] stack overflow
19541963
--------------------------------------------------------------------------------
19551964
"
@@ -1960,6 +1969,7 @@
19601969
("s" helm-surfraw)
19611970
("t" twit)
19621971
("w" eww)
1972+
("u" browse-url-at-point)
19631973
("x" sx-tab-newest))
19641974

19651975
(defhydra hydra-jump (:color blue :hint nil :idle 0.4 :inherit (hydra-common/heads))
@@ -2235,8 +2245,9 @@
22352245
╭───────────────────────────────────────────────────────────────┴──────────────╯
22362246
[_a_] agenda [_c_] capture [_m_] mail [_x_] speed type
22372247
[_l_] agenda list [_p_] pomodoro [_t_] contacts
2238-
[_d_] calendar [_s_] search headings
2248+
[_d_] calendar [_s_] search headings [_h_] add location
22392249
^ ^ [_g_] open location gmaps
2250+
^ ^ [_f_] archive subtree
22402251
--------------------------------------------------------------------------------
22412252
"
22422253
("a" org-agenda)
@@ -2245,6 +2256,7 @@
22452256
("g" org-location-google-maps)
22462257
("h" org-address-google-geocode-set)
22472258
("l" org-agenda-list)
2259+
("f" org-archive-subtree)
22482260
("m" mu4e)
22492261
("p" org-pomodoro)
22502262
("s" helm-org-agenda-files-headings)

emacs/readme.org

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,15 @@ Settings for the Emacs Web Browser.
612612
(setq org-directory "~/org"
613613
org-default-notes-file (concat org-directory "/notes.org"))
614614

615+
;; set the archive
616+
(setq org-archive-location "~/org/archive/%s_archive::datetree/** Archived")
617+
(setq org-agenda-custom-commands
618+
'(("Q" . "Custom queries") ;; gives label to "Q"
619+
("Qa" "Archive search" search ""
620+
((org-agenda-files (file-expand-wildcards "~/org/archive/*.org_archive"))))
621+
;; ...other commands here
622+
))
623+
615624
;; highlight code blocks syntax
616625
(setq org-src-fontify-natively t
617626
org-src-tab-acts-natively t)
@@ -2224,7 +2233,7 @@ that way.
22242233
Browse Search Social Post │ Internet │
22252234
╭───────────────────────────────────────────────────────────────────┴──────────╯
22262235
[_w_] eww [_g_] google [_f_] elfeed [_i_] imgur
2227-
^ ^ [_m_] google maps [_t_] twitter
2236+
[_u_] url [_m_] google maps [_t_] twitter
22282237
^ ^ [_s_] surfraw [_x_] stack overflow
22292238
--------------------------------------------------------------------------------
22302239
"
@@ -2235,6 +2244,7 @@ that way.
22352244
("s" helm-surfraw)
22362245
("t" twit)
22372246
("w" eww)
2247+
("u" browse-url-at-point)
22382248
("x" sx-tab-newest))
22392249

22402250
(defhydra hydra-jump (:color blue :hint nil :idle 0.4 :inherit (hydra-common/heads))
@@ -2510,8 +2520,9 @@ that way.
25102520
╭───────────────────────────────────────────────────────────────┴──────────────╯
25112521
[_a_] agenda [_c_] capture [_m_] mail [_x_] speed type
25122522
[_l_] agenda list [_p_] pomodoro [_t_] contacts
2513-
[_d_] calendar [_s_] search headings
2523+
[_d_] calendar [_s_] search headings [_h_] add location
25142524
^ ^ [_g_] open location gmaps
2525+
^ ^ [_f_] archive subtree
25152526
--------------------------------------------------------------------------------
25162527
"
25172528
("a" org-agenda)
@@ -2520,6 +2531,7 @@ that way.
25202531
("g" org-location-google-maps)
25212532
("h" org-address-google-geocode-set)
25222533
("l" org-agenda-list)
2534+
("f" org-archive-subtree)
25232535
("m" mu4e)
25242536
("p" org-pomodoro)
25252537
("s" helm-org-agenda-files-headings)

0 commit comments

Comments
 (0)