From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: how to handle rtf Date: Thu, 31 Jul 2014 08:02:06 -0700 (PDT) Message-ID: References: <4edddfc4-a498-41de-810f-a8f9c8514653@googlegroups.com> <87ha205czm.fsf@debian.uxu> <81e60be0-a23f-4f18-9505-8b861f55bbf8@googlegroups.com> <87tx5ytu21.fsf@debian.uxu> <02986f99-bb2d-4ef9-b07d-eb61f478f9a3@googlegroups.com> <091f7037-8acb-4253-9b65-7761d47badfa@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1406819135 15618 80.91.229.3 (31 Jul 2014 15:05:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2014 15:05:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 17:05:29 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 1XCrv4-00088r-3M for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 17:05:26 +0200 Original-Received: from localhost ([::1]:57160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCrv3-0002GV-Lk for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 11:05:25 -0400 X-Received: by 10.42.209.140 with SMTP id gg12mr13124964icb.26.1406818927435; Thu, 31 Jul 2014 08:02:07 -0700 (PDT) X-Received: by 10.182.249.108 with SMTP id yt12mr9431obc.17.1406818927290; Thu, 31 Jul 2014 08:02:07 -0700 (PDT) Original-Path: usenet.stanford.edu!h18no11372836igc.0!news-out.google.com!px9ni1igc.0!nntp.google.com!h18no7111103igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <091f7037-8acb-4253-9b65-7761d47badfa@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.28.78; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.28.78 User-Agent: G2/1.0 Injection-Date: Thu, 31 Jul 2014 15:02:07 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:206753 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:99029 Archived-At: On Thursday, July 31, 2014 6:45:40 PM UTC+5:30, renato.p...@gmail.com wrote= : > Il giorno gioved=EC 31 luglio 2014 12:30:02 UTC+2, Rusi ha scritto: > > On Thursday, July 31, 2014 3:33:26 PM UTC+5:30, renato wrote: > > > I try to explain, why do I do I need to use .rtf, and why do I'd like= to do with emacs: > > > In the company where I work, I have to open rtf files, insert some te= xt (plain text), save it, upload on a server, that will elaborate that file= , replace the text tha I've inserted (that is a a variable name) with the = content of the variable. > > > The prob to use MS Word or LO, is that, when I open this file with th= is program, the insert some rtf code, that let the server app not to proces= s the replacement. (i.e., my program look for [**VARIABLE_NAME**] and repla= ces it with the real content of the variable), but, when I save from MS or = LO, my variable will be corrupted (i.e., is no more [**VARIABLE_NAME**-], b= ut... [**VAR(\hich\af1\dbch\af37\loch\f1_IABLE_NAME**]) > > > of course, in this way, my parser, will not recognize the variable na= me. > > > So, my prob is to try to edit this rtf in the more plain text as poss= ible. But, not be confused, with the .rtf code. > > > This is why, I'm lookin for sothings that let me edit .rtf in emacs, = but with sothings that let me read without the rtf code. > > > Have I been more clear? > > Yes > > You need to clarify one important thing: How much of the 'r' in the 'rt= f' > > (aka the formatting) you really need. > > It appears from your description to be very little or none at all. > > In which case saving (from MSO or LO) as (plain not rich) text and work= ing with > > that would be the natural way. After that munging that text-file in em= acs or > > python or ... is a different question. > > If however you *do* need the formatting one way that comes to mind offh= and is: > > Use org mode and the odt exporter. > > In general, rtf is nominally text with 'richness' ie formatting. > > However the formatting is WAY WAY too much for you to be able to do nor= mal > > text processing on it and maintain your sanity > I need many 'r'... > the doc, are normaly .doc text. Imean: > - formatting (text, tab, margin...etc) > - fonts > -etc. > I need to format in .rtf, because: > - it is well formatted text > - are plain text > - the parser can find e subsiuite variable > I cannot use other format, because the server side application, already u= se this format (because, is text format, and can also support formatting). > So you tell me to look at org-mode? > wich package can I use in org mode? I am not sure that this will be at all easy Its just that its probably easier than what you were earlier trying. 1. You will need to install a recent org mode (into emacs). 2. Make a text file with some minimal formatting 3. Then exercise the odt exporter 4a. Use LO to convert the odt file to rtf. Check that it works for you 4b. Then try these instructions to export directly from emacs to rtf http://orgmode.org/manual/Extending-ODT-export.html It may be a good idea to get onto the orgmode mailing list http://orgmode.org/community.html=20 [I know very little of this so dont expect much help from me ;-) ]