From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Otterson Subject: Re: bug in org-store-link Date: Wed, 27 Feb 2008 12:28:58 -0800 Message-ID: <47C5C80A.1030601@u.washington.edu> References: <47C47935.7010800@u.washington.edu> <11120.1204129231@alphaville.zko.hp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0037307615==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUStm-0001W3-GY for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 15:29:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUSti-0001Uh-Pm for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 15:29:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUSti-0001Ub-ML for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 15:29:02 -0500 Received: from mxout5.cac.washington.edu ([140.142.32.135]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JUSti-00072c-8a for emacs-orgmode@gnu.org; Wed, 27 Feb 2008 15:29:02 -0500 In-Reply-To: <11120.1204129231@alphaville.zko.hp.com> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org --===============0037307615== Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Yes, starting with line numbers sounds like a good idea.  So far, then, the suggestion in its full glory is:
  •  link storage
    •  include punctuation in matching pattern
    •  expand matching pattern outwards until matching uniqueness is assured across the whole file
    • store  line number
  • link search
    • start at stored line number
    • expand outwards until an exact match is found (update stored line number if match has moved?)
    • if no exact match is found, scan the whole buffer for the best soft match  eg. minimum Levenshtein distance (update stored line number and pattern if match has moved?  Better ask the user.)
Scott

Nick Dokos (02/27/2008 08:20 AM) wrote:
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
  
--===============0037307615== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0037307615==--