From: Stefan Kangas <stefan@marxist.se>
To: 36391@debbugs.gnu.org
Subject: bug#36391: [PATCH] Improve an error message in bookmark.el
Date: Wed, 26 Jun 2019 12:50:08 +0200 [thread overview]
Message-ID: <CADwFkmne6xMQkjmkbWZCWtVdfyNNiKXFXNH4BvQ_ExWPKn6WBw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 132 bytes --]
The attached patch improves the error message when trying to run
bookmark-load on an invalid file or buffer.
Thanks,
Stefan Kangas
[-- Attachment #2: 0001-Improve-an-error-message-in-bookmark.el.patch --]
[-- Type: application/octet-stream, Size: 952 bytes --]
From 9d99b4737dc7c163fd9f7673315bcd4e92a4239a Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Wed, 26 Jun 2019 12:33:43 +0200
Subject: [PATCH] Improve an error message in bookmark.el
* lisp/bookmark.el (bookmark-alist-from-buffer): Improve error
message.
---
lisp/bookmark.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 5563ea646c..401e7e04a1 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -655,7 +655,9 @@ bookmark-alist-from-buffer
(forward-char -1)
(read (current-buffer)))
;; Else no hope of getting information here.
- (error "Not bookmark format")))))
+ (if buffer-file-name
+ (error "File not in bookmark format: %s" buffer-file-name)
+ (error "Buffer not in bookmark format: %s" (buffer-name)))))))
(defun bookmark-upgrade-version-0-alist (old-list)
--
2.21.0
next reply other threads:[~2019-06-26 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 10:50 Stefan Kangas [this message]
2019-07-06 14:36 ` bug#36391: [PATCH] Improve an error message in bookmark.el Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmne6xMQkjmkbWZCWtVdfyNNiKXFXNH4BvQ_ExWPKn6WBw@mail.gmail.com \
--to=stefan@marxist.se \
--cc=36391@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).