[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6d5bdf7 11/36: Introduce (:hint none)
From: |
Oleh Krehel |
Subject: |
[elpa] master 6d5bdf7 11/36: Introduce (:hint none) |
Date: |
Sat, 22 Jul 2017 11:22:22 -0400 (EDT) |
branch: master
commit 6d5bdf7cb06e05e4b5aa05f7bae887f213ecf10a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Introduce (:hint none)
* hydra-examples.el (hydra-org-agenda-view): New example.
* hydra.el (hydra--format): Revert to the old behavior for (:hint nil).
Turn off the bottom hint completely for (:hint none).
Fixes #190
---
hydra-examples.el | 35 +++++++++++++++++++++++++++++++++++
hydra.el | 3 +--
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/hydra-examples.el b/hydra-examples.el
index 9264feb..413c937 100644
--- a/hydra-examples.el
+++ b/hydra-examples.el
@@ -290,6 +290,41 @@ _h_ _l_ _o_k _y_ank
;; Recommended binding:
;; (global-set-key (kbd "C-x SPC") 'hydra-rectangle/body)
+;;** Example 12: org-agenda-view
+(defhydra hydra-org-agenda-view (:hint none)
+ "
+_d_: ?d? day _g_: time grid=?g? _a_: arch-trees
+_w_: ?w? week _[_: inactive _A_: arch-files
+_t_: ?t? fortnight _f_: follow=?f? _r_: clock report=?r?
+_m_: ?m? month _e_: entry text=?e? _D_: include diary=?D?
+_y_: ?y? year _q_: quit _L__l__c_: log = ?l?"
+ ("SPC" org-agenda-reset-view)
+ ("d" org-agenda-day-view (if (eq 'day (org-agenda-cts)) "[x]" "[ ]"))
+ ("w" org-agenda-week-view (if (eq 'week (org-agenda-cts)) "[x]" "[ ]"))
+ ("t" org-agenda-fortnight-view (if (eq 'fortnight (org-agenda-cts)) "[x]" "[
]"))
+ ("m" org-agenda-month-view (if (eq 'month (org-agenda-cts)) "[x]" "[ ]"))
+ ("y" org-agenda-year-view (if (eq 'year (org-agenda-cts)) "[x]" "[ ]"))
+ ("l" org-agenda-log-mode (format "% -3S" org-agenda-show-log))
+ ("L" (org-agenda-log-mode '(4)))
+ ("c" (org-agenda-log-mode 'clockcheck))
+ ("f" org-agenda-follow-mode (format "% -3S" org-agenda-follow-mode))
+ ("a" org-agenda-archives-mode)
+ ("A" (org-agenda-archives-mode 'files))
+ ("r" org-agenda-clockreport-mode (format "% -3S"
org-agenda-clockreport-mode))
+ ("e" org-agenda-entry-text-mode (format "% -3S" org-agenda-entry-text-mode))
+ ("g" org-agenda-toggle-time-grid (format "% -3S" org-agenda-use-time-grid))
+ ("D" org-agenda-toggle-diary (format "% -3S" org-agenda-include-diary))
+ ("!" org-agenda-toggle-deadlines)
+ ("[" (let ((org-agenda-include-inactive-timestamps t))
+ (org-agenda-check-type t 'timeline 'agenda)
+ (org-agenda-redo)
+ (message "Display now includes inactive timestamps as well")))
+ ("q" (message "Abort") :exit t)
+ ("v" nil))
+
+;; Recommended binding:
+;; (define-key org-agenda-mode-map "v" 'hydra-org-agenda-view/body)
+
;;* Helpers
(require 'windmove)
diff --git a/hydra.el b/hydra.el
index 5626a4f..6b07dca 100644
--- a/hydra.el
+++ b/hydra.el
@@ -604,8 +604,7 @@ _NAME, BODY, DOCSTRING and HEADS are parameters of
`defhydra'.
The expressions can be auto-expanded according to NAME."
(setq docstring (hydra--strip-align-markers docstring))
(setq docstring (replace-regexp-in-string "___" "_β_" docstring))
- (let ((rest (if (and (null (hydra-plist-get-default (cddr body) :hint 1))
- (string-match "\\`\n" docstring))
+ (let ((rest (if (eq (plist-get (cddr body) :hint) 'none)
""
(hydra--hint body heads)))
(start 0)
- [elpa] master f668f4c 06/36: hydra.el (hydra-key-regex): Add "↓←→⌫⌦⏎", (continued)
- [elpa] master f668f4c 06/36: hydra.el (hydra-key-regex): Add "↓←→⌫⌦⏎", Oleh Krehel, 2017/07/22
- [elpa] master f877855 12/36: hydra-examples.el (org-agenda-cts): Add, Oleh Krehel, 2017/07/22
- [elpa] master 0a5074a 09/36: hydra.el (hydra--format): Avoid inf loops, Oleh Krehel, 2017/07/22
- [elpa] master 270b917 14/36: hydra.el (defhydra): Don't eval hints during the definition, Oleh Krehel, 2017/07/22
- [elpa] master 200a444 10/36: hydra.el (hydra--hint): Revert return "" for :hint nil, Oleh Krehel, 2017/07/22
- [elpa] master 798684a 13/36: hydra-examples.el: Don't byte-compile, Oleh Krehel, 2017/07/22
- [elpa] master 1eee0f3 18/36: hydra.el (hydra-get-property): New defun., Oleh Krehel, 2017/07/22
- [elpa] master 272dc4a 05/36: hydra.el (hydra-docstring-keys-translate-alist): Update, Oleh Krehel, 2017/07/22
- [elpa] master 5be27f4 02/36: Add a shortcut to supply a head's eval-able docstring, Oleh Krehel, 2017/07/22
- [elpa] master 585db09 17/36: hydra-examples.el: Add example of setting verbosity, Oleh Krehel, 2017/07/22
- [elpa] master 6d5bdf7 11/36: Introduce (:hint none),
Oleh Krehel <=
- [elpa] master 76d51ec 23/36: Fix compile warnings, Oleh Krehel, 2017/07/22
- [elpa] master dd5f703 27/36: hydra.el: Use error-message-string, not message, Oleh Krehel, 2017/07/22
- [elpa] master d2aaf86 20/36: Fix e.g. _f_(foo) in format string, Oleh Krehel, 2017/07/22
- [elpa] master a72d68a 28/36: hydra.el (hydra-fontify-head-default): Fix head keys as "%f", Oleh Krehel, 2017/07/22
- [elpa] master 3527b32 24/36: Fix byte compiler warnings, Oleh Krehel, 2017/07/22
- [elpa] master 943636f 35/36: hydra.el: Bump version, Oleh Krehel, 2017/07/22
- [elpa] master 3db82e5 29/36: Implement named columns, Oleh Krehel, 2017/07/22
- [elpa] master 95008ea 30/36: hydra.el: Add automatic lookup for remaped cmd, Oleh Krehel, 2017/07/22
- [elpa] master 32b8352 36/36: Merge commit '943636fe4a35298d9d234222bc4520dec9ef2305' from hydra, Oleh Krehel, 2017/07/22
- [elpa] master 91f8e7c 22/36: hydra.el: Bump version, Oleh Krehel, 2017/07/22