From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Re: monospace (=) and quotes not getting along Date: Thu, 25 Aug 2011 20:53:45 -0700 (PDT) Message-ID: <1314330825.88981.YahooMailNeo@web161908.mail.bf1.yahoo.com> References: <1314309753.93337.YahooMailNeo@web161917.mail.bf1.yahoo.com> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-972816286-1314330825=:88981" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwnUK-0003BS-JG for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 23:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwnUJ-0007HA-6a for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 23:53:48 -0400 Received: from nm2.bullet.mail.bf1.yahoo.com ([98.139.212.161]:34213) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QwnUI-0007Gu-Th for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 23:53:47 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Gauland , "emacs-orgmode@gnu.org" --0-972816286-1314330825=:88981 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Michael Gauland wrote:=0A=0A> Michael Hannon = yahoo.com> writes:=0A> =0A> > To define =3Dmy_frabbitz=3D i= n this model, we issue the command:=0A> >=A0=A0=A0 =3D> my_frabbitz =3D "so= meRandomWord"=3D=0A> > The "my_frabbitz" in the sentence comes out in monos= pace, but the=0A> > R codedoesn't.=A0 It seems that the quotation marks are= killing the process.=0A> =0A> I don't remember why this happens, but I've = dealt with it by inserting a null=0A> between the quote and the equals. I u= se export hooks to remove the null from=0A> the=0A> exported HTML and LaTeX= files:=0A> =0A> =0A> (add-hook 'org-export-latex-final-hook=0A>=A0=A0=A0= =A0=A0=A0 (lambda ()=0A>=A0=A0=A0=A0=A0=A0=A0=A0 (goto-char (point-min))=0A= >=A0=A0=A0=A0=A0=A0=A0=A0 (while (re-search-forward "^@" nil t)=0A>=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 (replace-match "")=0A>=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 )=0A>=A0=A0=A0=A0=A0=A0=A0=A0 )=0A>=A0=A0=A0=A0=A0=A0 )=0A> (add-hook '= org-export-html-final-hook=0A>=A0=A0=A0=A0=A0=A0 (lambda ()=0A>=A0=A0=A0=A0= =A0=A0=A0=A0 (goto-char (point-min))=0A>=A0=A0=A0=A0=A0=A0=A0=A0 (while (re= -search-forward "^@" nil t)=0A>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (replace-matc= h "")=0A>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 )=0A>=A0=A0=A0=A0=A0=A0=A0=A0 )=0A>= =A0=A0=A0=A0=A0=A0 )=0A=0AHi, Mike.=A0 I was going to object that this was = a dangerous approach in my=0Asituation, as I intend to pass the .org file o= n to someone else after I've=0Arevised it, and there'd be no way to guarant= ee that "future generations" would=0Ahave the same hooks defined.=0A=0ANeve= rtheless, I tried inserting ^@ as you suggested and then exporting to=0AHTM= L, WITHOUT defining the hooks, just to see what would happen.=A0 The answer= =0Ais that the HTML document looked just fine!=A0 (This is with Org-mode ve= rsion=0A7.7 on Emacs 23.2.1 on 64-bit linux.)=0A=0AI don't know if this mat= ters, but I placed the LHS and RHS of the R expression=0Aon different, cons= ecutive lines, as:=0A=0A=A0=A0=A0 =3D> someVar =3D=3D=0A=A0=A0=A0 =3D^@"som= eString"^@=3D=0A=0AIn HTML these are glommed together anyway.=0A=0AI really= appreciate your suggestion.=A0 And, if anybody asks me, I'll be=0Arecommen= ding you for a MacArthur award.=0A=0A-- Mike --0-972816286-1314330825=:88981 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Michael Gauland <mikelygee@no8w= ireless.co.nz> wrote:

> Michael Hannon <jm_hannon <at>= ; yahoo.com> writes:
>
> > To define =3Dmy_frabbitz=3D i= n this model, we issue the command:
> >    =3D> = my_frabbitz =3D "someRandomWord"=3D
> > The "my_frabbitz" in the s= entence comes out in monospace, but the
> > R codedoesn't.  I= t seems that the quotation marks are killing the process.
>
> = I don't remember why this happens, but I've dealt with it by inserting a nu= ll
> between the quote and the equals. I use export hooks to remove t= he null from
> the
> exported HTML and LaTeX files:
> >
> (add-hook 'org-export-latex-final-hook
>  &n= bsp;    (lambda ()
>         (goto-char (poi= nt-min))
>         (while (re= -search-forward "^@" nil t)
>      &nbs= p;    (replace-match "")
>    &nbs= p;      )
>     &nb= sp;   )
>       )
> (ad= d-hook 'org-export-html-final-hook
>     &nb= sp; (lambda ()
>         (got= o-char (point-min))
>        = (while (re-search-forward "^@" nil t)
>     = ;      (replace-match "")
>   = ;        )
>   &nbs= p;     )
>       )

Hi, Mike.  I w= as going to object that this was a dangerous approach in my
situation, a= s I intend to pass the .org file on to someone else after I've
revised i= t, and there'd be no way to guarantee that "future generations" would
ha= ve the same hooks defined.

Nevertheless, I tried inserting ^@ as you= suggested and then exporting to
HTML, WITHOUT defining the hooks, just = to see what would happen.  The answer
is that the HTML document loo= ked just fine!  (This is with Org-mode version
7.7 on Emacs 23.2.1 = on 64-bit linux.)

I don't know if this matters, but I placed the LHS= and RHS of the R expression
on different, consecutive lines, as:
    =3D> someVar =3D=3D
    =3D^@"some= String"^@=3D

In HTML these are glommed together anyway.

I rea= lly appreciate your suggestion.  And, if anybody asks me, I'll be
recommending you for a MacArthur award.

-- Mike

=
--0-972816286-1314330825=:88981--