all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gebser@speakeasy.net
Cc: help-gnu-emacs@gnu.org
Subject: Re: Mode for Manuscripts?
Date: Sun, 30 Nov 2003 12:15:25 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0311300828250.3010-100000@heidegger.mousecar.net> (raw)
In-Reply-To: <uad6es4z6.fsf@elta.co.il>

At 09:14 (UTC+0200) on 30 Nov 2003 Eli Zaretskii said:

= > From: gebser@speakeasy.net
= > Newsgroups: gnu.emacs.help
= > Date: Sat, 29 Nov 2003 23:11:10 -0500
= > 
= > ...
= 
= Does it take anything beyond binding RET to a function that inserts a
= newline and then calls newline-and-indent?
= 
= ...

Yes, I think it would.  Here's (most of) the original posting of the
question again (and how the text should look in emacs):

...

     Here are the specifications explicitly stated: Text must be

double-spaced. Owing to the need for margins, text should wrap. There 

should be one space, not two, between sentences. Automatic tabs to 

indicate breaks between paragraphs. I think by this they mean a ^I 

character must begin a paragraph. Use regular double spaces between 

paragraphs (as you see here at the beginning and end of paragraphs. Use

only one space, not two spaces, between sentences.

     So does such a mode already exist for emacs? Of course I'd want C-n

and C-p to move the cursor to a text line and not to a blank line in

between text lines. I know that "pr -d" will do the double-spacing for

me after I write up the whole thing, but it would be nicer for emacs to

do the double-spacing for me as I go along. The M-a and M-e keys should

get me to the beginning and end of sentences and M-q should reformat 

stuff I screw up by editing.

     Finally, it would be best to have a separate (minor?) mode for this

sort of format-- this, so I wouldn't have to set and unset a lot of 

variables every time I go in and out of editing in this mode.

...

I found paragraph-indent-text-mode, copied it into .emacs, and modified 
it so:

(defun paragraph-indent-text-mode ()
  "Major mode for editing text, with leading spaces starting a 
paragraph.
In this mode, you do not need blank lines between paragraphs
when the first line of the following paragraph starts with whitespace.
Special commands:
\\{text-mode-map}
Turning on Paragraph-Indent Text mode runs the normal hooks
`text-mode-hook' and `paragraph-indent-text-mode-hook'."
  (interactive)
  (kill-all-local-variables)
  (use-local-map text-mode-map)
  (setq mode-name "Parindent")
  (setq major-mode 'paragraph-indent-text-mode)
  (setq local-abbrev-table text-mode-abbrev-table)
  (setq sentence-end "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*")
  (setq sentence-end-double-space' nil)
  (setq paragraph-start "\t.+$")
  (setq paragraph-separate "\n\n\t")
  (set-syntax-table text-mode-syntax-table)
  (run-hooks 'text-mode-hook 'paragraph-indent-text-mode-hook))

However, M-a and M-e will go to locations which aren't really the 
begin/end of sentences, where the word following punctuation isn't 
capitalized such as "foo, etc.) bar" where "bar" isn't the begin of a 
new sentence.  Can't we specify that the begin of a sentence should be 
an uppercase character?  How?  (Regexps baffle me sometimes.)

Also my defs for paragraph-start and paragraph-separate don't work;  
ESC-{ and ESC-} move the cursor to the begin and end of the file
respectively.  I'm guessing this is the reason that M-q turns a lot of
(tab-indented) paragraphs into one, big paragraph.  The Info on these
variables demands too much of my pre-mavenistic understanding.

To reply to Eli's question specifically, given that I'm looking for 
double-line spacing ("blank" lines in between text lines), I don't think 
it would be enough to remap RET to RET RET TAB because this would insert 
blank lines only between paragraphs, not between every line of text.  
Can emacs even do double-line spacing at all?


Anyone know how to get at this mode?


tia,
ken

  reply	other threads:[~2003-11-30 17:15 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 [this message]
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
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.0311300828250.3010-100000@heidegger.mousecar.net \
    --to=gebser@speakeasy.net \
    --cc=help-gnu-emacs@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 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.