emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] force italic mode?


From: William Henney
Subject: Re: [O] force italic mode?
Date: Fri, 18 Nov 2016 18:39:19 -0600

On Fri, Nov 18, 2016 at 12:31 PM, hymie! <address@hidden> wrote:
In our last episode, the evil Dr. Lacto had captured our hero,
  Aaron Ecay <address@hidden>, who said:
> You can accomplish this by using an entity that expands to nothing.  The
> closest entry in org-entities is \zwj (zero width word-joining space):
>
> foo\zwj{}/bar/\zwj{}baz

This doesn't work for me. :(

It works to the left of the zwj, such as
=foo=\zwj{}bar

...but not to the right as you did above.

It's hard to read the value I have for org-emphasis-regexp-components
but it looks like } is in there, so I guess it should be working?


No, it is only in the POSTMATCH part. If you add it to the PREMATCH part too, then your example would work.  But I think it would be neater to put a pair of literal "zero width space" characters in your file.  I managed to get this to work by doing: 

(setq org-emphasis-regexp-components '("[:space:][:cntrl:]('\"{}" "[:space:][:cntrl:]-.,:!?;'\")}\\[" "[:space:][:cntrl:]" "." 1))

This means you can write "fuzzy​/wuzzy/​wuzzabear" where there is a 0x200B character (ZERO WIDTH SPACE) either side of /wuzzy/ (hopefully this will survive in the email).  I inserted the characters with "C-x 8 RET ...". 

In case you prefer to have something more visible in the source file, I also made it so you can use any ascii control character to bracket the delimiters.  For instance, the NULL character: "fuzzy^@/wuzzy/address@hidden".  Note that those are not real NULLs, but are how they appear in the emacs buffer.  You can insert them with "C-q 0 RET".  


Will






 
--hymie!    http://lactose.homelinux.net/~hymie    address@hidden





--

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

reply via email to

[Prev in Thread] Current Thread [Next in Thread]