+++ /dev/null
-= <<< %menu%
-%last-update %"R"[Update Menu]
-
- Create: %"e"[Remember] %"c"[New] %"M"[Mtg] %"P"[Person] %"D"[Dup]
- Search: %"s"[String] %"g"[Regexp] %"o"[Occur] %"h"[History]
- List: %"a"[All] %"l"[Recent] %"A"[Around] %"w"[Random Walk]
- Dates: %"y"[Schedule] %"t"[Todo] %"."[Today] %":"[Yesterday]
- Buffers: %"b"[Buffers] %"x"[Marks] %"r"[Update] %"Q"[Killall]
- Copy: %"K"[<Title] %"k"[<Name]
- Insert: %"d"[Date>] %"i"[Key>]
- Settings: %"m"[Edit Menu] [Preference]
--------------------------------------------------------------------------------
-%here%(re/howm-menu-legend)
-%reminder
--------------------------------------------------------------------------------
-Inbox
-%here%(howm-menu-search "#inbox")
--------------------------------------------------------------------------------
-Open Projects
-%here%(howm-menu-search "#open")
--------------------------------------------------------------------------------
-Waiting
-%here%(howm-menu-search "]w")
--------------------------------------------------------------------------------
-
-= <<< %Editing Menu%
-[Edit Menu] Hit RET on the left button to edit this menu.
-[Update Menu] Hit RET on the left button to update this menu.
--------------------------------------------------------------
-
-Format of the menu file
-(Please hit RET on [Edit Menu] and read the source file.)
-
-== Basic format
-
-As you see...
-
-- [xxx] is button.
-- %REMINDER (in small letters) is schedule and todo list.
-- %RECENT (in small letters) is list of recent entries.
-- %RANDOM (in small letters) is list of random entries.
-
-You can arrange their places as you like.
-Writing favorite files or goto links may be also convenient.
-(ex) file:///etc/services >>> wiki
-
-== Shortcut
-
-%"foo"[All]
-This is displayed as foo[All], and the key "f" executes [All].
-Exactly speaking, it executes the following sequence:
-(1) move to closing ", (2) move to next underline, and (3) hit it.
-
-%"bar%"
-If you put % at the tail like this, the key "b" means "move cursor here".
-
-== For lispers
-
-Display:
-%here%howm-congrats-count ;; embed value of variable howm-congrats-count
-%here%(howm-menu-search "search")
-;; embed result of (...), that is, search "search" and embed matched lines
-Functions must be registered for safety.
-(setq howm-menu-allow (append '(foo bar) howm-menu-allow)) ;; allow foo, bar
-
-Action:
-%eval%(message (buffer-name)) ;; evaluate S expr
-%call%find-file ;; call function interactively
-Both are evaluated in the previous buffer before raising menu.
-
-== Hiding
-
-'%' + '|' toggles invisibility
-like this: visible%|invisible%|appear%|disappear - until the end of line
-(Newline is removed when the end of line is invisible.)
-
-== Multiple menus
-
-Links to %xxx% open "<< < %xxx%" with menu-mode: >>> %menu%
-When you add new menu, [[%menu%]] may be more convenient because corresponding
-entry is generated automatically.
-
-%eval%(howm-menu-open "00000000-000000.txt") -- open file with menu-mode
start end
"pandoc -f org -t markdown --wrap=preserve" t t))
#+END_SRC
-** HOWM
-On-again, off-again relationship with this one
-*** Load package and add bindings
-#+BEGIN_SRC emacs-lisp
-(use-package howm
- :bind
- (("<f6>" . howm-menu)
- ("S-<f6>" . re/howm-menu-new-frame)
- :map howm-mode-map
- ("C-c , k" . re/howm-create-keyword)
- ("C-c , =" . howm-narrow-to-memo)))
-#+END_SRC
-*** Config
-**** General settings
-#+BEGIN_SRC emacs-lisp
-(setq howm-template '("= %title%cursor #inbox\n%date %file\n\n"
- "= %title%cursor #meeting\n%date %file\n\nAttendees: \n"
- "= @%title%cursor\n%date %file\n\n")
- howm-keyword-file "~/howm/.howm-keys"
- howm-history-file "~/howm/.howm-history"
- howm-menu-file "~/.emacs.d/0000-00-00-000000.txt"
- howm-file-name-format "%Y%m%dT%H%M%S.txt"
- howm-keyword-case-fold-search t
- howm-remember-insertion-format "%s"
- howm-menu-todo-num 10)
-
-(defun re/howm-menu-new-frame (&optional arg)
- "Show the howm menu in a new frame"
- (interactive "P")
- (re/open-with-new-frame "HOWM" #'howm-menu))
-
-(defun re/howm-create-keyword ()
- "Reads a keyword from the minibuffer and appends it to the keywords file."
- (interactive)
- (append-to-file (concat (read-string "New Keyword: ")
- "\n")
- nil
- howm-keyword-file))
-#+END_SRC
-**** Menu config
-#+BEGIN_SRC emacs-lisp
-;; add entries in howm-menu (press enter on the text)
-(defun re/howm-menu-legend ()
- (cl-labels ((p (text face) (propertize text 'font-lock-face face)))
- (concat (format "Top %s" howm-menu-todo-num)
- " "
- (p "!Deadline" howm-reminder-deadline-face)
- "/"
- (p "+ToDo" howm-reminder-todo-face)
- "/"
- (p "@Schedule" howm-reminder-schedule-face)
- "/"
- (p "~Defer" howm-reminder-defer-face)
- "/"
- (p "-Reminder" howm-reminder-normal-face)
- " Entries:")))
-
-(with-eval-after-load 'howm
- (dolist (aldr-additions '(("\\[Mtg\\]" (lambda (&optional dummy) (howm-create 2)))
- ("\\[Person\\]" (lambda (&optional dummy) (howm-create 3)))))
- (add-to-list 'action-lock-default-rules aldr-additions t))
- (add-to-list 'howm-menu-allow 're/howm-menu-legend)
- ;; add coloring for custom "waiting" state
- (add-to-list 'howm-reminder-font-lock-keywords
- `(,(howm-reminder-regexp "[w]") (0 howm-reminder-defer-face prepend))
- t)
- (add-hook howm-mode-hook 'howm-mode-set-buffer-name))
-#+END_SRC
-
** Trashed
Shows the trash file as a dired buffer
#+BEGIN_SRC emacs-lisp