From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uriel Avalos Subject: Re: Feature request: modify italic regexp list to include non-breaking space and other characters Date: Fri, 22 Apr 2011 08:31:58 -0400 Message-ID: <27188.2455600009$1303475549@news.gmane.org> References: <824926.32909.qm@web120711.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDFWl-0002wk-PR for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 08:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDFWk-0004wj-PC for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 08:32:03 -0400 Received: from smtp109.prem.mail.ac4.yahoo.com ([76.13.13.92]:29779) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QDFWk-0004wV-Jd for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 08:32:02 -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: Aankhen , emacs-orgmode@gnu.org On Thu, 21 Apr 2011 00:48:21 +0530 Aankhen wrote: > On Wed, Apr 20, 2011 at 20:34, wrote: > > Sample code: > > =C2=A0Using /a/=E2=80=99s and /b/=E2=80=99s, write add /x/=C2=A0+=C2=A0= 2. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^ =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^ ^ > > =C2=A0 =C2=A0 =C2=A0 Right single quotation mark =C2=A0 =C2=A0Non-break= ing space > > > > Expected HTML export: > > =C2=A0Using a=E2=80=99s and b=E2=80=99s, write x += 2. > > > > Actual HTML export: > > =C2=A0Using /a/=E2=80=99s and /b/=E2=80=99s, write add /x/ + 2. >=20 > Interestingly, the development version treats this differently, as it > considers all the text from the first slash to the last part of the > emphasis: >=20 > ,---- > |

Using a/=E2=80=99s and /b/=E2=80=99s, write add /x + 2. > |

> `---- >=20 > (This behaviour occurs in the original Org buffer as well, in case > anyone=E2=80=99s wondering. The exported HTML was just the easiest way to > show it.) Ouch. I hope the devs consider that to be a bug and fix it in the developme= nt version. >=20 > > If it's not clear, the sample code uses the unicode character "right si= ngle character" instead of an apostrophe and "non-breaking space" instead o= f regular white space. > > > > It makes sense to use these characters this way, however, orgmode neith= er displays the italic expressions correctly nor exports them correctly. > > > > I believe older versions of orgmode worked in the expected way. > > > > How can I modify the regexp list? Bold characters are also affected. >=20 > These two variables are used to configure the regexp: >=20 > ,----[ C-h v org-emphasis-alist RET ] > | org-emphasis-alist is a variable defined in `org.el'. > | Its value is (("*" bold "" "") > | ("/" italic "" "") > | ("_" underline "" "") > | ("=3D" org-code "" "" verbatim) > | ("~" org-verbatim "" "" verbatim) > | ("+" > | (:strike-through t) > | "" "")) > | > | > | Documentation: > | Special syntax for emphasized text. > | Text starting and ending with a special character will be emphasized, f= or > | example *bold*, _underlined_ and /italic/. This variable sets the mark= er > | characters, the face to be used by font-lock for highlighting in Org-mo= de > | Emacs buffers, and the HTML tags to be used for this. > | For LaTeX export, see the variable `org-export-latex-emphasis-alist'. > | For DocBook export, see the variable `org-export-docbook-emphasis-alist= '. > | Use customize to modify this, or restart Emacs after changing it. > | > | You can customize this variable. > `---- >=20 > ,----[ C-h v org-emphasis-regexp-components RET ] > | org-emphasis-regexp-components is a variable defined in `org.el'. > | Its value is (" ('\"{" "- .,:!?;'\")}\\" " =09 > \n,\"'" "." 1) > | > | > | Documentation: > | Components used to build the regular expression for emphasis. > | This is a list with five entries. Terminology: In an emphasis string > | like " *strong word* ", we call the initial space PREMATCH, the final > | space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters > | and "trong wor" is the body. The different components in this variable > | specify what is allowed/forbidden in each part: > | > | pre Chars allowed as prematch. Beginning of line will be > allowed too. > | post Chars allowed as postmatch. End of line will be allowed t= oo. > | border The chars *forbidden* as border characters. > | body-regexp A regexp like "." to match a body character. Don't use > | non-shy groups here, and don't allow newline here. > | newline The maximum number of newlines allowed in an emphasis exp. > | > | Use customize to modify this, or restart Emacs after changing it. > | > | You can customize this variable. > | > | [back] > `---- Thanks! >=20 > I=E2=80=99d say that =E2=80=98pre=E2=80=99/=E2=80=98post=E2=80=99 should = really contain [[:space:]], but then > Org=E2=80=99s syntax table seems to treat the non-breaking space as > punctuation, so that wouldn=E2=80=99t help. You could try adding the > character itself to both of those categories for a fix. You=E2=80=99ll n= eed > to restart Emacs afterwards (unless you used the Customize interface) > so that =E2=80=98org-emph-re=E2=80=99 is updated accordingly. >=20 > > Using 7.4. >=20 > This little problem aside, you might want to upgrade (if not to the > development version, at least to 7.5). >=20 > Aankhen Oh I'm using nt emacs. I believe that's the latest they have out but will c= heck again.