all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20845: 25.0.50; bookmark.el, handling of fictitious `buffer' property
@ 2015-06-18 15:26 Drew Adams
  2019-07-05 12:45 ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2015-06-18 15:26 UTC (permalink / raw)
  To: 20845

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'





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-03 22:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-18 15:26 bug#20845: 25.0.50; bookmark.el, handling of fictitious `buffer' property Drew Adams
2019-07-05 12:45 ` 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

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.