[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] More problems with orgstruct++-mode, message-mode and auto fill
From: |
Sebastien Vauban |
Subject: |
Re: [O] More problems with orgstruct++-mode, message-mode and auto fill |
Date: |
Thu, 10 May 2012 10:28:07 +0200 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (windows-nt) |
Hi,
Bastien wrote:
> Eric S Fraga <address@hidden> writes:
>>
>> I have emacs-goodies.el installed. What is it about this package that
>> causes problems?
>
> This package contains filladapt.el and filladapt.el _overwrites_ some
> fundamental variables about filling. Even if you are not using filladapt.el,
> it fill replace those variables... which is obvisouly plain wrong.
FWIW, I do use filladapt.el (version 2.12, directly downloaded from the Web,
long time ago), and never experienced troubles yet (in Gnus, with
orgstruct++-mode).
Bastien, you say we should get rid of it, but it seems the reason I have it on
my system is (or was) because "it does a better job than Emacs builtin
Adaptative Fill mode". Anybody: any comment on this?
#+begin_src emacs-lisp
;; enable FillAdapt (does a better job than Emacs builtin Adaptative
;; Fill mode)
(autoload 'turn-on-filladapt-mode "filladapt"
"Unconditionally turn on Filladapt mode in the current buffer.")
(autoload 'turn-off-filladapt-mode "filladapt"
"Unconditionally turn off Filladapt mode in the current buffer.")
(defun my/enable-filling ()
"Enable AutoFill and FillAdapt minor modes."
;; when inserting text, *automatically* break line at a previous
;; space, if the current column number is greater than the value of
;; `fill-column'
(turn-on-auto-fill)
;; turn on FillAdapt mode everywhere but in ChangeLog files
(cond ((equal mode-name "Change Log") t)
(t (turn-on-filladapt-mode))))
;; enable AutoFill and FillAdapt in Text and Org modes
(add-hook 'text-mode-hook 'my/enable-filling)
(add-hook 'org-mode-hook 'my/enable-filling)
#+end_src
In Gnus, this is my config:
#+begin_src emacs-lisp
;; operates on messages you send
(defun my/message-mode-hook ()
;; tab completion for alias in `.mailrc'
(local-set-key (kbd "<M-tab>") 'mail-abbrev-complete-alias)
;; enable automatic word-wrap when composing messages
(setq fill-column 78)
(turn-on-auto-fill)
(when (locate-library "org.el")
;; turn on the `org-mode' table editor
(turn-on-orgtbl)
;; turn on (the enhanced version of) orgstruct-mode
(turn-on-orgstruct++)
;; make `orgstruct-hijacker-command-22' rebind `M-q' to a message
;; specific function to fill a paragraph
(setq fill-paragraph-function 'message-fill-paragraph))
(when (locate-library "auto-complete.el")
(auto-complete-mode)))
(add-hook 'message-mode-hook 'my/message-mode-hook)
#+end_src
Notice that I had to add:
#+begin_src emacs-lisp
;; make `orgstruct-hijacker-command-22' rebind `M-q' to a message
;; specific function to fill a paragraph
(setq fill-paragraph-function 'message-fill-paragraph)
#+end_src
a couple of weeks ago, because the filling did not behave anymore like it did.
Best regards,
Seb
--
Sebastien Vauban
Re: [O] More problems with orgstruct++-mode, message-mode and auto fill, Bastien, 2012/05/09