You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.7 KiB
EmacsLisp
47 lines
1.7 KiB
EmacsLisp
(defun dwpost (psubject)
|
|
(interactive "MPost title (REQUIRED): ")
|
|
(setq org-export-with-author 'nil)
|
|
(setq org-export-with-creator 'nil)
|
|
(setq org-export-with-date 'nil)
|
|
(setq org-export-with-section-numbers 'nil)
|
|
(setq org-export-time-stamp-file 'nil)
|
|
(setq org-export-with-toc 'nil)
|
|
(setq org-html-validation-link 'nil)
|
|
(org-html-export-to-html)
|
|
(defvar newname (concat (file-name-base) ".html"))
|
|
(find-file-noselect newname)
|
|
(with-current-buffer newname
|
|
(goto-line 1)
|
|
(delete-region (line-beginning-position) (line-end-position))
|
|
(write-file newname))
|
|
(kill-buffer newname)
|
|
(compose-mail "tobli+0397@post.dreamwidth.org" psubject)
|
|
(with-current-buffer "*unsent mail to tobli*"
|
|
(insert-file-contents newname)
|
|
(message-send-and-exit))
|
|
(kill-buffer "*sent mail to tobli*"))
|
|
|
|
(defun dwpost-public (psubject)
|
|
(interactive "MPost title (REQUIRED): ")
|
|
(setq org-export-with-author 'nil)
|
|
(setq org-export-with-creator 'nil)
|
|
(setq org-export-with-date 'nil)
|
|
(setq org-export-with-section-numbers 'nil)
|
|
(setq org-export-time-stamp-file 'nil)
|
|
(setq org-export-with-toc 'nil)
|
|
(setq org-html-validation-link 'nil)
|
|
(org-html-export-to-html)
|
|
(defvar newname (concat (file-name-base) ".html"))
|
|
(find-file-noselect newname)
|
|
(with-current-buffer newname
|
|
(goto-line 1)
|
|
(delete-region (line-beginning-position) (line-end-position))
|
|
(write-file newname))
|
|
(kill-buffer newname)
|
|
(compose-mail "tobli+0397@post.dreamwidth.org" psubject)
|
|
(with-current-buffer "*unsent mail to tobli*"
|
|
(insert "post-security: public\n\n")
|
|
(insert-file-contents newname)
|
|
(message-send-and-exit))
|
|
(kill-buffer "*sent mail to tobli*"))
|