summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-06-07 23:48:59 +0100
committerjao <jao@gnu.org>2022-06-08 01:42:13 +0100
commit200692bb1fb8acdcc467862d92a1d24ac3e381bc (patch)
treeeef0883005d7211787ac3365f8ac5be2aa3db023 /lib
parent7f5113e71f1d6038091850d4030e90b766903779 (diff)
downloadelibs-200692bb1fb8acdcc467862d92a1d24ac3e381bc.tar.gz
elibs-200692bb1fb8acdcc467862d92a1d24ac3e381bc.tar.bz2
desorgification
Diffstat (limited to 'lib')
-rw-r--r--lib/doc/jao-doc-view.el14
-rw-r--r--lib/net/jao-notmuch.el36
2 files changed, 20 insertions, 30 deletions
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el
index ea55565..b8fbe1b 100644
--- a/lib/doc/jao-doc-view.el
+++ b/lib/doc/jao-doc-view.el
@@ -1,4 +1,4 @@
-;; jao-doc-view.el -- Remembering visited documents -*- lexical-binding: t; -*-
+;;; jao-doc-view.el -- extensions for doc-view -*- lexical-binding: t; -*-
;; Copyright (c) 2013, 2015, 2017, 2018, 2019, 2021, 2022 Jose Antonio Ortega Ruiz
@@ -18,13 +18,7 @@
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Fri Feb 15, 2013 01:21
-;;; Comentary:
-;; Some utilities to keep track of visited documents and their structure.
-
-;;; Code:
-
-
;;; Session
(require 'doc-view)
@@ -84,7 +78,6 @@
(add-hook 'pdf-view-mode-hook #'jao-doc-view--save-session)
(add-hook 'nov-mode-hook #'jao-doc-view--save-session)
-
;;; PDF info
(defvar-local jao--pdf-outline nil)
@@ -145,7 +138,6 @@
(or (jao-doc-view-section-title)
(when buffer-file-name (jao-doc-view-title buffer-file-name)))))
-
;;; imenu
(defvar-local jao-doc-view--imenu-file nil)
(defvar-local jao-doc-view--goer 'jao-doc-view-goto-page)
@@ -173,7 +165,6 @@
(add-hook 'doc-view-mode-hook #'jao-doc-view--enable-imenu)
-
;;; Page trailing
(defvar-local jao-doc-view--trail-back ())
(defvar-local jao-doc-view--trail-fwd ())
@@ -199,7 +190,6 @@
(advice-add 'doc-view-goto-page :before #'jao-doc-view--trail-push)
-
;;; Find URLs
(defun jao-doc-view--page-urls (all)
(if doc-view--current-converter-processes
@@ -232,5 +222,5 @@
(when (null (cdr urls)) (car urls))))
(browse-url url))))))
-
+;;; .
(provide 'jao-doc-view)
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 05ec394..edffade 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -32,8 +32,8 @@
(require 'notmuch-tree)
(require 'notmuch-show)
-
-;;;; Targetting the displayed message from the tree view
+
+;;; Targetting the displayed message from the tree view
(defvar-local jao-notmuch--tree-buffer nil)
(declare eww--url-at-point "eww")
@@ -130,8 +130,8 @@
(completing-read "Browse URL: " urls))
(message "No URLs in this message")))
-
-;;;; Navigating URLs
+
+;;; Navigating URLs
(require 'ffap)
@@ -157,8 +157,8 @@
(thing-at-point-url-at-point)))
(browse-url url)))
-
-;;;; Toggling mime parts and images
+
+;;; Toggling mime parts and images
(defun jao-notmuch--toggle-mime ()
(save-excursion
@@ -220,8 +220,8 @@
(with-current-buffer notmuch-tree-message-buffer
(jao-notmuch--view-html))))))
-
-;;;; Keeping track of unread messages in current tree view
+
+;;; Keeping track of unread messages in current tree view
(defun jao-notmuch--looking-at-new-p (&optional p)
(when-let (ts (if p (plist-get p :tags) (notmuch-show-get-tags)))
@@ -278,8 +278,8 @@
`((:eval (jao-notmuch--format-header-line ,(buffer-name tb) ,cb ,subject)))
(concat " " subject)))
-
-;;;; Outline mode for tree view
+
+;;; Outline mode for tree view
(defun jao-notmuch-tree--msg-prefix (msg)
(insert (propertize (if (plist-get msg :first) "> " " ") 'display " ")))
@@ -347,8 +347,8 @@
(interactive "P")
(jao-notmuch-tree--next t t exit))
-
-;;;; Updating the tree window after insertion
+
+;;; Updating the tree window after insertion
(defun jao-notmuch--tree-sentinel (proc &rest _)
(when (eq (process-status proc) 'exit)
@@ -359,8 +359,8 @@
(jao-notmuch-tree-outline-setup prefix)
(advice-add 'notmuch-tree-process-sentinel :after #'jao-notmuch--tree-sentinel))
-
-;;;; Tagging
+
+;;; Tagging
(defsubst jao-notmuch--has-tag (tag)
(member tag (notmuch-tree-get-tags)))
@@ -430,8 +430,8 @@
(advice-add 'notmuch-mua-new-reply :around #'jao-notmuch-mua-new-reply)
-
-;;;; Results formatters
+
+;;; Results formatters
(defun jao-notmuch-format-tags (fmt msg)
(let ((ts (thread-last (notmuch-tree-format-field "tags" "%s" msg)
@@ -451,12 +451,12 @@
'notmuch-tree-no-match-author-face)))
(propertize auth 'face face)))
-(defun jao-notmuch-tree-and-subject (fmt msg)
+(defun jao-notmuch-format-tree-and-subject (fmt msg)
(let ((tr (notmuch-tree-format-field "tree" " %s" msg))
(sb (notmuch-tree-format-field "subject" " %s" msg)))
(format-spec fmt `((?s . ,(concat tr sb))))))
-(defun jao-notmuch-msg-ticks (mails-rx msg)
+(defun jao-notmuch-format-msg-ticks (mails-rx msg)
(let ((headers (plist-get msg :headers)))
(cond ((string-match-p mails-rx (or (plist-get headers :To) ""))
(propertize " ยป" 'face 'notmuch-tree-match-tree-face))