unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Colorizing 'emacs-lisp' when it is exported?
@ 2013-12-22 16:03 Sharon Kimble
  2013-12-22 18:29 ` Jambunathan K
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Sharon Kimble @ 2013-12-22 16:03 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org, help-gnu-emacs@gnu.org

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

Thanks to auntie google I've found out how to keep the formatting of
elisp on export to html using '#+BEGIN_SRC emacs-lisp' at the beginning
of the code block, and '#+END_SRC' at the end. Whilst its in .emacs its
nicely colorized, but how do I colorize the output when its been
exported please? For once, google has drawn a blank, unfortunately!

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

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

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

* Re: Colorizing 'emacs-lisp' when it is exported?
       [not found] <mailman.10052.1387728225.10748.help-gnu-emacs@gnu.org>
@ 2013-12-22 18:24 ` Emanuel Berg
  2013-12-22 18:33   ` Sharon Kimble
       [not found]   ` <mailman.10076.1387737251.10748.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 18:24 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@talktalk.net> writes:

> Thanks to auntie google I've found out how to keep the
> formatting of elisp on export to html using
> #+BEGIN_SRC emacs-lisp' at the beginning of the code
> block, and '#+END_SRC' at the end. Whilst its in .emacs
> its nicely colorized, but how do I colorize the output
> when its been exported please? For once, google has
> drawn a blank, unfortunately!

Do you want to write HTML, but sometimes yank Elisp
code, and you would like the Emacs code to keep its
font-lock (and perhaps other properties as well)?

That is, this will matter to you, at *editing* time, as
a homepage creator?

Is this something you do for school or is it a
documentation project with Elisp examples and so forth?

I never did that, but check out those pages [1]
[2]. They mention mmm-mode, multi-mode, MuMaMo-mode,
org-mode, and more, though again, I have no experience
of those.

[1] http://unix.stackexchange.com/questions/42521/how-can-i-use-two-modes-in-emacs-markdown-and-auctex
[2] http://www.emacswiki.org/emacs/MultipleModes

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 16:03 Sharon Kimble
@ 2013-12-22 18:29 ` Jambunathan K
  2013-12-22 18:48   ` Sharon Kimble
       [not found] ` <mailman.10075.1387736986.10748.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Jambunathan K @ 2013-12-22 18:29 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: help-gnu-emacs@gnu.org, emacs-orgmode@gnu.org


Sharon Kimble <boudiccas@talktalk.net> writes:

> Re: Colorizing 'emacs-lisp' when it is exported?

Search for htmlize or htmlfontify in the Org-mode and Emacs manuals.

> For once, google has drawn a blank, unfortunately!

Emacs is self-documenting.  If you are serious about using Emacs you
will ditch google (and even Emacswiki).



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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 18:24 ` Colorizing 'emacs-lisp' when it is exported? Emanuel Berg
@ 2013-12-22 18:33   ` Sharon Kimble
       [not found]   ` <mailman.10076.1387737251.10748.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 13+ messages in thread
From: Sharon Kimble @ 2013-12-22 18:33 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Sun, 22 Dec 2013 19:24:11 +0100
Emanuel Berg <embe8573@student.uu.se> wrote:

> Sharon Kimble <boudiccas@talktalk.net> writes:
> 
> > Thanks to auntie google I've found out how to keep the
> > formatting of elisp on export to html using
> > #+BEGIN_SRC emacs-lisp' at the beginning of the code
> > block, and '#+END_SRC' at the end. Whilst its in .emacs
> > its nicely colorized, but how do I colorize the output
> > when its been exported please? For once, google has
> > drawn a blank, unfortunately!
> 
> Do you want to write HTML, but sometimes yank Elisp
> code, and you would like the Emacs code to keep its
> font-lock (and perhaps other properties as well)?

No, I'm not writing html, I'm exporting from org2blog.
> 
> That is, this will matter to you, at *editing* time, as
> a homepage creator?

No editing time, just 'publishing time'.
> 
> Is this something you do for school or is it a
> documentation project with Elisp examples and so forth?

I'm afraid my school days are over fifty years ago, so its hardly
appropriate. 
> 
> I never did that, but check out those pages [1]
> [2]. They mention mmm-mode, multi-mode, MuMaMo-mode,
> org-mode, and more, though again, I have no experience
> of those.
> 
> [1]
> http://unix.stackexchange.com/questions/42521/how-can-i-use-two-modes-in-emacs-markdown-and-auctex
> [2] http://www.emacswiki.org/emacs/MultipleModes
> 
Yes, I'm using org-mode, but primarily org2blog in this case, but
thanks, I will have a look at the urls you gave.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

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

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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 18:29 ` Jambunathan K
@ 2013-12-22 18:48   ` Sharon Kimble
  0 siblings, 0 replies; 13+ messages in thread
From: Sharon Kimble @ 2013-12-22 18:48 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Sun, 22 Dec 2013 23:59:43 +0530
Jambunathan K <kjambunathan@gmail.com> wrote:

