updates
This commit is contained in:
parent
a9252e9ec5
commit
73f1472437
|
|
@ -22,6 +22,7 @@
|
|||
(require 'module-avy)
|
||||
(require 'module-browser)
|
||||
(require 'module-grep)
|
||||
(require 'module-piper)
|
||||
|
||||
(provide 'feature-base)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,19 +8,19 @@
|
|||
|
||||
(require 'module-denote)
|
||||
(require 'module-denote-index)
|
||||
(require 'module-remotefs) ;; depends on alioth for some functions
|
||||
(require 'module-remotefs) ;; depends on remotefs for some functions
|
||||
|
||||
(autoload 'my/denote-create-note "denote" nil t)
|
||||
|
||||
(with-eval-after-load 'denote
|
||||
|
||||
(defvar my/denote-local-notes-directory "~/notes/")
|
||||
(defvar my/denote-remote-notes-directory "~/alioth/notes/")
|
||||
(defvar my/denote-remote-notes-directory "~/eris/notes/")
|
||||
|
||||
(setq denote-directory my/denote-local-notes-directory)
|
||||
|
||||
(defun my/denote-open-or-create ()
|
||||
"Ensure alioth is mounted before creating or opening a note."
|
||||
"Ensure remotefs is mounted before creating or opening a note."
|
||||
(interactive)
|
||||
(ensure-remote-mounted "eris")
|
||||
(let ((target (denote-file-prompt nil nil :no-require-match)))
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
(require 'module-pkg)
|
||||
|
||||
(pkg/require-defer 'magit)
|
||||
(pkg/require 'magit)
|
||||
(pkg/require 'magit-popup)
|
||||
|
||||
(with-eval-after-load 'magit
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
(defun my/visit-todo ()
|
||||
"Visit TODO.org in home."
|
||||
(interactive)
|
||||
(find-file "~/alioth/TODO.org"))
|
||||
(find-file "~/eris/TODO.org"))
|
||||
|
||||
(defun my/kill-all-org-agenda-buffers ()
|
||||
"Close all org-agenda-related buffers."
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
(interactive)
|
||||
(unless org-agenda-files
|
||||
(setq org-agenda-files
|
||||
(list "~/alioth/TODO.org"))))
|
||||
(list "~/eris/TODO.org"))))
|
||||
|
||||
|
||||
;; org-mode general settings
|
||||
|
|
@ -91,13 +91,13 @@
|
|||
;; org-refile settings
|
||||
(setq org-refile-targets
|
||||
'((nil :maxlevel . 9)
|
||||
("~/alioth/TODO.org" :maxlevel . 9))
|
||||
("~/eris/TODO.org" :maxlevel . 9))
|
||||
org-refile-use-outline-path 'file
|
||||
org-refile-allow-creating-parent-nodes 'confirm)
|
||||
|
||||
;; org-capture settings
|
||||
(setq org-capture-templates
|
||||
'(("t" "TODO" entry (file "~/alioth/TODO.org")
|
||||
'(("t" "TODO" entry (file "~/eris/TODO.org")
|
||||
"* TODO %?\n %i" :prepend t)))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
;;; module-piper.el -- piping functions for emacs
|
||||
;;;
|
||||
;;; Commentary:
|
||||
;;; Convenient piping functions for emacs.
|
||||
;;;
|
||||
;;; Code:
|
||||
|
||||
(require 'module-magit)
|
||||
|
||||
(defvar piper-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "<SPC>") 'scroll-up-command)
|
||||
(define-key map (kbd "<DEL>") 'scroll-down-command)
|
||||
(define-key map (kbd "C-|") 'piper-popup)
|
||||
map)
|
||||
"Keymap for `piper-mode'.")
|
||||
|
||||
(define-minor-mode piper-mode
|
||||
"Toggle Filtering mode."
|
||||
;; The initial value.
|
||||
:init-value nil
|
||||
;; The indicator for the mode line.
|
||||
:lighter " |"
|
||||
;; The minor mode bindings.
|
||||
:keymap piper-mode-map
|
||||
:group 'piper)
|
||||
|
||||
(add-to-list 'emulation-mode-map-alists `((piper-mode . ,piper-mode-map)))
|
||||
|
||||
(with-eval-after-load 'magit-popup
|
||||
(magit-define-popup piper-popup
|
||||
"Show popup buffer featuring shell-like piper commands."
|
||||
'piper-commands
|
||||
:actions '((?f "Flush" flush-lines)
|
||||
(?k "Keep" keep-lines)
|
||||
(?c "Cut Columns" columns-lines)
|
||||
(?s "Sort" sort-lines)
|
||||
(?u "Unique Lines" uniquify-lines)
|
||||
(?! "Next Pipe" pipe))
|
||||
:default-action 'pipe))
|
||||
|
||||
(provide 'module-piper)
|
||||
;;; module-piper.el ends here.
|
||||
Loading…
Reference in New Issue