From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gebser@speakeasy.net Newsgroups: gmane.emacs.help Subject: Re: Mode for Manuscripts? Date: Tue, 2 Dec 2003 09:57:38 -0500 (EST) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: Reply-To: gebser@speakeasy.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1070378524 22481 80.91.224.253 (2 Dec 2003 15:22:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2003 15:22:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 02 16:22:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARCLg-00088t-00 for ; Tue, 02 Dec 2003 16:22:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARDHo-0001Zo-GC for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Dec 2003 11:22:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARCyY-0005PL-L7 for help-gnu-emacs@gnu.org; Tue, 02 Dec 2003 11:02:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARCxl-0005IC-Q2 for help-gnu-emacs@gnu.org; Tue, 02 Dec 2003 11:01:52 -0500 Original-Received: from [216.254.0.208] (helo=mail8.speakeasy.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARCve-0004mm-UB for help-gnu-emacs@gnu.org; Tue, 02 Dec 2003 10:59:11 -0500 Original-Received: (qmail 30377 invoked from network); 2 Dec 2003 14:57:39 -0000 Original-Received: from unknown (HELO heidegger.mousecar.net) ([66.93.11.17]) (envelope-sender ) by mail8.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 2 Dec 2003 14:57:39 -0000 Original-To: help-gnu-emacs@gnu.org In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14850 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14850 In hopes that a better understanding of this might move things forward a little, I've posted a bit more on manuscript-mode to . 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 =