> 
> Sharon Kimble <boudiccas@talktalk.net> writes:
> 
> > Re: Colorizing 'emacs-lisp' when it is exported?
> 
> Search for htmlize or htmlfontify in the Org-mode and Emacs manuals.
> 
> > For once, google has drawn a blank, unfortunately!
> 
> Emacs is self-documenting. 

So I've discovered, install a package, and then click on it again and
it auto-generates a readme.txt file, and that was a big surprise!

> If you are serious about using Emacs you
> will ditch google (and even Emacswiki).
> 
I find it very useful to google error messages.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

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

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

* Re: Colorizing 'emacs-lisp' when it is exported?
       [not found] ` <mailman.10075.1387736986.10748.help-gnu-emacs@gnu.org>
@ 2013-12-22 18:52   ` Emanuel Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 18:52 UTC (permalink / raw)
  To: help-gnu-emacs

Jambunathan K <kjambunathan@gmail.com> writes:

>> For once, google has drawn a blank, unfortunately!
>
> Emacs is self-documenting.  If you are serious about
> using Emacs you will ditch google (and even
> Emacswiki).

In Emacs-utopia perhaps.

Emacs is not really "self-documenting". There is a
clever help mode that immediately gets access to the
Elisp docstrings, function prototypes, and more (and
this is made possible but the dynamic nature of
Emacs/Lisp).

*And* there are manuals included (shipped with Emacs,
or obtainable and then possible to integrate).

As for the included manuals, there is nothing amazing
about that, and that was very common before the
Internet: an on-line manual (i.e., a manual that wasn't
on paper) was shipped with the software.

This is all very practical and in combination with the
elaborate Emacs interface to access it all it makes for
a great thing, but not so great so you in general can
"ditch" Google (or the Internet) and be better off.

As always, it comes down to not only what it is, but
even more so how you use it.

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
       [not found]   ` <mailman.10076.1387737251.10748.help-gnu-emacs@gnu.org>
@ 2013-12-22 18:57     ` Emanuel Berg
  2013-12-22 19:30       ` Jambunathan K
       [not found]       ` <mailman.10085.1387740651.10748.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 18:57 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@talktalk.net> writes:

> No editing time, just 'publishing time'.

Aha, I remember LaTeX had a package to include source
code, so it would get everything you want to make it
look like code - and there was a parameter to specify
what language, and there was a corresponding set of
rules.

And this is you situation, only, instead of a PDF
document, you want a blog entry?

So you are using some pseudo-HTML or WYSIWYG Emacs mode
to produce HTML (or whatever representation is needed
for the blog), and you want Elisp on to of that?

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 16:03 Sharon Kimble
  2013-12-22 18:29 ` Jambunathan K
       [not found] ` <mailman.10075.1387736986.10748.help-gnu-emacs@gnu.org>
@ 2013-12-22 19:00 ` Pascal J. Bourguignon
  2013-12-22 23:49 ` Sean O'Halpin
  3 siblings, 0 replies; 13+ messages in thread
From: Pascal J. Bourguignon @ 2013-12-22 19:00 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-orgmode

Sharon Kimble <boudiccas@talktalk.net> writes:

> Thanks to auntie google I've found out how to keep the formatting of
> elisp on export to html using '#+BEGIN_SRC emacs-lisp' at the beginning
> of the code block, and '#+END_SRC' at the end. Whilst its in .emacs its
> nicely colorized, but how do I colorize the output when its been
> exported please? For once, google has drawn a blank, unfortunately!

I use htmlize-buffer (or htmlize-region) from htmlize.

-- 
__Pascal Bourguignon__
http://www.informatimago.com/
"Le mercure monte ?  C'est le moment d'acheter !"




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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 18:57     ` Emanuel Berg
@ 2013-12-22 19:30       ` Jambunathan K
       [not found]       ` <mailman.10085.1387740651.10748.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 13+ messages in thread
From: Jambunathan K @ 2013-12-22 19:30 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> So you are using some pseudo-HTML or WYSIWYG Emacs mode
> to produce HTML (or whatever representation is needed
> for the blog), and you want Elisp on to of that?

Emanuel, OP said she is using Org and you overlooked it.  With Org you
can export to HTML and do hundred other stuff.

"Literate programming" - have you heard of that?



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

* Re: Colorizing 'emacs-lisp' when it is exported?
       [not found]       ` <mailman.10085.1387740651.10748.help-gnu-emacs@gnu.org>
