emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export entities inside code/verbatim markup?
@ 2017-12-15 14:52 Matt Price
  2017-12-15 14:56 ` Matt Price
  2017-12-15 15:03 ` Eric S Fraga
  0 siblings, 2 replies; 9+ messages in thread
From: Matt Price @ 2017-12-15 14:52 UTC (permalink / raw)
  To: Org Mode

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

IIUC, org does not by default export entities contained inside ~code~ and
=verbatim= markup. Is there any way to get around that? I have lots of
markup like this:

~Tools \rarr Web Developer \rarr Console~

in various help texts. If there's a way to push this out to markdown or
HTML I'd be very grateful to learn of it! Should I maybe be advising
org-md-verbatim, for instance? Or am I just misusing hte markup here?

Thank you all!
matt

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

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

* Re: export entities inside code/verbatim markup?
  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
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Price @ 2017-12-15 14:56 UTC (permalink / raw)
  To: Org Mode

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

On Fri, Dec 15, 2017 at 9:52 AM, Matt Price <moptop99@gmail.com> wrote:

> IIUC, org does not by default export entities contained inside ~code~ and
> =verbatim= markup. Is there any way to get around that? I have lots of
> markup like this:
>
> ~Tools \rarr Web Developer \rarr Console~
>
> in various help texts. If there's a way to push this out to markdown or
> HTML I'd be very grateful to learn of it! Should I maybe be advising
> org-md-verbatim, for instance? Or am I just misusing hte markup here?
>
> Thank you all!
>

meant to say, you can find an example of why I use that markup here:

https://digitalhistory.github.io/dh-website/tools/setup/#web-browser

(thanks to Kaushal for ox-hugo, which makes this possible! site and deploy
are still WIP though!)

matt
>

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

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

* Re: export entities inside code/verbatim markup?
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2017-12-15 15:03 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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

On Friday, 15 Dec 2017 at 09:52, Matt Price wrote:
> IIUC, org does not by default export entities contained inside ~code~ and
> =verbatim= markup.

it does for me...  what happens when you try?  can you post a small
example?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 15:03 ` Eric S Fraga
@ 2017-12-15 15:40   ` Matt Price
  2017-12-15 15:48     ` Eric S Fraga
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Price @ 2017-12-15 15:40 UTC (permalink / raw)
  To: Matt Price, Org Mode

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

On Fri, Dec 15, 2017 at 10:03 AM, Eric S Fraga <esflists@gmail.com> wrote:

> On Friday, 15 Dec 2017 at 09:52, Matt Price wrote:
> > IIUC, org does not by default export entities contained inside ~code~ and
> > =verbatim= markup.
>
> it does for me...  what happens when you try?  can you post a small
> example?
>
>
test.org:

Of particular value in both Chrome and Firefox is the "Javascript
Consoles," accessible from the developer tools: ~Tools \rarr Web Developer
\rarr Console~ or ~Menu \rarr More Tools \rarr Developer \rarr Console~

test.html (excluding head, postamble, etc):

<div id="content"><p>Of particular value in both Chrome and Firefox is
the &ldquo;Javascript Consoles,&rdquo; accessible from the developer
tools: <code>Tools \rarr Web Developer \rarr Console</code> or
<code>Menu \rarr More Tools \rarr Developer \rarr
Console</code></p></div>


org-export-filter-entity-functions is nil
org-export-with-entities is t

org release_9.1.4-206-g4b80c6
emacs 27.0.50

I guess there may be other parts of my setup which are screwed up, but am
not sure where else to look?

> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
>

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

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 15:40   ` Matt Price
@ 2017-12-15 15:48     ` Eric S Fraga
  2017-12-15 16:19       ` Kaushal Modi
  2017-12-16  2:55       ` Matt Price
  0 siblings, 2 replies; 9+ messages in thread
From: Eric S Fraga @ 2017-12-15 15:48 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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

On Friday, 15 Dec 2017 at 10:40, Matt Price wrote:
> Of particular value in both Chrome and Firefox is the "Javascript
> Consoles," accessible from the developer tools: ~Tools \rarr Web Developer
> \rarr Console~ or ~Menu \rarr More Tools \rarr Developer \rarr Console~
>
> test.html (excluding head, postamble, etc):
>
> <div id="content"><p>Of particular value in both Chrome and Firefox is
> the &ldquo;Javascript Consoles,&rdquo; accessible from the developer
> tools: <code>Tools \rarr Web Developer \rarr Console</code> or
> <code>Menu \rarr More Tools \rarr Developer \rarr
> Console</code></p></div>

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.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 15:48     ` Eric S Fraga
@ 2017-12-15 16:19       ` Kaushal Modi
  2017-12-15 16:28         ` Eric S Fraga
  2017-12-16  2:55       ` Matt Price
  1 sibling, 1 reply; 9+ messages in thread
From: Kaushal Modi @ 2017-12-15 16:19 UTC (permalink / raw)
  To: Matt Price, emacs-org list, Eric S Fraga

[-- 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 --]

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 16:19       ` Kaushal Modi
@ 2017-12-15 16:28         ` Eric S Fraga
  2017-12-16  3:03           ` Matt Price
  0 siblings, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2017-12-15 16:28 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list

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

