[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bookmark.el and lisp/gnus/gnus-bookmark.el
From: |
Stefan Monnier |
Subject: |
Re: bookmark.el and lisp/gnus/gnus-bookmark.el |
Date: |
Fri, 07 Mar 2008 21:38:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> (defun bookmark-make-record-for-text-file (annotation &optional name)
>>> "Return the record.
>>> If optional arg NAME is non-nil, just return the default name for
>>> this bookmark."
>>> ...)
>>
>>> I think it's easier. Each mode should have to worry about one
>>> buffer-local variable (and each dev would only read one docstring...)
>>
>> This might work, tho I'd throw away the `name' arg. Let the
>> buffer-local function build a bookmark record (i.e. a cons cell of the
>> form (NAME . ALIST)) with any name it chooses, and then change the name
>> according to the user's choice. I.e. make the bookmark record before
>> even prompting the user for a name.
> Following Karl advice I've applied a different patch. There is now
> `bookmark-make-name-function' *and* `bookmark-make-record-function',
> both buffer local. For an example on how this is supposed to work
> look at the changes I've made in info.el.
> I think it's okay like this. If you plan to change anything please
> tell me before I work on gnus-bookmark.el.
I think we should do as I suggest above: a single function of no
arguments that is called first that returns a bookmark record, including
a suggested name (which can be nil so as to use the default heuristic
to decide the default bookmark name).
This has another advantage: since the function is called first, it can
signal an error if the bookmark can't be created (e.g. if
buffer-file-name is nil), so we can drop the (or (local-variable-p ...)
(bookmark-buffer-file-name) (error ...)) test which is currently forced
to guess whether the actual bookmark construction function will work.
Stefan
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, (continued)
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien Guerry, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien Guerry, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el,
Stefan Monnier <=
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/09
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Reiner Steib, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07