Move commands from zim.el to the Org config

This commit is contained in:
Gergely Polonkai 2018-07-30 19:53:54 +02:00
parent 86bd417b99
commit dea44d7d39
3 changed files with 24 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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"))))