On Friday, 15 Dec 2017 at 16:19, Kaushal Modi wrote:
> I believe that Matt wants to render the entities inside the verbatim/code
> markup.

Ah, I did completely misunderstand his question! <blush>  Thanks.

> To do what you want, I would unleash the power of C-x 8 RET.

I like your suggestion of adding bindings to the C-x 8 map.  In general,
however, I find using the tex input method works really well, allowing
me to simply type \to when I want a right arrow.  The whole input method
mechanism in Emacs is fantastic.

Anyway, sorry Matt for misunderstanding your question.

eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 15:48     ` Eric S Fraga
  2017-12-15 16:19       ` Kaushal Modi
@ 2017-12-16  2:55       ` Matt Price
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Price @ 2017-12-16  2:55 UTC (permalink / raw)
  To: Matt Price, Org Mode

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

On Fri, Dec 15, 2017 at 10:48 AM, Eric S Fraga <esflists@gmail.com> wrote:

> On Friday, 15 Dec 2017 at 10:40, Matt Price wrote:
> > Of particular value in both Chrome and Firefox is the "Javascript
> > Consoles," accessible from the developer tools: ~Tools \rarr Web
> Developer
> > \rarr Console~ or ~Menu \rarr More Tools \rarr Developer \rarr Console~
> >
> > test.html (excluding head, postamble, etc):
> >
> > <div id="content"><p>Of particular value in both Chrome and Firefox is
> > the &ldquo;Javascript Consoles,&rdquo; accessible from the developer
> > tools: <code>Tools \rarr Web Developer \rarr Console</code> or
> > <code>Menu \rarr More Tools \rarr Developer \rarr
> > Console</code></p></div>
>
> 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.
>
>
ah, I meant, the \rarr entities are not exported as html arrow entities,
but instead as plain text, \rarr. My question was poorly phrased, I think.
And yes, I think this is the expected result. It's just that I would like
to process the entities on export.

> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
>

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

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

* Re: export entities inside code/verbatim markup?
  2017-12-15 16:28         ` Eric S Fraga
@ 2017-12-16  3:03           ` Matt Price
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Price @ 2017-12-16  3:03 UTC (permalink / raw)
  To: Kaushal Modi, Matt Price, emacs-org list

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

On Fri, Dec 15, 2017 at 11:28 AM, Eric S Fraga <esflists@gmail.com> wrote:

> On Friday, 15 Dec 2017 at 16:19, Kaushal Modi wrote:
> > I believe that Matt wants to render the entities inside the verbatim/code
> > markup.
>
> Ah, I did completely misunderstand his question! <blush>  Thanks.
>
> > To do what you want, I would unleash the power of C-x 8 RET.
>
> I like your suggestion of adding bindings to the C-x 8 map.  In general,
> however, I find using the tex input method works really well, allowing
> me to simply type \to when I want a right arrow.  The whole input method
> mechanism in Emacs is fantastic.
>
> Anyway, sorry Matt for misunderstanding your question.
>

oops sorry I tried to send that last email earlier.  I think my question
was unclear.  And thank you Kaushal! i might even define an abbrev to
replace \rarr with the unicode arrow.


> eric
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
>

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

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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-12-15 16:28         ` Eric S Fraga
2017-12-16  3:03           ` Matt Price
2017-12-16  2:55       ` Matt Price

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).