all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Kelly Dean'" <kellydeanch@yahoo.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Can't add bookmarks for help pages
Date: Mon, 11 Jun 2012 16:41:05 -0700	[thread overview]
Message-ID: <F50510EEBCFE496BA9B80A94B3F4D9ED@us.oracle.com> (raw)
In-Reply-To: <1339450507.69015.YahooMailClassic@web121503.mail.ne1.yahoo.com>

> 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	other threads:[~2012-06-11 23:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09 18:09 Can't add bookmarks for help pages Kelly Dean
2012-06-09 20:48 ` Drew Adams
2012-06-09 21:00   ` Drew Adams
2012-06-11 21:35   ` Kelly Dean
2012-06-11 23:41     ` Drew Adams [this message]
     [not found] <mailman.2514.1339265379.855.help-gnu-emacs@gnu.org>
2012-06-11 13:34 ` Stefan Monnier
2012-06-11 21:00   ` Drew Adams
2012-06-12  1:03     ` Stefan Monnier
2012-06-12 17:24     ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F50510EEBCFE496BA9B80A94B3F4D9ED@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kellydeanch@yahoo.com \
    /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 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.