From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20845: 25.0.50; bookmark.el, handling of fictitious `buffer' property Date: Fri, 05 Jul 2019 09:46:31 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="158595"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 20845@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 05 16:10:38 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjOv7-000elD-7F for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 16:10:37 +0200 Original-Received: from localhost ([::1]:53440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjOjw-0002oi-I2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 09:59:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41700) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjOYX-0001XW-1E for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:47:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjOYL-0001R8-8l for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:47:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43730) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjOYJ-0001Jd-Gv for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:47:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjOYI-0001hg-Ck for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jul 2019 13:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20845 X-GNU-PR-Package: emacs Original-Received: via spool by 20845-submit@debbugs.gnu.org id=B20845.15623344106525 (code B ref 20845); Fri, 05 Jul 2019 13:47:02 +0000 Original-Received: (at 20845) by debbugs.gnu.org; 5 Jul 2019 13:46:50 +0000 Original-Received: from localhost ([127.0.0.1]:52551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjOY6-0001hB-6O for submit@debbugs.gnu.org; Fri, 05 Jul 2019 09:46:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjOY3-0001gn-5v for 20845@debbugs.gnu.org; Fri, 05 Jul 2019 09:46:48 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 817A6100870; Fri, 5 Jul 2019 09:46:40 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DF2D31004B3; Fri, 5 Jul 2019 09:46:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1562334397; bh=0N1YSKpU2EWSMoDmwGxoYR6Gf68Wf545sN6leECjYbo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hVjysw1cCcRxL4ZZxOxV+xP+txQ5yW18AW6xbgOUbxHZK9r6WLzYpIyTju7W6mv0l MW3b2ZqbTPSOYWEVfGXGViZNIYGSTqBBttD8mjGle4U3b28dMZCvrLCOIsiJAckff6 2HVu9MVZaHIdxzI+y4Ht6Il9ZRGXzXlpAB6oDhHWieknJ76qA58pWFrnm1A8l3feQI /IITzOmCwP4WxXkSOi4uaxegm1rUupuUpPi7haJrT6neFE34SVkN70UQHKyb8PEGTI sBcy9E9n6qTepnRv/Nd87CxSoCI66/gbksEIhvS9EjT+o2lViTUSwt0wlynbyEUNaw B/HSk8dVu093w== Original-Received: from pastel (76-10-138-228.dsl.teksavvy.com [76.10.138.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8B7E21200CE; Fri, 5 Jul 2019 09:46:37 -0400 (EDT) In-Reply-To: (Stefan Kangas's message of "Fri, 5 Jul 2019 14:45:19 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162131 Archived-At: > I'm looking into Emacs Bug#20845 which asks about the purpose of the > "bookmark" property in bookmark.el. I don't see any `bookmark` property, sorry. >> Function `bookmark-default-handler' picks up and handles the property >> (field) named `bookmark', if present. Where? >> I see nowhere else where this property is used, and nowhere where it is >> set. And it is not documented. Sounds like the description of leftover code. Usually it's either because of an oversight or for backward compatibility purposes. >> IOW, there is no notion or existence (AFAICT) of any bookmarks that >> record a `buffer' property. Which property are we talking about, `buffer` or `bookmark`? >> * If the file is readable and is not visited then it visits the file >> using `find-file-noselect'. Why? I'll assume this question was the result of a temporary confusion on Drew's part, since I think it's pretty obvious why we'd want to visit the file here. >> * Otherwise, if the buffer named by property `buffer' exists then the >> default handler does nothing (no-op). No: it selects that buffer as the current buffer. > This handling was added in this commit: > > commit dbf8402bc76a775284905f09399b4d88ee0c03e5 > Author: Stefan Monnier > Date: Wed Feb 10 15:02:54 2010 -0500 > > (bookmark-handle-bookmark): Catch the right error. > (bookmark-default-handler): Accept new bookmark field `buffer'. And it had been earlier removed by: commit 13901bcbc4926630bdb2127301af0cdf7bcc50f7 Author: Karl Fogel Date: Mon Oct 5 01:35:34 2009 +0000 so my commit re-instated support for it. > But trying to find out why this was committed made me even more > confused. I could find Stefan Monnier arguing against this change on > two different occasions: > > 2010-01-25 - https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5476#14 > 2010-01-26 - https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5476#20 Good digging, thanks. > I understand this was a long time ago, but if you still remember it, > do you think you could help shed some light into the purpose of this > code? I can't remember why I accepted to install it, but these discussions seem to indicate that the purpose for the patch was to preserve compatibility with old bookmarks that don't use their own bookmark handler. > The suggestion given by Drew above is to remove it. > Do you have an opinion about that? Not really, no. But such "old-style" bookmarks might still be used by third-party packages and might still appear in users's ~/.emacs.d/bookmarks, so if we want to remove support for it, maybe we should try and do it gradually. [...taking a second look...] Oh, I see how/where it's used and it's definitely still used: Info-bookmark-jump uses it (i.e. not in the stored bookmark object, but in a transient object passed to bookmark-default-handler). So maybe it should be documented in the docstring of `bookmark-default-handler` for the benefit of other handlers. Stefan