From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: gnus-registry flags API
Date: Wed, 05 Mar 2008 13:00:54 -0600 [thread overview]
Message-ID: <863ar5807t.fsf@lifelogs.com> (raw)
In-Reply-To: <86bq5u9kkd.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 04 Mar 2008 16:43:46 -0600")
On Tue, 04 Mar 2008 16:43:46 -0600 Ted Zlatanov <tzz@lifelogs.com> wrote:
TZ> I couldn't figure out the text properties, or how to update the summary
TZ> line as soon as a flag is set. For now I've comitted a function
TZ> gnus-registry-user-format-function-M that shows the flags (unsorted, in
TZ> the order they were set). But the user has to exit the group and
TZ> re-enter it to see the new flags. I'll take a look again but if someone
TZ> knows how to do it, please let me know to save me all the work.
I still haven't done text properties, but the rest is working now. See
gnus-registry-user-format-function-M and gnus-registry-install-shortcuts
for the details.
TZ> Also the string-building construct in that function
...
TZ> (setq out (format "%s%s"
TZ> out
TZ> (if c
TZ> (char-to-string c)
TZ> "")))))
...
TZ> is ugly. How would I do the same with mapcar? I couldn't find a nice
TZ> way to eliminate nil entries (when the flag has no :char property) from
TZ> the resulting list I would pass to concat; concat would get a list like
TZ> (?l ?i nil) and fail.
I figured it out, you just do (concat list1 nil list2) and it does the
right thing. I didn't read the docs carefully.
TZ> The functions are dynamically generated from the gnus-registry-marks
TZ> list, but I couldn't figure out how to generate the gnus-define-keys
TZ> call (as I mention in the comments). Also it seems that each call will
TZ> reset previously defined shortcuts. If anyone knows, please tell me
TZ> using function-name and shortcut.
I figured this out, and gnus-registry-install-shortcuts will DTRT for
keyboard shortcuts. The menus are hard-coded in gnus-sum.el and I
didn't think it was useful to generate them dynamically.
TZ> Where should the menu shortcuts live?
I put them under Gnus->Registry Marks to be near the other mark
operations.
Remaining:
- call (gnus-registry-install-p) in Gnus startup
- make gnus-registry-install-p call Customize if appropriate, I'm not
sure
- text properties and images for each flag
It's finally coming together, so please test the functionality and let
me know what you think.
Thanks
Ted
next prev parent reply other threads:[~2008-03-05 19:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 16:26 Ted Zlatanov
2007-09-25 19:58 ` Bastien
2007-09-25 23:40 ` Leo
2007-12-19 1:22 ` Ted Zlatanov
2008-01-03 17:10 ` Reiner Steib
2008-01-03 17:55 ` Ted Zlatanov
2008-01-04 17:43 ` Reiner Steib
2008-01-15 21:56 ` Ted Zlatanov
2008-01-16 21:52 ` Ted Zlatanov
2008-02-06 17:17 ` Ted Zlatanov
2008-02-16 20:26 ` Reiner Steib
2008-02-28 15:12 ` Ted Zlatanov
2008-02-28 20:04 ` Reiner Steib
2008-02-29 23:19 ` Ted Zlatanov
2008-03-04 22:43 ` Ted Zlatanov
2008-03-05 19:00 ` Ted Zlatanov [this message]
2008-03-06 21:50 ` Ted Zlatanov
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=863ar5807t.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.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.
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 NNTP newsgroup(s).