emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Personal wiki


From: Anders Waldenborg
Subject: Re: [O] Personal wiki
Date: Fri, 29 Jul 2011 22:58:50 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

On Tue, Jul 26, 2011 at 02:51:08AM +0200, Bastien wrote:
> > Right. The difference is that aw-org-pw re-narrows when navigating to
> > a different section. Maybe that is a feature that would be useful
> > directly in org instead. Maybe pre/post-link-follow hooks could do
> > that?

When investigating how to implement this cleanly I found some code in
org-open-at-point that widens if link isn't found:

    (condition-case nil (eval cmd)
          (error (progn (widen) (eval cmd))))))


However I think there is a bug in there.

(eval cmd) will cause a "No match - create this as a new heading? (y
or n)" question if the link couldn't be found. So I think it should be:

    (condition-case nil (let ((org-link-search-inhibit-query t))
                           (eval cmd))
          (error (progn (widen) (eval cmd))))))
            
Otherwise one would need to answer "n" to the question to widen and
find the link.

Should I submit a proper bugreport (and a patch?).

> Mmhh.. do you really use this often?  I mean: it's quite useful to work
> from a wide buffer when navigating -- narrowing is just for quickly
> focusing on something.  (But maybe I should rather test your file and
> see how useful it can be.)

In my setup I have very different topics in same file, and the reason
I want to narrow is to avoid getting distracted. I want to emulate a
wiki with different pages. And a such I don't expect things to put in
a proper hierarchy, meaning that there will just be a bunch of
disorganized top level headers.

Without narrowing I would be looking at something like:

"""
* Unrelated heading...
* Another unrelated heading...
* Something I find interesting but don't want to think about now...
* The "page" I'm viewing

here be the contents I want to focus on now

* Hey I'm a heading that wants to distract you...
"""


> > Also aw-org-pw autowidens on isearch. (the reason for that is that when
> > used as a personal wiki each section should be small, so searching is
> > seldom required within a section, and searching the full "wiki" is
> > more useful).
> 
> Okay - since narrowing in Org is not that frequent and Org files can 
> be very large, I guess it's better to *not* auto-widen on isearch.

I created a separate (and not org specific) minor-mode that autowidens
on isearch.

 anders



reply via email to

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