emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [BABEL][PROPOSAL] headlines as executable srcnames


From: Jambunathan K
Subject: [Orgmode] Re: [BABEL][PROPOSAL] headlines as executable srcnames
Date: Mon, 20 Sep 2010 13:09:48 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (windows-nt)

Eric

> Hi Jambunathan,
>
> So, if I'm understanding correctly, what you are proposing includes two
> separate things, first, a new link-style syntax for calling code blocks,
> and second, the ability to provide un-named arguments to code blocks.
>
> I'm less sure about expanding link syntax into a means of calling code
> blocks.  There has been some recent discussion on the list about
> expanding link syntax (in fact related to the thread your referenced
> below) and my impression was that there is far from unanimous support
> for changing the semantics of links in Org-mode.  Maybe this would be
> appropriate as an optional extension to org, i.e. something in the
> contrib directory.
>

I think I am converging towards having a new 'babel: ' URL scheme.

Requests like colorization, inserting version control information etc on
export rightfully falls under one-off request and a babel: URL scheme
would help achieve all these without any hassles.

In 'babel: ' URLs, the 'path' param is likely to contain a call-site
(srcname) and key,val pairs (for named params). I think one can use or
draw inspiration from standard http URL encoders that posts HTML forms.

My ideas are not fully formed and I refine as I go along... Please be
tolerant.

Jambunathan K.

>> ,----
>> | "*Article*" #("From: Vinh Nguyen <address@hidden>
>> | Subject: Re: text color + highlight
>> | Newsgroups: gmane.emacs.orgmode
>> | To: address@hidden
>> | Date: Thu, 9 Sep 2010 09:15:05 -0700
>> | Message-ID: <address@hidden>
>> | Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/30143>
>> | 
>> | I'd like to write a concluding email for this thread for future
>> | searchers to find.  This easy solution is brought to you by Eric
>> | Schulte and Christian Moe.
>> | 
>> | Place the following in your .emacs or init.el file:
>> | ;; org-mode color
>> | (org-add-link-type
>> |  \"color\" nil
>> |  (lambda (path desc format)p
>> |   (cond
>> |    ((eq format 'html)
>> |     (format \"<span style=\\\"color:%s;\\\">%s</span>\" path desc))
>> |    ((eq format 'latex)
>> |     (format \"{\\\\color{%s}%s}\" path desc)))))
>> | ;; org-mode highlight
>> | (org-add-link-type
>> |  \"hl\" nil
>> |  (lambda (path desc format)
>> |   (cond
>> |    ((eq format 'html)
>> |     (format \"<font style=\\\"background-color:%s;\\\">%s</font>\" path 
>> desc))
>> |    ((eq format 'latex)
>> |     (format \"\\\\colorbox{%s}{%s}\" path desc))))) ;; require 
>> \\usepackage{color}
>> | 
>> | Examples:
>> | [[color:blue][test this out]]
>> | [[hl:yellow][highlighted text]]
>> | 
>> `----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]