* FR: source code
@ 2008-01-08 11:22 Phil Jackson
2008-01-08 14:03 ` Bastien
2008-01-16 16:21 ` Carsten Dominik
0 siblings, 2 replies; 23+ messages in thread
From: Phil Jackson @ 2008-01-08 11:22 UTC (permalink / raw)
To: emacs-orgmode
Hi,
This may well be beyond the scope of Org but the only thing that keeps
me from switching everything from Muse to Org is the lack of a method to
'embed' source code into a document ala:
<src lang="shell-script">
...
</src>
Is this something that might be possible in the future?
Cheers,
Phil
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-08 11:22 FR: source code Phil Jackson
@ 2008-01-08 14:03 ` Bastien
[not found] ` <b71b18520801082003h7baccfa9t3a0cf936c07c086a@mail.gmail.com>
2008-01-16 16:21 ` Carsten Dominik
1 sibling, 1 reply; 23+ messages in thread
From: Bastien @ 2008-01-08 14:03 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode
Phil Jackson <phil@shellarchive.co.uk> writes:
> This may well be beyond the scope of Org but the only thing that keeps
> me from switching everything from Muse to Org is the lack of a method to
> 'embed' source code into a document ala:
>
> <src lang="shell-script">
> ...
> </src>
>
> Is this something that might be possible in the future?
Yes. For now we have #+BEGIN_EXAMPLE (info "(org)Quoted examples"), but
it's just another way of converting part of the text in fixed-width font
when exporting (like C-c : does.)
Maybe this could evolve in
#+BEGIN_EXAMPLE lang:shell-script
...
#+END_EXAMPLE
So that the exporters know how to fontify the content of such parts, and
so that #+BEGIN_EXAMPLE is really different than C-c :
BTW, we had a discussion earlier with Carsten on whether the #+BEGIN*
directives formed a consistent class. I suggested to distinguish
between #+BEGIN_[export_language] and #+BEGIN_[type_of_region]. I
further suggested that we could have:
#+IF_HTML / #+ENDIF_HTML
#+IF_LaTeX / #+ENDIF_LaTeX
#+IF_TXT / #+ENDIF_TXT
and
#+BEGIN_EXAMPLE / #+END_EXAMPLE
#+BEGIN myblock
But maybe we shouldn't be the strict about the semantic, at least not at
the cost of simplicity.
What people think?
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-08 11:22 FR: source code Phil Jackson
2008-01-08 14:03 ` Bastien
@ 2008-01-16 16:21 ` Carsten Dominik
2008-01-16 18:59 ` Phil Jackson
1 sibling, 1 reply; 23+ messages in thread
From: Carsten Dominik @ 2008-01-16 16:21 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode
On Jan 8, 2008, at 12:22 PM, Phil Jackson wrote:
> Hi,
>
> This may well be beyond the scope of Org but the only thing that keeps
> me from switching everything from Muse to Org is the lack of a
> method to
> 'embed' source code into a document ala:
>
> <src lang="shell-script">
> ...
> </src>
>
> Is this something that might be possible in the future?
It seems to me that there are really two issues here:
1. Font-locking in the buffer
2. Export
I guess one problem is that the stuff in BEGIN_EXAMPLE and similar
structures is not protected from font-lock a la org-mode.
Maybe this is the main issue you are having Phil?
How does Muse behave in your examlple? I don't know Muse too well.
- Carsten
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-16 16:21 ` Carsten Dominik
@ 2008-01-16 18:59 ` Phil Jackson
2008-01-18 8:20 ` Carsten Dominik
0 siblings, 1 reply; 23+ messages in thread
From: Phil Jackson @ 2008-01-16 18:59 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jan 8, 2008, at 12:22 PM, Phil Jackson wrote:
[...]
>> is the lack of a method to 'embed' source code into a document ala:
>>
>> <src lang="shell-script">
>> ...
>> </src>
[...]
> It seems to me that there are really two issues here:
>
> 1. Font-locking in the buffer
> 2. Export
>
> I guess one problem is that the stuff in BEGIN_EXAMPLE and similar
> structures is not protected from font-lock a la org-mode.
> Maybe this is the main issue you are having Phil?
>
> How does Muse behave in your examlple? I don't know Muse too well.
The code isn't actually font-locked in the buffer itself but is syntax
highlighted upon export (in (x)html anyway). Without actually reading
the code, I think it just takes the region applies the mode specified by
the 'lang' attribute and then uses htmlize.el on it.
I *personally* still can't decide if this is within org's scope though,
not to say I wouldn't find it very handy.
Cheers,
Phil
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-16 18:59 ` Phil Jackson
@ 2008-01-18 8:20 ` Carsten Dominik
2008-01-18 9:59 ` Phil Jackson
0 siblings, 1 reply; 23+ messages in thread
From: Carsten Dominik @ 2008-01-18 8:20 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode
On Jan 16, 2008, at 7:59 PM, Phil Jackson wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Jan 8, 2008, at 12:22 PM, Phil Jackson wrote:
>
> [...]
>
>>> is the lack of a method to 'embed' source code into a document ala:
>>>
>>> <src lang="shell-script">
>>> ...
>>> </src>
>
> [...]
>
>> It seems to me that there are really two issues here:
>>
>> 1. Font-locking in the buffer
>> 2. Export
>>
>> I guess one problem is that the stuff in BEGIN_EXAMPLE and similar
>> structures is not protected from font-lock a la org-mode.
>> Maybe this is the main issue you are having Phil?
>>
>> How does Muse behave in your examlple? I don't know Muse too well.
>
> The code isn't actually font-locked in the buffer itself but is syntax
> highlighted upon export (in (x)html anyway). Without actually reading
> the code, I think it just takes the region applies the mode
> specified by
> the 'lang' attribute and then uses htmlize.el on it.
>
> I *personally* still can't decide if this is within org's scope
> though,
> not to say I wouldn't find it very handy.
So then am confused what you initial message was about. The feature
your are asking for is then an exporting feature, right? Maybe you
need to restate what exactly you would like to see.
- Carsten
>
>
> Cheers,
> Phil
> --
> Phil Jackson
> http://www.shellarchive.co.uk
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-18 8:20 ` Carsten Dominik
@ 2008-01-18 9:59 ` Phil Jackson
2008-01-29 16:04 ` Phil Jackson
0 siblings, 1 reply; 23+ messages in thread
From: Phil Jackson @ 2008-01-18 9:59 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jan 16, 2008, at 7:59 PM, Phil Jackson wrote:
[...]
>> I *personally* still can't decide if this is within org's scope
>> though, not to say I wouldn't find it very handy.
>
> So then am confused what you initial message was about. The feature
> your are asking for is then an exporting feature, right? Maybe you
> need to restate what exactly you would like to see.
Yes, I'm a confused young man. My final answer is: I would like to see
syntax highlighted code in a HTML export :)
Cheers,
Phil
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-18 9:59 ` Phil Jackson
@ 2008-01-29 16:04 ` Phil Jackson
2008-01-29 18:20 ` Rick Moynihan
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: Phil Jackson @ 2008-01-29 16:04 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Phil Jackson <phil@shellarchive.co.uk> writes:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
[...]
>>> I *personally* still can't decide if this is within org's scope
>>> though, not to say I wouldn't find it very handy.
>> So then am confused what you initial message was about. The feature
>> your are asking for is then an exporting feature, right? Maybe you
>> need to restate what exactly you would like to see.
> Yes, I'm a confused young man. My final answer is: I would like to see
> syntax highlighted code in a HTML export :)
So what do you think Carsten? I would like to see the:
#+BEGIN_EXAMPLE lang:shell-script
#+END_EXAMPLE
That Bastien suggested. I would be willing to help out the exporter
people if need be.
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 16:04 ` Phil Jackson
@ 2008-01-29 18:20 ` Rick Moynihan
2008-01-29 18:32 ` Russell Adams
2008-01-30 7:02 ` Bastien Guerry
2008-01-30 7:17 ` Bastien Guerry
2008-02-05 16:51 ` Carsten Dominik
2 siblings, 2 replies; 23+ messages in thread
From: Rick Moynihan @ 2008-01-29 18:20 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode, Carsten Dominik
Phil Jackson wrote:
> Phil Jackson <phil@shellarchive.co.uk> writes:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> [...]
>
>>>> I *personally* still can't decide if this is within org's scope
>>>> though, not to say I wouldn't find it very handy.
>
>>> So then am confused what you initial message was about. The feature
>>> your are asking for is then an exporting feature, right? Maybe you
>>> need to restate what exactly you would like to see.
>
>> Yes, I'm a confused young man. My final answer is: I would like to see
>> syntax highlighted code in a HTML export :)
>
> So what do you think Carsten? I would like to see the:
>
> #+BEGIN_EXAMPLE lang:shell-script
> #+END_EXAMPLE
>
I'd like to see this too, primarily for HTML export (for syntax
highlighting etc) though it would be handy if you could also display the
syntax highlighting of the specified mode inside the block in Emacs.
Also, Bastien... In blorg.el is it possible to include HTML snippets as
blocks of markup inside the posts? For example embedding a video into a
post?
e.g.
* TODO My post with embedded video
blah blah blah...
#+BEGIN_HTML
<object width="425" height="355"><param name="movie"
value="http://www.youtube.com/v/fu8rAWciQNs&rel=1"></param><param
name="wmode" value="transparent"></param><embed
src="http://www.youtube.com/v/fu8rAWciQNs&rel=1"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355"></embed></object>
#+END_HTML
R.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 18:20 ` Rick Moynihan
@ 2008-01-29 18:32 ` Russell Adams
2008-01-29 18:49 ` Phil Jackson
2008-01-30 7:02 ` Bastien Guerry
1 sibling, 1 reply; 23+ messages in thread
From: Russell Adams @ 2008-01-29 18:32 UTC (permalink / raw)
To: emacs-orgmode
> I'd like to see this too, primarily for HTML export (for syntax
> highlighting etc) though it would be handy if you could also display the
> syntax highlighting of the specified mode inside the block in Emacs.
Would it be practical to just specify the major mode to use with
htmlify in order to syntax highlight the block of code, as opposed to
keeping a table of which types equate to which modes?
If only I had the time to learn lisp. ;]
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 18:32 ` Russell Adams
@ 2008-01-29 18:49 ` Phil Jackson
0 siblings, 0 replies; 23+ messages in thread
From: Phil Jackson @ 2008-01-29 18:49 UTC (permalink / raw)
To: emacs-orgmode
Russell Adams <RLAdams@AdamsInfoServ.Com> writes:
>> I'd like to see this too, primarily for HTML export (for syntax
>> highlighting etc) though it would be handy if you could also display the
>> syntax highlighting of the specified mode inside the block in Emacs.
> Would it be practical to just specify the major mode to use with
> htmlify in order to syntax highlight the block of code, as opposed to
> keeping a table of which types equate to which modes?
I expect that's the plan.
Cheers,
Phil
--
Phil Jackson
http://www.shellarchive.co.uk
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 18:20 ` Rick Moynihan
2008-01-29 18:32 ` Russell Adams
@ 2008-01-30 7:02 ` Bastien Guerry
1 sibling, 0 replies; 23+ messages in thread
From: Bastien Guerry @ 2008-01-30 7:02 UTC (permalink / raw)
To: Rick Moynihan; +Cc: emacs-orgmode, Carsten Dominik
Rick Moynihan <rick@calicojack.co.uk> writes:
> Also, Bastien... In blorg.el is it possible to include HTML snippets as
> blocks of markup inside the posts? For example embedding a video into a
> post?
Sadly not - but keep the pressure, it motivates me to work harder on the
next org-based blogging tool :)
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 16:04 ` Phil Jackson
2008-01-29 18:20 ` Rick Moynihan
@ 2008-01-30 7:17 ` Bastien Guerry
2008-02-05 16:51 ` Carsten Dominik
2 siblings, 0 replies; 23+ messages in thread
From: Bastien Guerry @ 2008-01-30 7:17 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode, Carsten Dominik
Phil Jackson <phil@shellarchive.co.uk> writes:
> So what do you think Carsten? I would like to see the:
>
> #+BEGIN_EXAMPLE lang:shell-script
> #+END_EXAMPLE
>
> That Bastien suggested. I would be willing to help out the exporter
> people if need be.
For the record, the full suggestion is here:
http://thread.gmane.org/gmane.emacs.orgmode/5053/focus=5057
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: FR: source code
2008-01-29 16:04 ` Phil Jackson
2008-01-29 18:20 ` Rick Moynihan
2008-01-30 7:17 ` Bastien Guerry
@ 2008-02-05 16:51 ` Carsten Dominik
2 siblings, 0 replies; 23+ messages in thread
From: Carsten Dominik @ 2008-02-05 16:51 UTC (permalink / raw)
To: Phil Jackson; +Cc: emacs-orgmode
On Jan 29, 2008, at 5:04 PM, Phil Jackson wrote:
> Phil Jackson <phil@shellarchive.co.uk> writes:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> [...]
>
>>>> I *personally* still can't decide if this is within org's scope
>>>> though, not to say I wouldn't find it very handy.
>
>>> So then am confused what you initial message was about. The feature
>>> your are asking for is then an exporting feature, right? Maybe you
>>> need to restate what exactly you would like to see.
>
>> Yes, I'm a confused young man. My final answer is: I would like to
>> see
>> syntax highlighted code in a HTML export :)
>
> So what do you think Carsten? I would like to see the:
>
> #+BEGIN_EXAMPLE lang:shell-script
> #+END_EXAMPLE
>
> That Bastien suggested. I would be willing to help out the exporter
> people if need be.
Hi Phil,
just to let you know: this idea is not forgotten. However, we have some
internal discussion about a big generalization of the exporters.
If that happens, things like special formatting of examples will be
easy to
add. Before being sure what is going to happen, I don't want to
be spending time with this.
However, since you have signed the papers now, feel free to implement
a proposal for the exporter. The routing where you want to hook into
might be org-cleaned-string-for-export - this is where the BEGIN_EXAMPLE
is currently turned into a quoted string. However, the fact that I am
pointing you to this routine might already show that the exporter
really needs a rewrite.
- Carsten
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2008-02-05 17:28 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 11:22 FR: source code Phil Jackson
2008-01-08 14:03 ` Bastien
[not found] ` <b71b18520801082003h7baccfa9t3a0cf936c07c086a@mail.gmail.com>
2008-01-09 4:04 ` Eddward DeVilla
2008-01-09 17:33 ` Ed Hirgelt
2008-01-09 17:50 ` Russell Adams
2008-01-09 22:21 ` Adam Spiers
2008-01-16 0:36 ` Bastien
2008-01-16 1:21 ` Eddward DeVilla
2008-01-16 1:55 ` Bastien
2008-01-16 2:33 ` Tim Stewart
2008-01-16 12:05 ` Bastien
2008-01-16 16:03 ` Tim Stewart
2008-01-16 16:21 ` Carsten Dominik
2008-01-16 18:59 ` Phil Jackson
2008-01-18 8:20 ` Carsten Dominik
2008-01-18 9:59 ` Phil Jackson
2008-01-29 16:04 ` Phil Jackson
2008-01-29 18:20 ` Rick Moynihan
2008-01-29 18:32 ` Russell Adams
2008-01-29 18:49 ` Phil Jackson
2008-01-30 7:02 ` Bastien Guerry
2008-01-30 7:17 ` Bastien Guerry
2008-02-05 16:51 ` Carsten Dominik
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).