Damn - defadvice is way cool! I do similar AOP-style things in Perl, but nothing that clean or simple.
Having said that, it doesn't seem effective for me. It compiles fine (in my .emacs), but there is no change in functionality. I tried with org-mode 4.6.7 and then upgraded to .9. gnu emacs 22.0.94.1 I'm not familiar with the calling syntax of defadvice, so I'll keep playing. Thanks very much for the code. Mark. On 3/23/07, Carsten Dominik <[EMAIL PROTECTED]> wrote:
On Mar 19, 2007, at 13:46, Alan Dove wrote: > Hey, folks: > > I've also been using org-mode with longlines-mode, and had noticed > that the two occasionally conflict. I've just developed workarounds > for the bugs that affect me, mostly inserting extra carriage returns > here and there to ensure the right line breaks for org-mode. Carsten, > if you have the option of minimizing these conflicts, that would be > great. I think this is really really hard. Basically, I would have to change all places where Org-mode inserts newlines that should be hard. Hmmm, maybe all newlines that org-mode inserts during internal commands should be hard? In this case, a brute-force solution might do the trick. This is not well tested, but it does make tables work as long as they are not broader than fill column: (defadvice insert (around make-org-mode-newlines-hard activate) "Make sure all org-mode functions insert hard newlines." (if (and (eq major-mode 'org-mode) (boundp 'longlines-mode) longlines-mode (equal "org-" (substring (symbol-name this-command) 0 4))) (let ((_beg (point))) ad-do-it (longlines-decode-region _beg (point))) ad-do-it)) (defadvice insert-before-markers (around make-org-mode-newlines-hard activate) "Make sure all org-mode functions insert hard newlines." (if (and (eq major-mode 'org-mode) (boundp 'longlines-mode) longlines-mode (equal "org-" (substring (symbol-name this-command) 0 4))) (let ((_beg (point))) ad-do-it (longlines-decode-region _beg (point))) ad-do-it)) _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
-- Mark Aufflick e: [EMAIL PROTECTED] w: mark.aufflick.com p: +61 438 700 647 f: +61 2 9436 4737 _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode