emacs-devel
[Top][All Lists]
Advanced

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

Re: bookmark.el and lisp/gnus/gnus-bookmark.el


From: Bastien
Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el
Date: Sat, 08 Mar 2008 10:06:56 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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).

If we get rid of the annotation argument for this single function, it
means the annotation has to be done before this function returns sth
that can be used as the suggested name for the bookmark.  

I'm all for a single function -- see my "single hesitation" in this
thread.  I suggested an optional argument "name" so that this function
would only return a suggested name for the bookmark, or a complete
record if name is nil.  

(defun bookmark-make-record-for-my-mode (name)
  (if name
      (buffer-file-name) ; or sth else
    [return the record]))

With this solution, we could have a single function and get rid of the
annotation without making it mandatory to *read* the annotation before
`bookmark-set' is able to propose a suggested name.

What do you think?

BTW, reading a new annotation and sending it doesn't restore the window
configuration here.  I will fix this.

-- 
Bastien




reply via email to

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