emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Henney <whenney@gmail.com>
To: hymie! <hymie@lactose.homelinux.net>
Cc: emacs-org <emacs-orgmode@gnu.org>
Subject: Re: force italic mode?
Date: Fri, 18 Nov 2016 18:39:19 -0600	[thread overview]
Message-ID: <CAKchnZMq14KZCN=f4+hLXqZH_fX8X0VL1+qvkhMRqeraPLs_zA@mail.gmail.com> (raw)
In-Reply-To: <slrno2ui7p.1kt.hymie@lactose.homelinux.net>

[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]

On Fri, Nov 18, 2016 at 12:31 PM, hymie! <hymie@lactose.homelinux.net>
wrote:

> In our last episode, the evil Dr. Lacto had captured our hero,
>   Aaron Ecay <aaronecay@gmail.com>, 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/^@bear".
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
> hymie@lactose.homelinux.net
>
>
>


-- 

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

[-- Attachment #2: Type: text/html, Size: 3148 bytes --]

      reply	other threads:[~2016-11-19  0:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 12:45 force italic mode? hymie!
2016-11-17 16:39 ` Eric Abrahamsen
2016-11-17 16:46   ` John Kitchin
2016-11-17 17:03     ` Eric Abrahamsen
2016-11-18 14:59       ` Aaron Ecay
2016-11-18 17:44         ` Eric Abrahamsen
2016-11-18 18:31         ` hymie!
2016-11-19  0:39           ` William Henney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKchnZMq14KZCN=f4+hLXqZH_fX8X0VL1+qvkhMRqeraPLs_zA@mail.gmail.com' \
    --to=whenney@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hymie@lactose.homelinux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).