Updates
authorJoerg Jaspert <joerg@debian.org>
Wed, 6 Mar 2019 20:52:59 +0000 (21:52 +0100)
committerJoerg Jaspert <joerg@debian.org>
Wed, 6 Mar 2019 20:52:59 +0000 (21:52 +0100)
.emacs.d/config/emacs.org

index bf9ee9a..522d628 100644 (file)
@@ -1052,8 +1052,9 @@ From https://raw.github.com/qdot/conf_emacs/master/emacs_conf.org
 #+END_SRC
 **** Edit-server for chromium extension "Edit with emacs"
 [2015-10-15 Thu 22:32]
-#+BEGIN_SRC emacs-lisp :tangle no
+#+BEGIN_SRC emacs-lisp :tangle yes
 (use-package edit-server
+  :ensure t
   :config
   (progn
     (setq edit-server-new-frame nil)
@@ -3966,23 +3967,23 @@ CLOSED: [2017-08-26 Sat 15:18]
                                     (         :name "Nagios"                :query "from:nagios@ AND tag:unread")
                                     (         :name "Debian BTS"            :query "from:@bugs.debian.org AND tag:unread")
                                     (         :name "FTPMaster"             :query "from:ftpmaster@ftp-master.debian.org AND tag:unread")
-                                    (         :name "Mirror logs"           :query "from:archvsync@* AND tag:mirrors AND tag:logs AND tag:unread")
+                                    (         :name "Mirror logs"           :query "(from:archvsync@* OR from:mirror+arrakis@*) AND tag:mirrors AND tag:logs AND tag:unread")
                                     (         :name "Cron"                  :query "from:cron@ AND tag:unread")
                                     (         :name "List Admin"            :query "subject:moderator request AND tag:unread")
                                     (:key "i" :name "Inbox Ganneff"         :query "(tag:inbox AND tag:ganneff) AND NOT (tag:lists OR tag:kommerz OR from:support@hetzner.com)")
-                                    (         :name "Inbox NSB"             :query "tag:inbox AND tag:nsb")
+                                    (         :name "Inbox NSB"             :query "(tag:inbox AND tag:nsb) AND NOT (tag:ganeti OR tag:lists/ganeti)")
                                     (         :name "Inbox All"             :query "tag:inbox")
                                     (:key "n" :name "New Mail"              :query "tag:new" )
                                     (:key "u" :name "Unread All"            :query "tag:unread")
-                                    (         :name "Unread NSB"            :query "tag:unread AND tag:nsb")
+                                    (         :name "Unread NSB"            :query "tag:unread AND tag:nsb AND NOT (from:nagios@ OR from:@bugs.debian.org OR from:cron@ or from:ftpmaster@ftp-master.debian.org OR tag:lists OR tag:ganeti OR tag:lists/ganeti)")
                                     (         :name "Unread Ganneff"        :query "tag:unread AND tag:ganneff AND NOT ( \
                                                           ( from:gitlab@salsa.debian.org AND subject:dak ) OR \
                                                           ( ( tag:planet OR tag:kommerz OR from:cron@ OR from:archvsync@* OR \
                                                               from:ftpmaster@ftp-master.debian.org OR from:nagios@ OR from:@bugs.debian.org \
                                                               OR tag:lists/* OR from:support@hetzner.com) )")
                                     (:key "f" :name "Flagged"               :query "tag:flagged")
-                                    (:key "s" :name "Sent Ganneff"          :query "tag:sent AND tag:ganneff")
-                                    (         :name "Sent NSB"              :query "tag:sent AND tag:nsb")
+                                    (:key "s" :name "Sent Ganneff"          :query "tag:sent AND tag:ganneff OR tag:sent AND ( from:ganneff.de OR from:debian.org )")
+                                    (         :name "Sent NSB"              :query "tag:sent AND tag:nsb OR tag:sent AND from:nsb-software.de")
                                     (         :name "Sent DAM"              :query "folder:ganneff/.Sentmail.DAM")
                                     (:key "g" :name "NSB GF"                :query "tag:nsb AND tag:gf AND tag:unread")
                                     (:key "f" :name "Important"             :query "tag:important")
@@ -4017,7 +4018,9 @@ CLOSED: [2017-08-26 Sat 15:18]
                                     (:key "m" :name "To me"                 :query "tag:to-me")
                                     (:key "l" :name "Lists"                 :query "tag:lists AND tag:unread")
                                     (         :name "Hetzner Support"       :query "from:support@hetzner.com AND tag:unread")
+                                    (         :name "Ganeti"                :query "(tag:ganeti OR tag:lists/ganeti) AND tag:unread")
                                     (         :name "SPAM"                  :query "folder:ganneff/.SPAM AND tag:spam")
+                                    (         :name "Drafts"                :query "tag:draft")
                                          ;                                        (:key "a" :name "all mail"              :query "*")
                                     ))
 
