From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] org-link-search fails if search string contains new lines Date: Wed, 29 Mar 2017 14:19:57 +0200 Message-ID: <87mvc4qnpu.fsf@nicolasgoaziou.fr> References: <87zig8vt48.fsf@fastmail.fm> <87inmvwynd.fsf@fastmail.fm> <87k27bj6hd.fsf@nicolasgoaziou.fr> <87h92eagyx.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctCa1-0007Ni-8l for emacs-orgmode@gnu.org; Wed, 29 Mar 2017 08:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctCa0-0008CV-FS for emacs-orgmode@gnu.org; Wed, 29 Mar 2017 08:20:01 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:35872) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctCa0-0008BG-9O for emacs-orgmode@gnu.org; Wed, 29 Mar 2017 08:20:00 -0400 Received: from saiph.selenimh (unknown [IPv6:2a03:a0a0:0:4301::74b]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CB83BA80E5 for ; Wed, 29 Mar 2017 14:19:58 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.88) (envelope-from ) id 1ctCZx-0003tH-CC for emacs-orgmode@gnu.org; Wed, 29 Mar 2017 14:19:57 +0200 In-Reply-To: <87h92eagyx.fsf@fastmail.fm> (Matt Lundin's message of "Mon, 27 Mar 2017 10:15:34 -0500") 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" To: Org Mode Hello, Matt Lundin writes: > Thanks Nicolas. Yes, it now works with multi-line searches that do not > contain blank lines. > > I think there are some instances in which one might want to search > across blank lines, such as when one captures a region that contains one > or more blank lines. E.g., let's say org-context-in-file-links is t (the > default). If one captures a section in org.el containing a blank line, > org-link-search will fail to locate the section. > > Here's a sample link to try it out. (It assumes an org-mode repository > at ~/org-mode). > > [[file:~/org-mode/lisp/org.el::(defsubst%20org-uniquify%20(list)%0A%20"Non-destructively%20remove%20duplicate%20elements%20from%20LIST."%0A%20(let%20((res%20(copy-sequence%20list)))%20(delete-dups%20res)))%0A%0A(defsubst%20org-get-at-bol%20(property)%0A%20"Get%20text%20property%20PROPERTY%20at%20the%20beginning%20of%20line."%0A%20(get-text-property%20(point-at-bol)%20property))%0A]] Fixed. Thank you. Regards, -- Nicolas Goaziou 0x80A93738