From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: hack writer Newsgroups: gmane.emacs.help Subject: Markup formatting during keyboard input depending on template Date: Wed, 17 Sep 2014 14:33:53 +0200 Message-ID: <938a32604135eca2f76e2992e8e6f45e@bookhacker.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1410988790 1557 80.91.229.3 (17 Sep 2014 21:19:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Sep 2014 21:19:50 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 17 23:19:44 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XUMdc-00059T-Pd for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Sep 2014 23:19:44 +0200 Original-Received: from localhost ([::1]:47314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUMdc-0003jr-Bx for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Sep 2014 17:19:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUEQx-0003HL-F8 for help-gnu-emacs@gnu.org; Wed, 17 Sep 2014 08:34:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUEQp-0000ui-B0 for help-gnu-emacs@gnu.org; Wed, 17 Sep 2014 08:34:07 -0400 Original-Received: from pluto.manitu.net ([217.11.48.9]:46985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUEQp-0000tp-4k for help-gnu-emacs@gnu.org; Wed, 17 Sep 2014 08:33:59 -0400 Original-Received: by pluto.manitu.net (Postfix, from userid 81) id 26A9DC8013; Wed, 17 Sep 2014 14:33:53 +0200 (CEST) X-PHP-Originating-Script: 1000:func.inc Original-Received: from p57B41F1D.dip0.t-ipconnect.de ([87.180.31.29]) by webmail02.manitu.de with HTTP (HTTP/1.1 POST); Wed, 17 Sep 2014 14:33:53 +0200 X-Sender: GNU@bookhacker.org User-Agent: RoundCube Webmail/0.2-beta X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.11.48.9 X-Mailman-Approved-At: Wed, 17 Sep 2014 17:19:30 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99985 Archived-At: Hi everyone, I hope this is the right place to get some help writing an Emacs mode. I would like to create a mode that behaves the following way: When starting a new paragraph, Emacs asks in a buffer window, which template to use: buffer window: 1 - standard (default) 2 - person 3 - insertion 4 - location 5 - header Just selects 1 - standard (default). Whenever two captital letters are put in, everything till the next space or line ending should be in capitals: PErson -> PERSON PErson NAmed CHuck -> PERSON NAMED CHUCK The standard-template works something like this: A standard paragraph starts with a person. After the person, there may or may not follow some (): If (), then follows a line break: input (note the missing ): PErson(doing something).bla bla bla. output: PERSON (doing something). bla bla bla. If no (): input: PErson.bla bla bla. output: PERSON. bla bla bla. For demonstrating what should happened depending on the chosen template, here are some sample inputs: Choose "1 - standard" + input: PErson(doing something. Something else. Something else).bla bla blabla bla blabla bla bla. should become: output: PERSON (doing something. Something else. Something else). bla bla bla bla bla bla bla bla bla. Choose "2 - person" + input: Description of a place. PErson NAmed CHuck walks around the corner. output: Description of a place. PERSON NAMED CHUCK walks around the corner. Choose "3 - insertion" + input: Something happens. Something can be heard. Something can be seen. output: (Something happens. Something can be heard. Something can be seen.) Note: Depending on the selected template, a paragraph ends with or . The final markup file (html, xml, whatever) should be used in LibreOffice for further processing. I already wrote an Emacs mode some time ago. Very simple thing. But with this here, I would be grateful for every hint you can offer (even if it's only an other place where I can discuss this). Thank you, hack