it would be nice to be able to navigate directly to the title, category, etc. headers in an org2blog buffer. something similar is done by the ancient post.el mode i used to use with mutt:
(defun header-position-on-value ()
"Go to the start of the value part of a header."
;; XXX - Should make sure we stay on line.
(defun header-goto-field (field)
"Go to FIELD of a header."
(let ((case-fold-search t))
(when (re-search-forward (concat "^($|" field ": )"))
(if (looking-at "^$")
(insert-string field ": \n")
(defmacro define-header-goto (name header)
"Define functions called NAME to go to HEADER."
`(defun ,name ()
,(concat "Position the cursor on the " header ": header.")
(define-header-goto header-goto-to "To")
(define-header-goto header-goto-cc "Cc")
(define-header-goto header-goto-fcc "Fcc")
(define-header-goto header-goto-summary "Summary")
(define-header-goto header-goto-keywords "Keywords")
(define-header-goto header-goto-subject "Subject")
(define-header-goto header-goto-bcc "Bcc")
(define-header-goto header-goto-reply-to "Reply-To")
(define-header-goto header-goto-from "From")
my regex parsing is poor esp. in lisp but something like this shd work i think:
(when (re-search-forward (concat "^\($\|" field ": \)"))
(when (re-search-forward (concat "^\($\|+#" field ": \)"))
& then define appropriate functions and keybindings -- i'm not sure, what do you think would be good values for the latter?
as i say, wishlist only.
Thanks for the idea. I like it.
Do you think it would be nice to propose this for org-mode? (Org-mode already has completion for the headers with M-TAB and this works in org2blog, too obviously)
hmm, that does sound like good idea. if i haven't proposed this on the list in 2 weeks get back to me? I'm a bit strung out writing a grant proposal till the 23rd. thanks, best,
Ok! Sounds good!
Just a reminder. :)
Closing as won't fix for now.
Feel free to re-open, though.