unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: gebser@speakeasy.net
Subject: Re: Mode for Manuscripts?
Date: Tue, 2 Dec 2003 09:57:38 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0312020954140.3010-100000@heidegger.mousecar.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0311300828250.3010-100000@heidegger.mousecar.net>


In hopes that a better understanding of this might move things forward a 
little, I've posted a bit more on manuscript-mode to 
<http://www.emacswiki.org/cgi-bin/wiki/WiKen>.


At 12:15 (UTC-0500) on Sun, 30 Nov 2003 gebser@speakeasy.net said:

= 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
= 
= 
= 
= 
= _______________________________________________
= Help-gnu-emacs mailing list
= Help-gnu-emacs@gnu.org
= http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
= 

  reply	other threads:[~2003-12-02 14:57 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 [this message]
     [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

  List information: https://www.gnu.org/software/emacs/

* 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.0312020954140.3010-100000@heidegger.mousecar.net \
    --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.
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).