emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Waldenborg <anders@0x63.nu>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Personal wiki
Date: Fri, 29 Jul 2011 22:58:50 +0200	[thread overview]
Message-ID: <20110729205850.GG5700@0x63.nu> (raw)
In-Reply-To: <87wrf5q2yr.fsf@gnu.org>

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	other threads:[~2011-07-29 20:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 21:25 Personal wiki Anders Waldenborg
2011-07-24 19:22 ` Bastien
2011-07-24 19:57   ` Anders Waldenborg
2011-07-26  0:51     ` Bastien
2011-07-29 20:58       ` Anders Waldenborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110729205850.GG5700@0x63.nu \
    --to=anders@0x63.nu \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).