This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-auto-export-project () | |
(let ((project | |
(catch 'is-project-dir | |
(dolist (each-project org-publish-project-alist) | |
(if (string-match | |
(expand-file-name (plist-get (cdr each-project) :base-directory)) | |
(expand-file-name buffer-file-name)) | |
(throw 'is-project-dir (car each-project))))))) | |
(if project | |
(save-excursion (org-publish-project project))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ============================================================ | |
;; | |
;; sudo completion | |
;; | |
;; ============================================================ | |
(defun pcomplete/sudo () | |
"Completion rules for the `sudo' command." | |
(let ((pcomplete-ignore-case t)) | |
(pcomplete-here (funcall pcomplete-command-completion-function)) | |
(cond ((pcomplete-test "pacman") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; another eshell/bmk | |
(defun pcomplete/eshell-mode/bmk () | |
"Completion for `bmk'" | |
(pcomplete-opt "adl") | |
(pcomplete-here (bookmark-all-names))) | |
(defun show-bmk-list () | |
"Show the registed bookmark list and each corresponding path" | |
(let (output-string bmk-name bmk-path (each-format "%-15s|%-5s|%s |