From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: More problems with orgstruct++-mode, message-mode and auto fill Date: Thu, 10 May 2012 10:28:07 +0200 Message-ID: <80vck4o2y0.fsf@somewhere.org> References: <87fwb91eju.fsf@norang.ca> <87fwb9i2so.fsf@googlemail.com> <87obpwlu1m.fsf@ucl.ac.uk> <87fwb8czl4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi, Bastien wrote: > Eric S Fraga 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 "") '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