help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Can't add bookmarks for help pages


From: Drew Adams
Subject: RE: Can't add bookmarks for help pages
Date: Mon, 11 Jun 2012 16:41:05 -0700

> Thanks, but the first time I tried it (this is also the first 
> time I tried Bookmark Plus), I got the message 
> "bmkp-bookmark-name-member: Args out of range: 0, 0", and all 
> of my bookmarks disappeared in the *Bookmark List* buffer.
>
> I killed and restarted Emacs, and when I pressed C-x r l, I got 
> the same message again, and it doesn't list any bookmarks. I 
> didn't lose any data which matters; I'm still just evaluating 
> Emacs, not using it yet.

1. Thanks for the report, Kelly.  Sorry for your trouble.

2. It is a good idea to back up your bookmark file(s) from time to time, and in
particular before you try any new bookmark-related code. ;-)

3. That problem should be fixed now.  Please download file bookmark+-1.el again.

> While trying to reproduce the problem, I deleted the Bookmark Plus
> elc files which I'd generated

Good.  It's a good idea to test first with source files, before trying
byte-compiled versions.

> and deleted my-make-help-record and my-jump-help-bookmark from my init 
> file, so the problem must be just with Bookmark Plus, or 
> Emacs, or how I'm using them.
> Using Emacs 24.1:

FWIW, `M-x emacs-version' gives more precise info about the version.
There are lots of "Emacs 24.1" out there, and they can be quite different.

> Another try:
> rm ~/.emacs.d/bookmarks
> emacs #Using the same init file
> C-x C-f foo ret
> C-x r m ret
> I get "bmkp-autonamed-bookmark-p: Wrong type argument: stringp, nil"

You entered an empty bookmark name, and apparently no default name was
available.  So you ended up with a bookmark with an empty name.  This should be
prevented now - try the latest bookmark+-1.el.

> C-x r m foo ret
> C-x r l
> I get "let: Args out of range: 0, 0"
> C-x C-c

That's the first problem you mentioned, I think.

> Emacs writes (custom-set-variables 
> '(bmkp-last-as-first-bookmark-file "~/.emacs.d/bookmarks")) 
> to my init file without asking me first.

Yes, it does.  This is a feature.  It's your choice, but it's opt-out, not
opt-in.  You can turn it off by customizing option
`bmkp-last-as-first-bookmark-file' (setting it to nil).

See: (1) the doc string of option `bmkp-last-as-first-bookmark-file'
     (2) http://www.emacswiki.org/cgi-bin/wiki/BookmarkPlus#toc37

If you want to have a better idea of what Bookmark+ does and why, take a look at
the doc.  If you're worried about what it might do, read about it before using
it.

> BTW, I happened to skim through bookmark+-mac.el and noticed this:
> ;;      In particular, ALWAYS LOAD `bookmark+-mac.el' (not
> ;;      `bookmark+-mac.elc') BEFORE YOU BYTE-COMPILE new versions of
> ;;      the files, in case there have been any changes to Lisp macros
> ;;      (in `bookmark+-mac.el').
> ;;
> ;;      (This is standard procedure for Lisp: code that depends on
> ;;      macros needs to be byte-compiled anew after loading the
> ;;      updated macros.)
>
> If I byte-compile Bookmark Plus, then in a few months when I 
> update, I'm going to forget your warning, and I'm going to 
> suffer whatever consequences result. Maybe the new packaging 
> system in Emacs 24 helps with such dependency issues?

As the note says, this is standard practice for Lisp.

If the only code that uses a particular macro is in the same file as the macro
definition (and occurs after it), then the caveat is a no-op.  Otherwise, users
of Lisp code that defines and uses macros need to be aware of this in general.
It is not specific to Bookmark+.

Yes, autoloading can help take care of this.  Bookmark+ still needs a few
autoload tweaks to get it to play well with package.el etc.  But it is good to
know about Lisp macros and get in the habit of loading them first, before
byte-compiling code that uses them.  The good news is that that macros file does
not change very often.

Again, sorry for your trouble.  Please try downloading bookmark+-1.el again.
Let me know if you run into another problem.  You can email me off list if you
prefer.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]