emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Add zero width nbsp to pre component of org-emphasis-regexp-components
@ 2017-12-18  9:04 Christoffer Stjernlöf
  2017-12-18 13:03 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Christoffer Stjernlöf @ 2017-12-18  9:04 UTC (permalink / raw)
  To: emacs-orgmode

Hey!

I'm sure there's a reason this hasn't been done, so I'll suggest it and
hope for a lecture. :) Sometimes I want to emphasise just part of a word
(I'll use the company name socialgrow as a running example), so I insert
a zero width non-breaking space around the emphasis marks, like so:
social[zewinbsp]*grow*. My thinking is that this will let Org think
they are two separate words, but in any real sense they stick together
(no linebreak across them, zero spacing between them.)

However, this requires one to add the zero width non breaking space
to the pre component of org-emphasis-regexp-components, which is
not the default. Any reason that is so?

Regards,
Chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Add zero width nbsp to pre component of org-emphasis-regexp-components
  2017-12-18  9:04 Add zero width nbsp to pre component of org-emphasis-regexp-components Christoffer Stjernlöf
@ 2017-12-18 13:03 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-12-18 13:03 UTC (permalink / raw)
  To: Christoffer Stjernlöf; +Cc: emacs-orgmode

Hello,

k@rdw.se (Christoffer Stjernlöf) writes:

> I'm sure there's a reason this hasn't been done, so I'll suggest it and
> hope for a lecture. :) Sometimes I want to emphasise just part of a word
> (I'll use the company name socialgrow as a running example), so I insert
> a zero width non-breaking space around the emphasis marks, like so:
> social[zewinbsp]*grow*. My thinking is that this will let Org think
> they are two separate words, but in any real sense they stick together
> (no linebreak across them, zero spacing between them.)
>
> However, this requires one to add the zero width non breaking space
> to the pre component of org-emphasis-regexp-components, which is
> not the default. Any reason that is so?

It is the default in Org development branch, using [:space:] character
class. The change will be available in Org 9.2.  Meanwhile, you can use
the default value:

  '("-[:space:]('\"{" "-[:space:].,:!?;'\")}\\[" "[:space:]" "." 1)


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-18 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18  9:04 Add zero width nbsp to pre component of org-emphasis-regexp-components Christoffer Stjernlöf
2017-12-18 13:03 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).