@@ -4034,10 +4037,11 @@ CLOSED: [2017-08-26 Sat 15:18]
                                                        notmuch-wash-excerpt-citations
                                                        )))
 
+     (setq notmuch-print-mechanism 'notmuch-print-muttprint/evince)
      (setq notmuch-tagging-keys '(("a" notmuch-archive-tags "Archive")
                                   ("u" notmuch-show-mark-read-tags "Mark read")
                                   ("f" ("+flagged") "Flag")
-                                  ("s" ("+spam" "-inbox" "-unread" "-learnham") "Mark as spam")
+                                  ("s" ("+spam" "-inbox" "-unread" "-learnham" "-moveham") "Mark as spam")
                                   ("d" ("+deleted" "-inbox" "-unread") "Delete")))
 
      (defun jj-forward (prefix)
@@ -4049,17 +4053,20 @@ CLOSED: [2017-08-26 Sat 15:18]
 
                                          ; Toggle deleted tag on a message in search/show
      (define-key notmuch-search-mode-map "d"
-       (lambda ()
+       (lambda (N)
          "toggle deleted tag for message"
-         (interactive)
-         (if (member "deleted" (notmuch-search-get-tags))
-             (notmuch-search-tag (list "-deleted"))
-           (notmuch-search-tag (list "+deleted" "-unread" "-inbox")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "deleted" (notmuch-search-get-tags))
+               (notmuch-search-tag (list "-deleted"))
+             (notmuch-search-tag (list "+deleted" "-unread" "-inbox")))
+           (forward-line))))
      (define-key notmuch-show-mode-map "d"
        (lambda ()
          "toggle deleted tag for message"
-         (interactive)
+         (interactive "p")
          (if (member "deleted" (notmuch-show-get-tags))
              (notmuch-show-tag (list "-deleted"))
            (notmuch-show-tag (list "+deleted" "-unread" "-inbox")))
@@ -4067,56 +4074,68 @@ CLOSED: [2017-08-26 Sat 15:18]
 
                                          ; Toggle spam tag on a message in search/show
      (define-key notmuch-search-mode-map "s"
-       (lambda ()
+       (lambda (N)
          "toggle spam tag for message"
-         (interactive)
-         (if (member "spam" (notmuch-search-get-tags))
-             (notmuch-search-tag (list "-spam" "+learnham"))
-           (notmuch-search-tag (list "+spam" "-unread" "-inbox")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "spam" (notmuch-search-get-tags))
+               (notmuch-search-tag (list "-spam" "+learnham" "+moveham"))
+             (notmuch-search-tag (list "+spam" "-unread" "-inbox")))
+           (forward-line))))
      (define-key notmuch-show-mode-map "s"
        (lambda ()
          "toggle spam tag for message"
          (interactive)
          (if (member "spam" (notmuch-show-get-tags))
-             (notmuch-show-tag (list "-spam" "+learnham"))
+             (notmuch-show-tag (list "-spam" "+learnham" "+moveham"))
            (notmuch-show-tag (list "+spam" "-unread" "-inbox")))
          (notmuch-show-next-open-message t)))
      (define-key notmuch-tree-mode-map "s"
-       (lambda ()
+       (lambda (N)
          "toggle spam tag for message"
-         (interactive)
-         (if (member "spam" (notmuch-tree-get-tags))
-             (notmuch-tree-tag (list "-spam" "+learnham"))
-           (notmuch-tree-tag (list "+spam" "-unread" "-inbox")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "spam" (notmuch-tree-get-tags))
+               (notmuch-tree-tag (list "-spam" "+learnham" "+moveham"))
+             (notmuch-tree-tag (list "+spam" "-unread" "-inbox")))
+           (forward-line))))
 
                                          ; Toggle learnham tag on a message in search/show
      (define-key notmuch-search-mode-map "h"
-       (lambda ()
+       (lambda (N)
          "toggle learnham tag for message"
-         (interactive)
-         (if (member "learnham" (notmuch-search-get-tags))
-             (notmuch-search-tag (list "-learnham"))
-           (notmuch-search-tag (list "+learnham" "-spam")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "learnham" (notmuch-search-get-tags))
+               (notmuch-search-tag (list "-learnham"))
+             (notmuch-search-tag (list "+learnham" "-spam" "+moveham")))
+           (forward-line))))
      (define-key notmuch-show-mode-map "h"
        (lambda ()
          "toggle learnham tag for message"
          (interactive)
          (if (member "learnham" (notmuch-show-get-tags))
              (notmuch-show-tag (list "-learnham"))
-           (notmuch-show-tag (list "+learnham" "-spam")))
+           (notmuch-show-tag (list "+learnham" "-spam" "+moveham")))
          (notmuch-show-next-open-message t)))
 
      (define-key notmuch-search-mode-map "u"
-       (lambda ()
+       (lambda (N)
          "toggle unread tag for message"
-         (interactive)
-         (if (member "unread" (notmuch-search-get-tags))
-             (notmuch-search-tag (list "-unread" "-inbox"))
-           (notmuch-search-tag (list "+unread")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "unread" (notmuch-search-get-tags))
+               (notmuch-search-tag (list "-unread" "-inbox"))
+             (notmuch-search-tag (list "+unread")))
+           (forward-line))))
      (define-key notmuch-show-mode-map "u"
        (lambda ()
          "toggle unread tag for message"
@@ -4127,13 +4146,16 @@ CLOSED: [2017-08-26 Sat 15:18]
          (notmuch-show-next-open-message t)))
 
      (define-key notmuch-search-mode-map "k"
-       (lambda ()
+       (lambda (N)
          "mark a thread killed"
-         (interactive)
-         (if (member "killed" (notmuch-search-get-tags))
-             (notmuch-search-tag (list "-killed"))
-           (notmuch-search-tag (list "+killed" "-inbox" "-unread")))
-         (forward-line)))
+         (interactive "p")
+         (setq num 0)
+         (while (< num N)
+           (setq num (1+ num))
+           (if (member "killed" (notmuch-search-get-tags))
+               (notmuch-search-tag (list "-killed"))
+             (notmuch-search-tag (list "+killed" "-inbox" "-unread")))
+           (forward-line))))
      (define-key notmuch-show-mode-map "k"
        (lambda ()
          "toggle killed tag for message"
@@ -4307,7 +4329,6 @@ CLOSED: [2017-08-26 Sat 15:18]
  directories.
  #+BEGIN_SRC emacs-lisp
  (setq org-agenda-files (quote ("~/org/"
-                                "~/org/nsb"
                                 )))
  (setq org-default-notes-file "~/org/notes.org")
  #+END_SRC
@@ -4367,8 +4388,9 @@ CLOSED: [2017-08-26 Sat 15:18]
 
  ;; Enable display of the time grid so we can see the marker for the current time
  (setq org-agenda-time-grid (quote ((daily today remove-match)
-                                    #("----------------" 0 16 (org-heading t))
-                                    (0800 1000 1200 1400 1500 1700 1900 2100))))
+                                    (0800 1000 1200 1400 1500 1700 1900 2100)
+                                    "......" "----------------")
+                                    ))
 
  ;; Display tags farther right
  (setq org-agenda-tags-column -102)
