From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Bastien <bzg@altern.org>
Cc: Karl Fogel <kfogel@red-bean.com>,
Tassilo Horn <tassilo@member.fsf.org>,
Reiner Steib <reiner.steib@gmx.de>,
emacs-devel@gnu.org
Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el
Date: Fri, 07 Mar 2008 21:38:49 -0500 [thread overview]
Message-ID: <jwvod9q54kp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874pbiypad.fsf@bzg.ath.cx> (Bastien's message of "Sat, 08 Mar 2008 01:31:38 +0000")
>>> (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
next prev parent reply other threads:[~2008-03-08 2:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 18:06 bookmark.el and lisp/gnus/gnus-bookmark.el Karl Fogel
2008-03-06 18:45 ` Stefan Monnier
2008-03-06 19:51 ` Bastien
2008-03-06 20:29 ` Karl Fogel
2008-03-06 20:39 ` Bastien
2008-03-06 20:42 ` Karl Fogel
[not found] ` <87iqzz7xr8.fsf@member.fsf.org>
2008-03-07 17:05 ` Karl Fogel
2008-03-07 17:25 ` Bastien
2008-03-06 21:27 ` Stefan Monnier
2008-03-06 23:15 ` Bastien
2008-03-07 8:24 ` Tassilo Horn
2008-03-07 12:29 ` Bastien
2008-03-07 14:07 ` Tassilo Horn
2008-03-07 14:13 ` Bastien
2008-03-07 15:12 ` Tassilo Horn
2008-03-07 17:08 ` Karl Fogel
2008-03-07 17:20 ` Bastien
2008-03-07 17:34 ` Karl Fogel
2008-03-07 17:45 ` Bastien Guerry
2008-03-07 18:08 ` Karl Fogel
2008-03-07 18:19 ` Bastien
2008-03-07 19:34 ` Bastien Guerry
2008-03-07 21:51 ` Stefan Monnier
2008-03-07 22:40 ` Stefan Monnier
2008-03-08 1:31 ` Bastien
2008-03-08 2:38 ` Stefan Monnier [this message]
2008-03-08 2:43 ` Karl Fogel
2008-03-08 10:06 ` Bastien
2008-03-08 19:54 ` Stefan Monnier
2008-03-08 20:47 ` Bastien
2008-03-08 23:20 ` Stefan Monnier
2008-03-10 2:29 ` Karl Fogel
2008-03-08 11:35 ` Reiner Steib
2008-03-08 11:56 ` Bastien
2008-03-07 12:23 ` Bastien
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=jwvod9q54kp.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=bzg@altern.org \
--cc=emacs-devel@gnu.org \
--cc=kfogel@red-bean.com \
--cc=reiner.steib@gmx.de \
--cc=tassilo@member.fsf.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).