From 991b0bb3a1d86b5ef2347597ca85a0fff5148c3b Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 23 Dec 2020 19:44:22 -0500 Subject: Silence byte-compiler --- lisp/km-ace-link.el | 4 ++-- lisp/km-bib.el | 2 +- lisp/km-dired.el | 2 +- lisp/km-editing.el | 10 +++++----- lisp/km-elfeed.el | 5 ++++- lisp/km-hydra.el | 42 ++++++++++++++++++++++-------------------- lisp/km-magit.el | 3 ++- lisp/km-mail.el | 5 ++++- lisp/km-org-agenda.el | 2 +- lisp/km-org.el | 8 ++++---- 10 files changed, 46 insertions(+), 37 deletions(-) (limited to 'lisp') diff --git a/lisp/km-ace-link.el b/lisp/km-ace-link.el index 1fc75c3..e407348 100644 --- a/lisp/km-ace-link.el +++ b/lisp/km-ace-link.el @@ -47,7 +47,7 @@ (lambda (pt) (goto-char pt) (org-open-file (dired-get-filename)))) - (avy--process + (avy-process (km/ali--dired-collect-references) #'avy--overlay-post))) @@ -83,7 +83,7 @@ property." (lambda (pt) (goto-char (1+ pt)) (widget-button-press (point)))) - (avy--process + (avy-process (km/ali--widget-collect-references) #'avy--overlay-post))) diff --git a/lisp/km-bib.el b/lisp/km-bib.el index 6d364c0..4b82c28 100644 --- a/lisp/km-bib.el +++ b/lisp/km-bib.el @@ -224,7 +224,7 @@ When called interactively, take the DOI from the text under point. The link is opened using the settings of `org-doi-server-url'." (interactive (list (km/doi-at-point))) - (browse-url (org-link-escape-browser (concat org-doi-server-url doi)))) + (browse-url (url-encode-url (concat org-link-doi-server-url doi)))) ;;;###autoload (defun km/copy-doi-as-kill () diff --git a/lisp/km-dired.el b/lisp/km-dired.el index 2041efc..51eeb15 100644 --- a/lisp/km-dired.el +++ b/lisp/km-dired.el @@ -95,7 +95,7 @@ ;;;###autoload (defun km/dired-beginning-of-buffer () (interactive) - (beginning-of-buffer) + (goto-char (point-min)) (dired-next-line 1)) diff --git a/lisp/km-editing.el b/lisp/km-editing.el index 63ca7d4..262d3aa 100644 --- a/lisp/km-editing.el +++ b/lisp/km-editing.el @@ -84,14 +84,14 @@ special case. (delete-blank-lines)))) ;;;###autoload -(defun km/export-wrapped-text (&optional xselect) +(defun km/export-wrapped-text (&optional select) "Export the text in current buffer as wrapped text. This is useful for preparing text in emacs and then exporting to a wrapped buffer for pasting text (e.g., into a web form). -With an active region, restrict export to this region. If -XSELECT is non-nil, copy the region with `x-select-text'." +With an active region, restrict export to this region. If SELECT +is non-nil, copy the region with `gui-select-text'" (interactive "P") (let ((wrapped-buffer (get-buffer-create "*Wrapped export*"))) (apply #'copy-to-buffer wrapped-buffer @@ -104,8 +104,8 @@ XSELECT is non-nil, copy the region with `x-select-text'." (forward-line -1) (km/unfill-paragraph) (forward-line 1)) - (when xselect - (x-select-text + (when select + (gui-select-text (buffer-substring-no-properties (point-min) (point-max))))) (pop-to-buffer wrapped-buffer))) diff --git a/lisp/km-elfeed.el b/lisp/km-elfeed.el index 70469d5..eb5c2ea 100644 --- a/lisp/km-elfeed.el +++ b/lisp/km-elfeed.el @@ -20,6 +20,8 @@ ;;; Code: +(require 'elfeed-search) + (defvar km/elfeed-tag-keys nil "Keys used by `km/elfeed-set-tag' to select tags. ? and . are reserved.") @@ -59,7 +61,8 @@ filter to the default, respectively." ;;;###autoload (defun km/elfeed-catchup () (interactive) - (mark-whole-buffer) + (with-suppressed-warnings ((interactive-only mark-whole-buffer)) + (mark-whole-buffer)) (elfeed-search-untag-all-unread) (km/elfeed-default-filter)) diff --git a/lisp/km-hydra.el b/lisp/km-hydra.el index fcd0716..9437b48 100644 --- a/lisp/km-hydra.el +++ b/lisp/km-hydra.el @@ -21,16 +21,18 @@ ;;; Code: (require 'hydra) +(require 'org-link-edit) +(require 'winner) (defhydra hydra-org-link-edit () - "Org Link Edit" - ("j" org-link-edit-forward-slurp "forward slurp") - ("k" org-link-edit-forward-barf "forward barf") - ("u" org-link-edit-backward-slurp "backward slurp") - ("i" org-link-edit-backward-barf "backward barf") - ("t" org-link-edit-transport-next-link "transport next") - ("l" km/org-link-edit-slurp-link "slurp link" :color blue) - ("q" nil "cancel")) + "Org Link Edit" + ("j" org-link-edit-forward-slurp "forward slurp") + ("k" org-link-edit-forward-barf "forward barf") + ("u" org-link-edit-backward-slurp "backward slurp") + ("i" org-link-edit-backward-barf "backward barf") + ("t" org-link-edit-transport-next-link "transport next") + ("l" km/org-link-edit-slurp-link "slurp link" :color blue) + ("q" nil "cancel")) (defhydra hydra-smerge (:hint nil) " @@ -94,18 +96,18 @@ _h_ leaves _s_ subtree _b_ backward same level _d_ subtree " - ("q" hide-sublevels) - ("t" hide-body) - ("o" hide-other) - ("c" hide-entry) - ("h" hide-leaves) - ("d" hide-subtree) - - ("a" show-all) - ("e" show-entry) - ("i" show-children) - ("k" show-branches) - ("s" show-subtree) + ("q" outline-hide-sublevels) + ("t" outline-hide-body) + ("o" outline-hide-other) + ("c" outline-hide-entry) + ("h" outline-hide-leaves) + ("d" outline-hide-subtree) + + ("a" outline-show-all) + ("e" outline-show-entry) + ("i" outline-show-children) + ("k" outline-show-branches) + ("s" outline-show-subtree) ("u" outline-up-heading) ("n" outline-next-visible-heading) diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 3fb2255..ced8bed 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -21,6 +21,7 @@ ;;; Code: (require 'avy) +(require 'bug-reference) (require 'cl-lib) (require 'git-rebase) (require 'km-util) @@ -1236,7 +1237,7 @@ With a \\[universal-argument] \\[universal-argument], do not mark them at all." (user-error "Not on commit line")) (avy-with km/git-rebase-move-commit (setq avy-action #'km/git-rebase--move-line) - (avy--process + (avy-process (km/git-rebase--collect-lines) #'avy--overlay-post))) diff --git a/lisp/km-mail.el b/lisp/km-mail.el index 2effb1e..4c3104e 100644 --- a/lisp/km-mail.el +++ b/lisp/km-mail.el @@ -54,7 +54,8 @@ (defun km/notmuch-archive-all () "Call `notmuch-search-archive-thread' with whole-buffer region." (interactive) - (mark-whole-buffer) + (with-suppressed-warnings ((interactive-only mark-whole-buffer)) + (mark-whole-buffer)) (call-interactively #'notmuch-search-archive-thread)) (defun km/notmuch-thread-id-from-message-id (message-id) @@ -181,10 +182,12 @@ in the remote's \".git/config\" entry." (`notmuch-tree-mode (notmuch-tree-get-query)))) (default-value 'notmuch-search-oldest-first))) +(declare-function debbugs-gnu-current-status "debbugs-gnu" ()) ;; Modified from fucntion in Nicolas Petton's emacs configuration ;; (https://gitlab.petton.fr/nico/emacs.d/, 208407f53a) ;;;###autoload (defun km/debbugs-notmuch-select-report (&rest _) + (require 'debbugs-gnu) (let* ((status (debbugs-gnu-current-status)) (id (cdr (assq 'id status))) (merged (cdr (assq 'mergedwith status)))) diff --git a/lisp/km-org-agenda.el b/lisp/km-org-agenda.el index 69f69ae..0d5903d 100644 --- a/lisp/km-org-agenda.el +++ b/lisp/km-org-agenda.el @@ -42,7 +42,7 @@ killed." (find-file org-default-notes-file) (goto-char (org-find-exact-headline-in-buffer "Inbox" nil t)) (recenter-top-bottom 0) - (show-children)) + (outline-show-children)) ;;;###autoload (defun km/org-goto-agenda-heading () diff --git a/lisp/km-org.el b/lisp/km-org.el index aa0b7c0..ce4cac1 100644 --- a/lisp/km-org.el +++ b/lisp/km-org.el @@ -354,7 +354,7 @@ the buffer widened." (insert (format "Call: %s\n\n" cmd)) (pcase-dolist (`(,file ,_ ,text) (nreverse results)) (insert (format "- [ ] %s\n" - (org-make-link-string + (org-link-make-string (concat "file:" file "::" text) (let ((desc (concat file ":" text))) (if (> (length desc) 72) @@ -472,8 +472,8 @@ A numeric prefix sets MAXLEVEL (defaults to 2)." (defun km/get-org-file-buffer () (get-buffer - (org-icompleting-read "Buffer: " (mapcar 'buffer-name - (org-buffer-list 'files))))) + (completing-read "Buffer: " (mapcar 'buffer-name + (org-buffer-list 'files))))) ;;;###autoload (defun km/org-set-refiling-buffer (&optional maxlevel) @@ -525,7 +525,7 @@ beginning of the link." (setq link (concat link slurped) end (match-end 0)) (delete-region beg end) - (insert (org-make-link-string link desc)) + (insert (org-link-make-string link desc)) (goto-char beg) slurped)))) -- cgit v1.2.3