emacsweblogs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacsweblogs] Formatting hooks for weblogger.el (was Re: Strange behavi


From: Mark A. Hershberger
Subject: [Emacsweblogs] Formatting hooks for weblogger.el (was Re: Strange behavior with wordpress)
Date: Thu, 19 Jul 2012 07:41:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0

Since this isn't really documented, I thought I would share what my own
configuration is.  This is how I have Emacs configured to automatically
set the mode for typing up weblog entries:

(defun mah/weblogger-setup ()
  (flyspell-mode 1)
  (flyspell-buffer)         ; spell check the fetched post
  (auto-fill-mode -1)       ; Turn off hard word-wrap
  (visual-line-mode 1))     ; Tell Emacs to do soft word-wapping

(defun mah/weblogger-publish-hook ()
  (when visual-line-mode    ; Turn soft word-wrapping off so the text
    (visual-line-mode -1))  ; we send doesn't have stray n/ls
  ;; tabs might spoil code indentation
  (untabify (point-min) (point-max)))

(defun mah/weblogger-publish-end-hook ()
  (visual-line-mode 1))

(add-hook 'weblogger-publish-entry-end-hook
          'mah/weblogger-publish-end-hook)
(add-hook 'weblogger-publish-entry-hook 'mah/weblogger-publish-hook)
(add-hook 'weblogger-start-edit-entry-hook 'mah/weblogger-setup)


-- 
http://hexmode.com/

Find peace within yourself and there will be peace on heaven and
    earth.  -- Abba Isaac



reply via email to

[Prev in Thread] Current Thread [Next in Thread]