[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4250: 23.1; bookmark.el should raise reasonable error for empty file
bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry
Mon, 24 Aug 2009 15:14:50 -0700
I have code that allows for bookmarks that have no filename, that is,
where the `filename' entry in `bookmark-alist' is `(filename)'.
It would be ideal and most reasonable if vanilla Emacs simply ignored
such a bookmark - tolerance. More generally, it would be great if it would
tolerate any bookmark in `bookmark-alist' that it doesn't recognize.
If that is not something you agree about, then at least it should
raise a reasonable error - not just "wrong-type-arg stringp, nil",
whenever a "malformed" bookmark is encountered.
The code in `bookmark-default-handler' is an example of the problem.
The local variable `file' is bound to (bookmark-get-filename bmk) -
which returns nil if there is no `filename' entry or the `filename'
entry is `(filename)'.
The code then simply calls (file-exists-p nil), via
(bookmark-file-or-variation-thereof nil), raising the wrong-type-arg
In the alternative `if' branch, the code calls (find-file-noselect
nil), which has the same problem.
In general, it would be great if places where `bookmark-get-filename'
is called tested the result and treated nil by raising a
As I said, it would be even better if the bookmark.el code could be
made tolerant of any bookmark whose format it does not
bookmark.el already allows for applications and users to add new,
addtional entries. The problem is that it doesn't allow for
unexpected forms of the entries it predefines. It would be nice if it
were tolerant, and simply ignored any such bookmark (no error).
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
|[Prev in Thread]
||[Next in Thread]|
- bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry,
Drew Adams <=