From: Drew Adams <drew.adams@oracle.com>
To: 20845@debbugs.gnu.org
Subject: bug#20845: 25.0.50; bookmark.el, handling of fictitious `buffer' property
Date: Thu, 18 Jun 2015 08:26:17 -0700 (PDT) [thread overview]
Message-ID: <45ac4463-d787-44d9-90ef-b40e32698ed9@default> (raw)
Function `bookmark-default-handler' picks up and handles the property
(field) named `bookmark', if present.
I see nowhere else where this property is used, and nowhere where it is
set. And it is not documented.
IOW, there is no notion or existence (AFAICT) of any bookmarks that
record a `buffer' property. And yet, the *default* handler handles
this unknown property - in two ways:
* If the file is readable and is not visited then it visits the file
using `find-file-noselect'. Why?
* Otherwise, if the buffer named by property `buffer' exists then the
default handler does nothing (no-op). The (non-English) comment here
is "See if buffer BUF have been created.", which tells us nothing
about why it is handled by doing nothing.
This partial "handling" of the undocumented and never-set property
`buffer' was apparently introduced in Emacs 23.1. As it never did
anything, it was seemingly never noticed.
This property should either be properly documented (in the doc string of
`bookmark-alist'), as to its use and meaning, or its default "handling"
should be removed, as misguided. I'd suggest that the unclear handling
should just be removed.
If there is some existing code distributed with Emacs that actually uses
this property (and I can find none) then a bug can be filed for it.
A grep of the Emacs sources for `bookmark-prop-set' shows no occurrences
of that function outside bookmark.el, and that function is never used to
set property `bookmark'. I have also checked all occurrences of
`bookmark-make-record' in the Emacs Lisp sources, and found none that
set or use property `bookmark'.
AFAICT, this property does not exist, and its incomplete "handling"
should be removed.
On the other hand, if this handling was just added to bookmark.el by
someone only as support for some 3rd-party code, then it doesn't belong
here anyway - that 3rd-party code can advise `bookmark-default-handler'
or simply define its own, non-default, handlers.
In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'
next reply other threads:[~2015-06-18 15:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 15:26 Drew Adams [this message]
2019-07-05 12:45 ` bug#20845: 25.0.50; bookmark.el, handling of fictitious `buffer' property Stefan Kangas
2019-07-05 13:46 ` Stefan Monnier
2019-07-05 14:04 ` Stefan Kangas
2019-07-05 17:16 ` Drew Adams
2019-07-05 20:39 ` Noam Postavsky
2019-07-05 21:35 ` Drew Adams
2019-07-05 20:51 ` Stefan Monnier
2019-07-05 21:33 ` Drew Adams
2022-02-03 21:16 ` Lars Ingebrigtsen
2022-02-03 22:03 ` bug#20845: [External] : " Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45ac4463-d787-44d9-90ef-b40e32698ed9@default \
--to=drew.adams@oracle.com \
--cc=20845@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.