From: Kaushal Modi <kaushal.modi@gmail.com>
To: Matt Price <moptop99@gmail.com>,
emacs-org list <emacs-orgmode@gnu.org>,
Eric S Fraga <e.fraga@ucl.ac.uk>
Subject: Re: export entities inside code/verbatim markup?
Date: Fri, 15 Dec 2017 16:19:42 +0000 [thread overview]
Message-ID: <CAFyQvY1hwF=5L7oEo+6=3mxfJxZk8oqNMQhTqNn6mWHS44roSA@mail.gmail.com> (raw)
In-Reply-To: <874los0z79.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
On Fri, Dec 15, 2017 at 10:49 AM Eric S Fraga <esflists@gmail.com> wrote:
> On Friday, 15 Dec 2017 at 10:40, Matt Price wrote:
> > tools: <code>Tools \rarr Web Developer \rarr Console</code> or
>
> So what is the problem? The text in ~...~ markup *is* being exported to
> HTML. What did you expect to see instead? I am confused and maybe
> misunderstood what you were asking.
>
I believe that Matt wants to render the entities inside the verbatim/code
markup.
@Matt: Verbatim/markup blocks simply keep everything inside.. verbatim.
Because then how would some literally print \rarr if they wanted too..
Example: What if someone wanted to export: "Type ~\rarr~ to export \rarr".
It would be highly confusing if entities got interpreted in verbatim too :)
To do what you want, I would unleash the power of C-x 8 RET.
If you want to include the right arrow in the verbatim blocks, instead of
typing "\rarr", do C-x 8 RET, type "right arrow" and hit return again..
\rarr will be inserted in the buffer.. I mean → will be inserted literally.
I like inserting verbatim arrows too. So after I got tired of C-x 8 RET
"right arrow", I just bound the <right> key binding in the C-x 8 map to
directly insert .
=====
(use-package iso-transl
:defer 10
:config
(progn
;; Add custom bindings to "C-x 8" map
(dolist (binding
'(
;; <snip>
;; arrows
("<right>" . [?→]) ; rightwards arrow
("<left>" . [?←]) ; leftwards arrow
("<up>" . [?↑]) ; upwards arrow
("<down>" . [?↓]) ; downwards arrow
;; <snip>
))
(define-key iso-transl-ctl-x-8-map (kbd (car binding)) (cdr
binding)))))
=====
With the above code, I just do C-x 8 <right> to insert →.
Full code:
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-unicode.el
Hope that helps.
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3009 bytes --]
next prev parent reply other threads:[~2017-12-15 16:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 14:52 export entities inside code/verbatim markup? Matt Price
2017-12-15 14:56 ` Matt Price
2017-12-15 15:03 ` Eric S Fraga
2017-12-15 15:40 ` Matt Price
2017-12-15 15:48 ` Eric S Fraga
2017-12-15 16:19 ` Kaushal Modi [this message]
2017-12-15 16:28 ` Eric S Fraga
2017-12-16 3:03 ` Matt Price
2017-12-16 2:55 ` Matt Price
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFyQvY1hwF=5L7oEo+6=3mxfJxZk8oqNMQhTqNn6mWHS44roSA@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=moptop99@gmail.com \
/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 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.