all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gebser@speakeasy.net
Subject: Re: Mode for Manuscripts?
Date: Thu, 18 Dec 2003 07:46:15 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0312180244530.23118-100000@www> (raw)
In-Reply-To: <87hdzz18f0.fsf@emptyhost.emptydomain.de>


At 20:44 (UTC-0000) on Wed, 17 Dec 2003 Kai Grossjohann said:

= gebser@speakeasy.net writes:
= 
= > Sure....
= 
= Maybe you could play with format-alist to frob the file contents on
= the way from file to Emacs and back.  That way, you wouldn't see the
= double newlines, but they'd be in the file.

I think you're saying that the formatting of the text would change
between disk and buffer.  This is an acceptable hack and seems to be the
most promising (most easily implementable) way to go about this.  
Because I'd use paragraph-indent-mode after the file's first ~30 words,
format-alist shouldn't have a difficult time understanding what the file
is supposed to be.


= 
= In order to see double newlines, I would if it might work to use
= something similar to font-lock to place overlays on every newline with
= a before-string or after-string property containing one or two
= newlines.  I never tried, so I don't know if it works.

I've used font-lock, but never poked around in the code for it.  Doing
that for this sort of file format would get pretty tricky-- at least for
an elisp neophyte like myself.  But it sounds-- on the face of it-- like
it would address the issue at the level of coding where it should be
addressed-- at least insofar as emacs can address it.


= Hm.  I guess it would be really difficult to change Emacs in such a
= way that M-q and friends and auto-fill do what you want for
= double-spaced files.

I've done enough C to say that writing the code to do the work of
fill-region in double-line-spacing wouldn't be too hard at all.
Unfortunately, the C code for such a function would be worthless for
emacs (yes?).  Getting the double-line-spaced text to snake down and up
the page as editing added and deleted text would involve essentially the
same code, but invoked after every text-insertion and -deletion.  Still
not a huge mountain to climb-- but still useless to emacs if done in C 
(or so I'm guessing).



= Hm.  Isn't there a way to tweak the distance between baselines in
= Emacs?  That would enable people to have the look of double-space
= without actually having two consecutive newlines in the buffer.  Then
= format-alist could add the newlines to the files.

Poking around in the code, I found a variable for this, called
dbl-space, But this is a non-solution.  Simply having the text look like
it's double-line-spaced would be of no use.  Once completed, the
manuscript file would either be printed and snail-mailed or directly
emailed to an editor (the human kind).  This ultimate destination is
where the formatting actually matters.  And in either case, the line
spacing would be lost in the transition.


Kai,

Thanks much for your reply and suggestions.  I hope that, despite the
difficulties, it's still possible to make something come of all this.



Regards,
ken

  reply	other threads:[~2003-12-18 12:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.794.1070142961.399.help-gnu-emacs@gnu.org>
2003-11-30  1:22 ` Mode for Manuscripts? Dan Anderson
2003-11-30  4:11   ` gebser
2003-11-30  7:14     ` Eli Zaretskii
2003-11-30 17:15       ` gebser
2003-12-02 14:57         ` gebser
     [not found]     ` <mailman.809.1070180065.399.help-gnu-emacs@gnu.org>
2003-12-01 13:52       ` giacomo boffi
2003-12-17 20:44     ` Kai Grossjohann
2003-12-18 12:46       ` gebser [this message]
2003-12-01 19:29 ` Stefan Monnier
2003-12-03 16:48 ` Rob Thorpe
2003-12-03 17:22   ` Stefan Monnier
2003-12-05  9:20     ` Rob Thorpe
     [not found] <mailman.464.1072103900.868.help-gnu-emacs@gnu.org>
2003-12-22 16:44 ` Kai Grossjohann
     [not found] <mailman.251.1071755300.868.help-gnu-emacs@gnu.org>
2003-12-18 18:24 ` Kai Grossjohann
2003-12-22 13:36   ` gebser
2003-11-29 20:53 gebser
2003-11-30  1:33 ` Peter S Galbraith
2003-11-30  4:14   ` gebser

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

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

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0312180244530.23118-100000@www \
    --to=gebser@speakeasy.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.