summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp/eltuki.el
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-10-07 13:19:23 +0200
committerGravatar Tom Willemsen2012-10-07 13:19:23 +0200
commitd8ce7b6ccede65bb2e0c6aece9cccee7ecce5f73 (patch)
tree6c193295515156af06d3b3d24d4c331c69ad95bc /.emacs.d/site-lisp/eltuki.el
parent5cfcc802d2e1d71f4cedf0c3eec0e24a95d29c17 (diff)
downloaddotfiles-d8ce7b6ccede65bb2e0c6aece9cccee7ecce5f73.tar.gz
dotfiles-d8ce7b6ccede65bb2e0c6aece9cccee7ecce5f73.zip
.emacs.d/site-lisp/eltuki.el
Diffstat (limited to '.emacs.d/site-lisp/eltuki.el')
-rw-r--r--.emacs.d/site-lisp/eltuki.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/.emacs.d/site-lisp/eltuki.el b/.emacs.d/site-lisp/eltuki.el
index cc5d1b3..4815108 100644
--- a/.emacs.d/site-lisp/eltuki.el
+++ b/.emacs.d/site-lisp/eltuki.el
@@ -84,8 +84,8 @@
(let ((newtime (format-time-string " %s")))
(if (re-search-forward "^#\\+TIMESTAMP:\\(.*\\)$" nil t)
(replace-match newtime nil t nil 1)
- (search-forward "\n\n")
- (backward-char)
+ (when (search-forward "\n\n" nil t)
+ (backward-char))
(insert "#+TIMESTAMP:" newtime "\n")))))
(defun eltuki-get-tags ()
@@ -102,8 +102,8 @@
(goto-char (point-min))
(if (re-search-forward "^#\\+TAGS:\\(.*\\)$" nil t)
(replace-match tags t t nil 1)
- (search-forward "\n\n")
- (backward-char)
+ (when (search-forward "\n\n" nil t)
+ (backward-char))
(insert "#+TAGS:" tags "\n"))))
(defun eltuki-get-status ()
@@ -123,8 +123,8 @@
" draft")))
(if (re-search-forward "^#\\+STATUS:\\(.*\\)$" nil t)
(replace-match newstatus t t nil 1)
- (search-forward "\n\n")
- (backward-char)
+ (when (search-forward "\n\n" nil t)
+ (backward-char))
(insert "#+STATUS:" newstatus "\n")))))
(defun eltuki-get-comment-status ()
@@ -145,8 +145,8 @@
" closed")))
(if (re-search-forward "^#\\+COMMENTSTATUS:\\(.*\\)$" nil t)
(replace-match newstatus t t nil 1)
- (search-forward "\n\n")
- (backward-char)
+ (when (search-forward "\n\n" nil t)
+ (backward-char))
(insert "#+COMMENTSTATUS:" newstatus "\n")))))
(defun eltuki-slugify-string (str)