emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Moving my init.el to Org


From: Thorsten Jolitz
Subject: Re: [O] Moving my init.el to Org
Date: Sat, 06 Sep 2014 12:10:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eduardo Ochs <address@hidden> writes:

Hi, 

> So, questions:
>
> 1) what is the user-ish way to create a link in Org to the first
>    occurrence of the string "<<unquote-printable>>" in ~/.emacs?

see http://orgmode.org/manual/Internal-links.html

>
> 2) I know that Org lets users implement new kinds of hyperlinks. If
>    the syntax for doing what I asked in (1) is too clumsy, how do we
>    implement a better syntax?

and if its not too clumpsy? ;)

> 3) The
>
>      (find-angg ".emacs" "unquote-printable")
>
>    calls my functions to visit a file and jump to a position. How can
>    I jump to that position using Org's functions *from Lisp*? 


maybe calling

,----[ C-h f org-store-link RET ]
| org-store-link is an interactive autoloaded compiled Lisp function in
| `org.el'.
| 
| (org-store-link ARG)
| 
| Store an org-link to the current location.
| This link is added to `org-stored-links' and can later be inserted
| into an org-buffer with C-c C-l.
| 
| For some link types, a prefix arg is interpreted.
| For links to Usenet articles, arg negates `org-gnus-prefer-web-links'.
| For file links, arg negates `org-context-in-file-links'.
| 
| A double prefix arg force skipping storing functions that are not
| part of Org's core.
| 
| A triple prefix arg force storing a link for each line in the
| active region.
| 
| [back]
`----

Unfortunately many many org commands do not expose their args as
function arguments but unconditionally prompt for them, which makes
(re)using them in programs pretty difficult and is a real shame IMO.

One would need to change signature and interactive spec for many org
commands to make them easily available as kind of 'library functions',
and add an option for suppressing any user prompting for non-interactive
use. Then direct binding to keys would not be possible anymore, one
would need to use convenience commands or lambda expressions that take
care of the function arguments. 

-- 
cheers,
Thorsten




reply via email to

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