Fix field addition when using rst.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 18 Jun 2017 19:08:42 +0000 (21:08 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 18 Jun 2017 19:08:42 +0000 (21:08 +0200)
pelican-mode.el

index 15db6cf6bf48006db64715024514be8b4d638e20..fe4eea0bed0220713c94a9b7d1a04d6698f158bc 100644 (file)
 
 (defun pelican-set-field (field value)
   "Set FIELD to VALUE."
+  (interactive "sField: \nsValue: ")
   (save-excursion
     (goto-char 0)
     (if (re-search-forward (concat "^" (pelican-field field ".+*")) nil t)
         (replace-match (pelican-field field value))
+      (re-search-forward "#")
+      (forward-line 2)
       (re-search-forward "^$")
       (replace-match (pelican-field field value)))))
 
 (defun pelican-set-title (title)
   "Set the title to TITLE."
+  (interactive "sTitle: ")
   (if (pelican-is-markdown)
       (pelican-set-field "title" title)
     (save-excursion