@@ -4425,7 +4447,7 @@ CLOSED: [2017-08-26 Sat 15:18]
  (appt-activate t)
 
  (setq org-agenda-log-mode-items (quote (closed clock state)))
- (setq org-agenda-span 3)
+ (setq org-agenda-span 4)
 
  (setq org-agenda-show-all-dates t)
  (setq org-agenda-start-on-weekday nil)
@@ -4571,7 +4593,7 @@ CLOSED: [2017-08-26 Sat 15:18]
 
  ;; Capture templates for: TODO tasks, Notes, appointments, phone calls, and org-protocol
  ;; see http://orgmode.org/manual/Template-elements.html
- (setq org-capture-templates
+(setq org-capture-templates
        (quote (("t" "todo" entry (file "~/org/refile.org")
                 "* TODO %?\nAdded: %U\n"
                 :clock-in t :clock-resume t)
@@ -4579,7 +4601,7 @@ CLOSED: [2017-08-26 Sat 15:18]
                 "* TODO %?\nAdded: %U\n%a\n"
                 :clock-in t :clock-resume t)
                ("r" "respond" entry (file "~/org/refile.org")
-                "* TODO Respond to %:from on %:subject\nSCHEDULED: %t\nAdded: %U\n%a\n"
+                "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\nAdded: %U\n%a\n"
                 :clock-in t :clock-resume t :immediate-finish t)
                ("n" "note" entry (file "~/org/refile.org")
                 "* %? :NOTE:\nAdded: %U\n%a\n"
@@ -4663,86 +4685,77 @@ CLOSED: [2017-08-26 Sat 15:18]
 
  ;; Custom agenda command definitions
  (setq org-agenda-custom-commands
-       (quote (("N" "Notes" tags "NOTE"
-                ((org-agenda-overriding-header "Notes")
-                 (org-tags-match-list-sublevels t)))
-               ("h" "Habits" tags-todo "STYLE=\"habit\""
-                ((org-agenda-overriding-header "Habits")
-                 (org-agenda-sorting-strategy
-                  '(todo-state-down effort-up category-keep))))
-               (" " "Agenda"
-                ((agenda "" nil)
-                 (tags "REFILE"
-                       ((org-agenda-overriding-header "Tasks to Refile")
-                        (org-tags-match-list-sublevels nil)))
-                 (tags-todo "-HOLD-CANCELLED/!"
-                            ((org-agenda-overriding-header "Projects")
-                             (org-agenda-skip-function 'bh/skip-non-projects)
-                             (org-agenda-sorting-strategy
-                              '(category-keep))))
-                 (tags-todo "-CANCELLED/!"
-                            ((org-agenda-overriding-header "Stuck Projects")
-                             (org-agenda-skip-function 'bh/skip-non-stuck-projects)))
-                 (tags-todo "-WAITING-CANCELLED/!NEXT"
-                            ((org-agenda-overriding-header "Next Tasks")
-                             (org-agenda-skip-function 'bh/skip-projects-and-habits-and-single-tasks)
-                             (org-agenda-todo-ignore-scheduled t)
-                             (org-agenda-todo-ignore-deadlines t)
-                             (org-agenda-todo-ignore-with-date t)
-                             (org-tags-match-list-sublevels t)
-                             (org-agenda-sorting-strategy
-                              '(todo-state-down effort-up category-keep))))
-                 (tags-todo "-REFILE-CANCELLED/!-HOLD-WAITING"
-                            ((org-agenda-overriding-header "Tasks")
-                             (org-agenda-skip-function 'bh/skip-project-tasks-maybe)
-                             (org-agenda-todo-ignore-scheduled t)
-                             (org-agenda-todo-ignore-deadlines t)
-                             (org-agenda-todo-ignore-with-date t)
-                             (org-agenda-sorting-strategy
-                              '(category-keep))))
-                 (tags-todo "-CANCELLED+WAITING/!"
-                            ((org-agenda-overriding-header "Waiting and Postponed Tasks")
-                             (org-agenda-skip-function 'bh/skip-stuck-projects)
-                             (org-tags-match-list-sublevels nil)
-                             (org-agenda-todo-ignore-scheduled 'future)
-                             (org-agenda-todo-ignore-deadlines 'future)))
-                 (tags "-REFILE/"
-                       ((org-agenda-overriding-header "Tasks to Archive")
-                        (org-agenda-skip-function 'bh/skip-non-archivable-tasks)
-                        (org-tags-match-list-sublevels nil))))
-                nil)
-               ("r" "Tasks to Refile" tags "REFILE"
-                ((org-agenda-overriding-header "Tasks to Refile")
-                 (org-tags-match-list-sublevels nil)))
-               ("#" "Stuck Projects" tags-todo "-CANCELLED/!"
-                ((org-agenda-overriding-header "Stuck Projects")
-                 (org-agenda-skip-function 'bh/skip-non-stuck-projects)))
-               ("n" "Next Tasks" tags-todo "-WAITING-CANCELLED/!NEXT"
-                ((org-agenda-overriding-header "Next Tasks")
-                 (org-agenda-skip-function 'bh/skip-projects-and-habits-and-single-tasks)
-                 (org-agenda-todo-ignore-scheduled t)
-                 (org-agenda-todo-ignore-deadlines t)
-                 (org-agenda-todo-ignore-with-date t)
-                 (org-tags-match-list-sublevels t)
-                 (org-agenda-sorting-strategy
-                  '(todo-state-down effort-up category-keep))))
-               ("R" "Tasks" tags-todo "-REFILE-CANCELLED/!-HOLD-WAITING"
-                ((org-agenda-overriding-header "Tasks")
-                 (org-agenda-skip-function 'bh/skip-project-tasks-maybe)
-                 (org-agenda-sorting-strategy
-                  '(category-keep))))
-               ("p" "Projects" tags-todo "-HOLD-CANCELLED/!"
-                ((org-agenda-overriding-header "Projects")
-                 (org-agenda-skip-function 'bh/skip-non-projects)
-                 (org-agenda-sorting-strategy
-                  '(category-keep))))
-               ("w" "Waiting Tasks" tags-todo "-CANCELLED+WAITING/!"
-                ((org-agenda-overriding-header "Waiting and Postponed tasks"))
-                (org-tags-match-list-sublevels nil))
-               ("A" "Tasks to Archive" tags "-REFILE/"
-                ((org-agenda-overriding-header "Tasks to Archive")
-                 (org-agenda-skip-function 'bh/skip-non-archivable-tasks)
-                 (org-tags-match-list-sublevels nil))))))
+      (quote (("N" "Notes" tags "NOTE"
+               ((org-agenda-overriding-header "Notes")
+                (org-tags-match-list-sublevels t)))
+              ("h" "Habits" tags-todo "STYLE=\"habit\""
+               ((org-agenda-overriding-header "Habits")
+                (org-agenda-sorting-strategy
+                 '(todo-state-down effort-up category-keep))))
+              (" " "Agenda"
+               ((agenda "" nil)
+                (tags "REFILE"
+                      ((org-agenda-overriding-header "Tasks to Refile")
+                       (org-tags-match-list-sublevels nil)))
+                (tags-todo "-CANCELLED/!"
+                           ((org-agenda-overriding-header "Stuck Projects")
+                            (org-agenda-skip-function 'bh/skip-non-stuck-projects)
+                            (org-agenda-sorting-strategy
+                             '(category-keep))))
+                (tags-todo "-HOLD-CANCELLED/!"
+                           ((org-agenda-overriding-header "Projects")
+                            (org-agenda-skip-function 'bh/skip-non-projects)
+                            (org-tags-match-list-sublevels 'indented)
+                            (org-agenda-sorting-strategy
+                             '(category-keep))))
+                (tags-todo "-CANCELLED/!NEXT"
+                           ((org-agenda-overriding-header (concat "Project Next Tasks"
+                                                                  (if bh/hide-scheduled-and-waiting-next-tasks
+                                                                      ""
+                                                                    " (including WAITING and SCHEDULED tasks)")))
+                            (org-agenda-skip-function 'bh/skip-projects-and-habits-and-single-tasks)
+                            (org-tags-match-list-sublevels t)
+                            (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-sorting-strategy
+                             '(todo-state-down effort-up category-keep))))
+                (tags-todo "-REFILE-CANCELLED-WAITING-HOLD/!"
+                           ((org-agenda-overriding-header (concat "Project Subtasks"
+                                                                  (if bh/hide-scheduled-and-waiting-next-tasks
+                                                                      ""
+                                                                    " (including WAITING and SCHEDULED tasks)")))
+                            (org-agenda-skip-function 'bh/skip-non-project-tasks)
+                            (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-sorting-strategy
+                             '(category-keep))))
+                (tags-todo "-REFILE-CANCELLED-WAITING-HOLD/!"
+                           ((org-agenda-overriding-header (concat "Standalone Tasks"
+                                                                  (if bh/hide-scheduled-and-waiting-next-tasks
+                                                                      ""
+                                                                    " (including WAITING and SCHEDULED tasks)")))
+                            (org-agenda-skip-function 'bh/skip-project-tasks)
+                            (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-sorting-strategy
+                             '(category-keep))))
+                (tags-todo "-CANCELLED+WAITING|HOLD/!"
+                           ((org-agenda-overriding-header (concat "Waiting and Postponed Tasks"
+                                                                  (if bh/hide-scheduled-and-waiting-next-tasks
+                                                                      ""
+                                                                    " (including WAITING and SCHEDULED tasks)")))
+                            (org-agenda-skip-function 'bh/skip-non-tasks)
+                            (org-tags-match-list-sublevels nil)
+                            (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
+                            (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)))
+                (tags "-REFILE/"
+                      ((org-agenda-overriding-header "Tasks to Archive")
+                       (org-agenda-skip-function 'bh/skip-non-archivable-tasks)
+                       (org-tags-match-list-sublevels nil))))
+               nil))))
 
  ; Overwrite the current window with the agenda
  (setq org-agenda-window-setup 'current-window)
@@ -4892,7 +4905,7 @@ CLOSED: [2017-08-26 Sat 15:18]
           (ruby . t)
           (gnuplot . t)
           (clojure . t)
-          (shell . t)
+          ;(shell . t)
           (ledger . t)
           (org . t)
           (plantuml . t)
@@ -5332,6 +5345,13 @@ CLOSED: [2017-08-26 Sat 15:18]
  #+BEGIN_SRC emacs-lisp
  (require 'org-checklist)
  #+END_SRC
+** password store
+[2019-01-25 Fri 22:41]
+#+BEGIN_SRC emacs-lisp
+(use-package pass
+  :ensure t
+  )
+#+END_SRC
 ** perl / cperl
  I like /cperl-mode/ a bit more than the default /perl-mode/, so set it
  up here to be used.