emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Alan Dove <alan@dovdox.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode and longlines-mode (especially tables)
Date: Thu, 22 Mar 2007 16:53:12 +0100	[thread overview]
Message-ID: <34679f9877667a84d6fc17eb4ef5510b@science.uva.nl> (raw)
In-Reply-To: <2706EFF0-8539-4A46-8C0A-376A7D44D15C@dovdox.com>


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))

  reply	other threads:[~2007-03-22 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18  1:43 org-mode and longlines-mode (especially tables) Mark Aufflick
2007-03-18  7:07 ` Carsten Dominik
2007-03-19 12:46   ` Alan Dove
2007-03-22 15:53     ` Carsten Dominik [this message]
2007-03-25  1:51       ` Mark Aufflick
2007-03-26 15:34         ` Carsten Dominik
2007-03-26 16:22           ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34679f9877667a84d6fc17eb4ef5510b@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=alan@dovdox.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).