@ 2013-12-22 19:34         ` Emanuel Berg
  2013-12-22 19:44           ` Emanuel Berg
  2013-12-22 20:13         ` Emanuel Berg
  1 sibling, 1 reply; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 19:34 UTC (permalink / raw)
  To: help-gnu-emacs

Jambunathan K <kjambunathan@gmail.com> writes:

>> So you are using some pseudo-HTML or WYSIWYG Emacs
>> mode to produce HTML (or whatever representation is
>> needed for the blog), and you want Elisp on to of
>> that?
>
> Emanuel, OP said she is using Org and you overlooked
> it.  With Org you can export to HTML and do hundred
> other stuff.

No, I read it, but is it possible to deduct what he is
doing just from that? If it is, did I deduct correctly
or incorrectly?

You say it yourself that you can do lots of things with
it.

> "Literate programming" - have you heard of that?

No?

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 19:34         ` Emanuel Berg
@ 2013-12-22 19:44           ` Emanuel Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 19:44 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

>> "Literate programming" - have you heard of that?
>
> No?

OK, now I have.

Yes, it is like constraint programming - instead of
specifying the solution, you specify the problem - and
then the CP module will transform that problem into a
search space of possible representations, and then
search will take place to find a representation that
fulfills the constraints.

Or, it could be like an editor (WYSIWYG, as I
mentioned) which is a bit more down to earth, and more
interactive.

I like CP but it is only suitable for a small set of
problems, like Sudoku, schedules, and the like, that
are easy to define, and, as for the solutions, brute
force search is more efficient (especially with the
super-speed computers of today), than manually being
"intelligent" (algorithmic) about it.

WYSIWYG I don't like because they place a layer between
you and the end result. Then you will not only have the
limitation that is you (as an imperfect human being)
but also the limitations of the tool (technology + the
people who did it + ...) - so I see only you loosing on
this equation. What you see is what you get = what you
see is ALL you get (if you are lucky).

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
       [not found]       ` <mailman.10085.1387740651.10748.help-gnu-emacs@gnu.org>
  2013-12-22 19:34         ` Emanuel Berg
@ 2013-12-22 20:13         ` Emanuel Berg
  1 sibling, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2013-12-22 20:13 UTC (permalink / raw)
  To: help-gnu-emacs

Jambunathan K <kjambunathan@gmail.com> writes:

> Emanuel, OP said she is using Org and you overlooked
> it.  With Org you can export to HTML and do hundred
> other stuff.
>
> "Literate programming" - have you heard of that?

OK, now I have. [I tried to send this once but it
didn't show up. First time that happened. Anyway an
apologize if you saw it more than once, but I even
checked the web archive and it wasn't there so it must
be something with my software, though it clearly says
it was sent.]

Yes, it is like constraint programming - instead of
specifying the solution, you specify the problem - and
then the CP module will transform that problem into a
search space of possible representations, and then
search will take place to find a representation that
fulfills the constraints.

Or, it could be like an editor (WYSIWYG, as I
mentioned) which is a bit more down to earth, and more
interactive.

I like CP but it is only suitable for a small set of
problems, like Sudoku, schedules, and the like, that
are easy to define, and, as for the solutions, brute
force search is more efficient (especially with the
super-speed computers of today), than manually being
"intelligent" (algorithmic) about it.

WYSIWYG I don't like because they place a layer between
you and the end result. Then you will not only have the
limitation that is you (as an imperfect human being)
but also the limitations of the tool (technology + the
people who did it + ...) - so I see only you loosing on
this equation. What you see is what you get = what you
see is ALL you get (if you are lucky).

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


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

* Re: Colorizing 'emacs-lisp' when it is exported?
  2013-12-22 16:03 Sharon Kimble
                   ` (2 preceding siblings ...)
  2013-12-22 19:00 ` Pascal J. Bourguignon
@ 2013-12-22 23:49 ` Sean O'Halpin
  3 siblings, 0 replies; 13+ messages in thread
From: Sean O'Halpin @ 2013-12-22 23:49 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: help-gnu-emacs@gnu.org, emacs-orgmode@gnu.org

On Sun, Dec 22, 2013 at 4:03 PM, Sharon Kimble <boudiccas@talktalk.net> wrote:
> Thanks to auntie google I've found out how to keep the formatting of
> elisp on export to html using '#+BEGIN_SRC emacs-lisp' at the beginning
> of the code block, and '#+END_SRC' at the end. Whilst its in .emacs its
> nicely colorized, but how do I colorize the output when its been
> exported please? For once, google has drawn a blank, unfortunately!
>
> Sharon.

Have you set this?

    (setq org-src-fontify-natively t)

Regards,
Sean



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

end of thread, other threads:[~2013-12-22 23:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.10052.1387728225.10748.help-gnu-emacs@gnu.org>
2013-12-22 18:24 ` Colorizing 'emacs-lisp' when it is exported? Emanuel Berg
2013-12-22 18:33   ` Sharon Kimble
     [not found]   ` <mailman.10076.1387737251.10748.help-gnu-emacs@gnu.org>
2013-12-22 18:57     ` Emanuel Berg
2013-12-22 19:30       ` Jambunathan K
     [not found]       ` <mailman.10085.1387740651.10748.help-gnu-emacs@gnu.org>
2013-12-22 19:34         ` Emanuel Berg
2013-12-22 19:44           ` Emanuel Berg
2013-12-22 20:13         ` Emanuel Berg
2013-12-22 16:03 Sharon Kimble
2013-12-22 18:29 ` Jambunathan K
2013-12-22 18:48   ` Sharon Kimble
     [not found] ` <mailman.10075.1387736986.10748.help-gnu-emacs@gnu.org>
2013-12-22 18:52   ` Emanuel Berg
2013-12-22 19:00 ` Pascal J. Bourguignon
2013-12-22 23:49 ` Sean O'Halpin

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