From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug in org-store-link Date: Wed, 27 Feb 2008 11:20:31 -0500 Message-ID: <11120.1204129231@alphaville.zko.hp.com> References: <47C47935.7010800@u.washington.edu> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUP2l-0000yG-4b for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 11:22:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUP2i-0000wi-6f for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 11:22:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUP2h-0000wZ-TW for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 11:22:04 -0500 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JUP2h-0006wJ-M7 for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 11:22:03 -0500 In-Reply-To: Message from Carsten Dominik of "Wed, 27 Feb 2008 15:55:33 +0100." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Scott Otterson , emacs-orgmode@gnu.org Carsten Dominik wrote: > Hi Scott, this is not a small bug, but a problem that is really hard > to solve. > Supposed I used the exact line text to search, then you still have two > lines in the buffer > that would match. > > This is really about what strategy should be used to find a location > in a file that has possibly changed. > I have no good answer to that. Do you? > Two suggestions: o Use a line number, instead of a search pattern and don't worry about subsequent edits to the file that the link points to. o Use the find-tag strategy: go to the line number as an initial approximation. If the pattern is found there, done; if not, search around that point for the pattern and keep expanding the area of the search until found. I don't know if they still do it that way but I think that's how it was done some time ago. Nick