* bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry
@ 2009-08-24 22:14 Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2009-08-24 22:14 UTC (permalink / raw
To: bug-gnu-emacs
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
error.
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
bookmark-level error.
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
recognize.
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)'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry
@ 2009-09-13 22:22 Chong Yidong
2009-09-13 22:26 ` Karl Fogel
0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2009-09-13 22:22 UTC (permalink / raw
To: kfogel; +Cc: 4250
Hi Karl,
Could you take a look at bug#4250 for the bookmark package? Thanks.
(Drew Adams has filed a few other bookmark.el bugs in the bug tracker,
and if you could look at them as well, that would be good. Thanks.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry
2009-09-13 22:22 bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry Chong Yidong
@ 2009-09-13 22:26 ` Karl Fogel
2009-09-14 20:29 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Karl Fogel @ 2009-09-13 22:26 UTC (permalink / raw
To: Chong Yidong; +Cc: 4250
Chong Yidong <cyd@stupidchicken.com> writes:
> Hi Karl,
>
> Could you take a look at bug#4250 for the bookmark package? Thanks.
>
> (Drew Adams has filed a few other bookmark.el bugs in the bug tracker,
> and if you could look at them as well, that would be good. Thanks.)
Yes, I will take a look. Thank you for bringing it to my attention.
-Karl
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry
2009-09-13 22:26 ` Karl Fogel
@ 2009-09-14 20:29 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2009-09-14 20:29 UTC (permalink / raw
To: 'Karl Fogel', 4250, 'Chong Yidong'
> > Could you take a look at bug#4250 for the bookmark package? Thanks.
> >
> > (Drew Adams has filed a few other bookmark.el bugs in the
> > bug tracker, and if you could look at them as well, that
> > would be good. Thanks.)
>
> Yes, I will take a look. Thank you for bringing it to my attention.
Thanks. When you can, please take a look also at the bookmark.el bugs filed by
Thierry Volpiatto.
Thx - Drew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-14 20:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-13 22:22 bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry Chong Yidong
2009-09-13 22:26 ` Karl Fogel
2009-09-14 20:29 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2009-08-24 22:14 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.