From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Ochs Subject: Re: Moving my init.el to Org Date: Sat, 6 Sep 2014 06:26:39 -0300 Message-ID: References: <20140831103706.549dc45b@aga-netbook> <20140905162710.3464a0db@aga-netbook> <878ulxbgzm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQCGY-0002LH-1A for emacs-orgmode@gnu.org; Sat, 06 Sep 2014 05:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQCGW-000105-He for emacs-orgmode@gnu.org; Sat, 06 Sep 2014 05:26:41 -0400 Received: from mail-qa0-x235.google.com ([2607:f8b0:400d:c00::235]:61050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQCGW-000101-E7 for emacs-orgmode@gnu.org; Sat, 06 Sep 2014 05:26:40 -0400 Received: by mail-qa0-f53.google.com with SMTP id w8so11838409qac.26 for ; Sat, 06 Sep 2014 02:26:39 -0700 (PDT) In-Reply-To: <878ulxbgzm.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode 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. http://angg.twu.net/.emacs.html http://angg.twu.net/eev-intros/find-eval-intro.html http://angg.twu.net/eev-intros/find-anchors-intro.html http://angg.twu.net/#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 "<>" in my ~/.emacs - in the htmlized version, the target of that sexp is: http://angg.twu.net/.emacs.html#unquote-printable So, questions: 1) what is the user-ish way to create a link in Org to the first occurrence of the string "<>" 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 pseudocode: (org-hyperlink-method-and-args "file:///~/.emacs#<>") ;; --> (file-and-anchor "~/.emacs" "<>") (org-hyperlink-do 'file-and-anchor "~/.emacs" "<>") Thanks in advance! =) Eduardo Ochs eduardoochs@gmail.com http://angg.twu.net/#eev On Fri, Sep 5, 2014 at 11:49 PM, Thorsten Jolitz wrote: > Marcin Borkowski 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 > >