From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Maurer Newsgroups: gmane.emacs.help Subject: Re: associating bookmarks with paragraphs Date: Tue, 11 Dec 2018 09:03:18 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1544515320 1856 195.159.176.226 (11 Dec 2018 08:02:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2018 08:02:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 11 09:01:56 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWczK-0000Mr-Of for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2018 09:01:54 +0100 Original-Received: from localhost ([::1]:36460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWd1Q-0008Ut-Ts for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2018 03:04:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWd0q-0008Ul-Cc for help-gnu-emacs@gnu.org; Tue, 11 Dec 2018 03:03:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWd0p-0000hN-Go for help-gnu-emacs@gnu.org; Tue, 11 Dec 2018 03:03:28 -0500 Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:45376) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gWd0p-0000gs-8w for help-gnu-emacs@gnu.org; Tue, 11 Dec 2018 03:03:27 -0500 Original-Received: by mail-oi1-x235.google.com with SMTP id y1so9509864oie.12 for ; Tue, 11 Dec 2018 00:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=IvyLUV0o7cAZKrY6XS3z9IbRDIak40nTYwEre622sI8=; b=WZGCH5TdgWxw7aQij3qqT5FJ6y0Z9dGK3SpU2yz3hwgbzRn2o008w/lpN1kA69ZeiJ kytfb/7pN2g3S+0vkkegUfyaZDVb0Wd+4RZJQ74u8CdbralZi3H5nXzcyRG8FUReeymE VqR0zA34pGMwt+L4O1h4j/pZqemgZdbXbcTz/ybuAiXJJxF6YbhEAXs6P2gfsrAtvyM4 idiTgR2I6dLelbeDdKQD0hW3EiyT9J31aQLUoxgZQ4LFnnzHo7B6McCEWcZgWODKST7g HHAAcDaroWYycFPDiELKioF6Rl5R1s+Y8rmWKpIOoIkMcGAFCoDmfrc9oroui7kdAC7S ZX1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=IvyLUV0o7cAZKrY6XS3z9IbRDIak40nTYwEre622sI8=; b=nFlGrot1JHPPak/pYTh5Cco+l8qXLwyL1KrWI2D8Xuib7dMILvwUBL7kgU+OVNVCnN zKfuUoCPoJDcG0hbw97qh2ImREWkYnCqkdLjYIR7KuaFLYnlV/47cctE34DUw8XN4jtz Nkn91ObLhlESPfp9d047+k0VE2T/MeoUc2clvVCdHgv68/Pzco5vf9tVmOq3ymyq6mP2 7gYd0vJQyJOK72PTEXs/QrJIKccqRHSmM88Xm/WsbLcH4qrg3Hs/M/KbszXRZz8JZus0 A1lHTAlYI7BQZzxypVaR93OQUZRclGSbaKwMzvf0H55ha+FOppkg0QDwwF9L+NxgC0ey xufg== X-Gm-Message-State: AA+aEWbwM9W0+qebNX8fkPzNyN1AfX+1kWUqDR2ppme6ccAqD7VkyBKz EiHgIFzrx0g+R8BhLmu60cGxLypFyJ/i50u1wOqUvA== X-Google-Smtp-Source: AFSGD/UqWUm3tMua5+l9FrDfGhZuqrpGa0uzmrUVvIi1hQ8jO8OFRoJ2HQ4zfBFkiK8L0qBDRGn4YkFcW9si5D6928c= X-Received: by 2002:aca:ea84:: with SMTP id i126mr701657oih.84.1544515405665; Tue, 11 Dec 2018 00:03:25 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118961 Archived-At: On Thu, 6 Dec 2018 at 17:42, Drew Adams wrote: ... snip ... > 2. But maybe you meant something completely different. > Maybe meant only that you want to bookmark the position > of a paragraph and then jump to that later, and have that > jump be accurate even if that paragraph has been moved > to a different location in your buffer/file? > > If that's all you're asking then the answer is yes, that's > what Emacs does already - see above, about automatically > relocating a bookmarked position by searching for its > recorded context. > > However, if the recorded context is no longer relevant > at all then Emacs won't be able to relocate the new > position accurately. > > There is another possibility that can help here. With > Bookmark+ you can bookmark not only a single position, > with its surrounding context, but two positions, with > their surrounding context. > > This happens if you bookmark the active region, i.e., > select your paragraph before bookmarking it. > > If option `bmkp-use-region' is non-nil (the default) > then when you jump to a bookmark that records the > region (beginning and end positions, and surrounding > text), the targeted text that you jump to is highlighted > as the active region. > Yes, this is what I was aiming at. I'll give it a try. Just one question: How is Emacs able to determine the relevancy of context? I guess this only works with writing code? Doesn't this go into semantics? I'm probably mistaking "context" for something far more complicated here.