[Top][All Lists]

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

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

From: Eduardo Ochs
Subject: Re: [O] Moving my init.el to Org
Date: Sat, 6 Sep 2014 06:26:39 -0300

Hi all, I hope you don't mind me jumping into this thread to ask an
org-beginner question...

My .emacs is about 15000 lines long, and that's fine for me because I
have "anchors" at some points of it, and an index at the top, and
convenient ways to jump quickly to any anchors. If anyone is curious,
here are some links - my package that implements those things is
called eev.


I know that Org implements something similar to that, but I don't know
how to use it. This sexp, when executed,

  (find-angg ".emacs" "unquote-printable")

Jumps to the first occurrence of the string "<<unquote-printable>>" in
my ~/.emacs - in the htmlized version, the target of that sexp is:


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?

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?

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*? Or,
   better, how do we write sexps to expose what Org does? My guess is
   that that would be done be several sexps, more or less like this

     (org-hyperlink-method-and-args "file:///~/.emacs#<<unquote-printable>>")
     ;; --> (file-and-anchor "~/.emacs" "<<unquote-printable>>")

     (org-hyperlink-do 'file-and-anchor "~/.emacs" "<<unquote-printable>>")

  Thanks in advance! =)
  Eduardo Ochs

On Fri, Sep 5, 2014 at 11:49 PM, Thorsten Jolitz <address@hidden> wrote:
> Marcin Borkowski <address@hidden> writes:
>> Hi,
>> and thanks for all the great replies!
>> I ended up using orgstruct mode, which is probably the simplest one,
>> and (AFAIU) it will enable me to switch easily to outshine if (when?)
>> orgstruct is not enough for me.
>> And now there's another problem: I'd like to have my init file
>> collapsed to only headlines on opening.  Since I visit my init file
>> through a custom command (which finds it and turns on orgstruct), I
>> don't need to use file local variables for that - I just need a
>> command to do it.  So:
>> how do I (programmatically, in elisp) collapse the view of
>> an orgstruct .el file?
> Try 'org-overview'. Both, 'org-overview' and 'show-all' work
> with outshine too, so they should work with org-struct.
> --
> cheers,
> Thorsten

reply via email to

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