Move commands from zim.el to the Org config
This commit is contained in:
parent
86bd417b99
commit
dea44d7d39
@ -629,6 +629,30 @@ Copied from https://ryuslash.org/posts/C-d-to-close-eshell.html
|
||||
(message "I will zone out after idling for 60 seconds."))
|
||||
#+END_SRC
|
||||
|
||||
** Utility functions for editing Zim wiki files
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun zim-timestamp ()
|
||||
(with-temp-buffer
|
||||
(insert (format-time-string "%Y-%m-%dT%H:%M:%S%z"))
|
||||
(forward-char -2)
|
||||
(insert ":")
|
||||
(buffer-string)))
|
||||
|
||||
(defun insert-zim-timestamp ()
|
||||
(interactive)
|
||||
(insert (zim-timestamp)))
|
||||
|
||||
(defun insert-zim-header ()
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(insert
|
||||
(concat "Content-Type: text/x-zim-wiki\n"
|
||||
"Wiki-Format: zim 0.4\n"
|
||||
"Creation-Date: " (zim-timestamp) "\n\n"))))
|
||||
#+END_SRC
|
||||
|
||||
* UI preferences
|
||||
|
||||
** Tweak window chrome
|
||||
|
1
init.el
1
init.el
@ -28,7 +28,6 @@
|
||||
;; Load my own functions
|
||||
(load "gnu-c-header")
|
||||
(load "round-number-to-decimals")
|
||||
(load "zim")
|
||||
(load "window-manip")
|
||||
|
||||
;; From gmane.emacs.orgmode
|
||||
|
19
lisp/zim.el
19
lisp/zim.el
@ -1,19 +0,0 @@
|
||||
(defun zim-timestamp ()
|
||||
(with-temp-buffer
|
||||
(insert (format-time-string "%Y-%m-%dT%H:%M:%S%z"))
|
||||
(forward-char -2)
|
||||
(insert ":")
|
||||
(buffer-string)))
|
||||
|
||||
(defun insert-zim-timestamp ()
|
||||
(interactive)
|
||||
(insert (zim-timestamp)))
|
||||
|
||||
(defun insert-zim-header ()
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(insert
|
||||
(concat "Content-Type: text/x-zim-wiki\n"
|
||||
"Wiki-Format: zim 0.4\n"
|
||||
"Creation-Date: " (zim-timestamp) "\n\n"))))
|
Loading…
Reference in New Issue
Block a user