From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Waldenborg Subject: Re: Personal wiki Date: Fri, 29 Jul 2011 22:58:50 +0200 Message-ID: <20110729205850.GG5700@0x63.nu> References: <20110723212526.GB5700@0x63.nu> <87d3gzsctq.fsf@gnu.org> <20110724195759.GD5700@0x63.nu> <87wrf5q2yr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmu9E-0008Ih-Bn for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qmu9D-00050a-73 for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:59:08 -0400 Received: from 0x63.nu ([193.26.17.18]:59445 helo=gagarin.0x63.nu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmu9D-00050E-24 for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:59:07 -0400 Content-Disposition: inline In-Reply-To: <87wrf5q2yr.fsf@gnu.org> 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: Bastien Cc: emacs-orgmode@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