* Feature request: modify italic regexp list to include non-breaking space and other characters @ 2011-04-20 15:04 amscopub-mail 2011-04-20 19:18 ` Aankhen 0 siblings, 1 reply; 3+ messages in thread From: amscopub-mail @ 2011-04-20 15:04 UTC (permalink / raw) To: emacs-orgmode Sample code: Using /a/’s and /b/’s, write add /x/ + 2. ^ ^ ^ ^ Right single quotation mark Non-breaking space Expected HTML export: Using <i>a</i>’s and <i>b</i>’s, write <i>x</i> + 2. Actual HTML export: Using /a/’s and /b/’s, write add /x/ + 2. If it's not clear, the sample code uses the unicode character "right single character" instead of an apostrophe and "non-breaking space" instead of regular white space. It makes sense to use these characters this way, however, orgmode neither 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. Using 7.4. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Feature request: modify italic regexp list to include non-breaking space and other characters 2011-04-20 15:04 Feature request: modify italic regexp list to include non-breaking space and other characters amscopub-mail @ 2011-04-20 19:18 ` Aankhen 2011-04-22 12:31 ` Uriel Avalos 0 siblings, 1 reply; 3+ messages in thread From: Aankhen @ 2011-04-20 19:18 UTC (permalink / raw) To: amscopub-mail, Org-mode ml On Wed, Apr 20, 2011 at 20:34, <amscopub-mail@yahoo.com> wrote: > Sample code: > Using /a/’s and /b/’s, write add /x/ + 2. > ^ ^ ^ ^ > Right single quotation mark Non-breaking space > > Expected HTML export: > Using <i>a</i>’s and <i>b</i>’s, write <i>x</i> + 2. > > Actual HTML export: > Using /a/’s and /b/’s, write add /x/ + 2. Interestingly, the development version treats this differently, as it considers all the text from the first slash to the last part of the emphasis: ,---- | <p>Using <i>a/’s and /b/’s, write add /x</i> + 2. | </p> `---- (This behaviour occurs in the original Org buffer as well, in case anyone’s wondering. The exported HTML was just the easiest way to show it.) > If it's not clear, the sample code uses the unicode character "right single character" instead of an apostrophe and "non-breaking space" instead of regular white space. > > It makes sense to use these characters this way, however, orgmode neither 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. These two variables are used to configure the regexp: ,----[ C-h v org-emphasis-alist RET ] | org-emphasis-alist is a variable defined in `org.el'. | Its value is (("*" bold "<b>" "</b>") | ("/" italic "<i>" "</i>") | ("_" underline "<span style=\"text-decoration:underline;\">" "</span>") | ("=" org-code "<code>" "</code>" verbatim) | ("~" org-verbatim "<code>" "</code>" verbatim) | ("+" | (:strike-through t) | "<del>" "</del>")) | | | Documentation: | Special syntax for emphasized text. | Text starting and ending with a special character will be emphasized, for | example *bold*, _underlined_ and /italic/. This variable sets the marker | characters, the face to be used by font-lock for highlighting in Org-mode | 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. `---- ,----[ C-h v org-emphasis-regexp-components RET ] | org-emphasis-regexp-components is a variable defined in `org.el'. | Its value is (" ('\"{" "- .,:!?;'\")}\\" " \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 too. | 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] `---- I’d say that ‘pre’/‘post’ should really contain [[:space:]], but then Org’s syntax table seems to treat the non-breaking space as punctuation, so that wouldn’t help. You could try adding the character itself to both of those categories for a fix. You’ll need to restart Emacs afterwards (unless you used the Customize interface) so that ‘org-emph-re’ is updated accordingly. > Using 7.4. This little problem aside, you might want to upgrade (if not to the development version, at least to 7.5). Aankhen ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Feature request: modify italic regexp list to include non-breaking space and other characters 2011-04-20 19:18 ` Aankhen @ 2011-04-22 12:31 ` Uriel Avalos 0 siblings, 0 replies; 3+ messages in thread From: Uriel Avalos @ 2011-04-22 12:31 UTC (permalink / raw) To: Aankhen, emacs-orgmode On Thu, 21 Apr 2011 00:48:21 +0530 Aankhen <aankhen@gmail.com> wrote: > On Wed, Apr 20, 2011 at 20:34, <amscopub-mail@yahoo.com> wrote: > > Sample code: > > Using /a/’s and /b/’s, write add /x/ + 2. > > ^ ^ ^ ^ > > Right single quotation mark Non-breaking space > > > > Expected HTML export: > > Using <i>a</i>’s and <i>b</i>’s, write <i>x</i> + 2. > > > > Actual HTML export: > > Using /a/’s and /b/’s, write add /x/ + 2. > > Interestingly, the development version treats this differently, as it > considers all the text from the first slash to the last part of the > emphasis: > > ,---- > | <p>Using <i>a/’s and /b/’s, write add /x</i> + 2. > | </p> > `---- > > (This behaviour occurs in the original Org buffer as well, in case > anyone’s 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 development version. > > > If it's not clear, the sample code uses the unicode character "right single character" instead of an apostrophe and "non-breaking space" instead of regular white space. > > > > It makes sense to use these characters this way, however, orgmode neither 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. > > These two variables are used to configure the regexp: > > ,----[ C-h v org-emphasis-alist RET ] > | org-emphasis-alist is a variable defined in `org.el'. > | Its value is (("*" bold "<b>" "</b>") > | ("/" italic "<i>" "</i>") > | ("_" underline "<span style=\"text-decoration:underline;\">" "</span>") > | ("=" org-code "<code>" "</code>" verbatim) > | ("~" org-verbatim "<code>" "</code>" verbatim) > | ("+" > | (:strike-through t) > | "<del>" "</del>")) > | > | > | Documentation: > | Special syntax for emphasized text. > | Text starting and ending with a special character will be emphasized, for > | example *bold*, _underlined_ and /italic/. This variable sets the marker > | characters, the face to be used by font-lock for highlighting in Org-mode > | 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. > `---- > > ,----[ C-h v org-emphasis-regexp-components RET ] > | org-emphasis-regexp-components is a variable defined in `org.el'. > | Its value is (" ('\"{" "- .,:!?;'\")}\\" " > \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 too. > | 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! > > I’d say that ‘pre’/‘post’ should really contain [[:space:]], but then > Org’s syntax table seems to treat the non-breaking space as > punctuation, so that wouldn’t help. You could try adding the > character itself to both of those categories for a fix. You’ll need > to restart Emacs afterwards (unless you used the Customize interface) > so that ‘org-emph-re’ is updated accordingly. > > > Using 7.4. > > This little problem aside, you might want to upgrade (if not to the > development version, at least to 7.5). > > Aankhen Oh I'm using nt emacs. I believe that's the latest they have out but will check again. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-22 12:32 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-20 15:04 Feature request: modify italic regexp list to include non-breaking space and other characters amscopub-mail 2011-04-20 19:18 ` Aankhen 2011-04-22 12:31 ` Uriel Avalos
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.