projects
/
pelican-mode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
05e7356
)
Fix field addition when using rst.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Sun, 18 Jun 2017 19:08:42 +0000
(21:08 +0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Sun, 18 Jun 2017 19:08:42 +0000
(21:08 +0200)
pelican-mode.el
patch
|
blob
|
history
diff --git
a/pelican-mode.el
b/pelican-mode.el
index
15db6cf
..
fe4eea0
100644
(file)
--- a/
pelican-mode.el
+++ b/
pelican-mode.el
@@
-103,15
+103,19
@@
(defun pelican-set-field (field value)
"Set FIELD to VALUE."
(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))
(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."
(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
(if (pelican-is-markdown)
(pelican-set-field "title" title)
(save-excursion