Gnus development mailing list
 help / color / mirror / Atom feed
From: Paul Moore <gustav@morpheus.demon.co.uk>
Subject: Re: User format functions - text properies get lost (XEmacs)
Date: Mon, 14 Oct 2002 22:00:08 +0100	[thread overview]
Message-ID: <n2m-g.k7kkviqv.fsf@morpheus.demon.co.uk> (raw)
In-Reply-To: <87r8ettekh.fsf@crybaby.cs.uni-dortmund.de>

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Paul Moore <gustav@morpheus.demon.co.uk> writes:
>
>> I'd appreciate any comments - this is my first attempt at submitting a
>> patch for Gnus, so I apologise if I've made any obvious blunders, in
>> coding or in procedure.
>
> If it works for you, that should be okay.  It's a little suspicious
> that it only handles %s and not, say %-20,20s.  But if it's enough
> for you, why not.

As far as I can see, Gnus only generates %s (and %%) under xemacs. If
gnus-use-correct-string-widths is nil (which is not the default) then
%20s can be generated, but in that case my code just falls through to
the default case (use format). So the formatting still happens OK,
it's just that text properties get lost in that case.

But is "it works for me" a good enough reason for a patch going into
Gnus? It doesn't feel to me as if this is "complete" - it needs
performance tuning, and it may need making optional (if the
unavoidable performance impact is non-trivial). But I don't know how
to do these things. I don't even know how to measure the performance
:-(

What's the next step for me if I want to get this included in Gnus?
I'm happy to work with someone developing the code, but if it's left
to me, it won't happen.

There's a real (if rare) issue here. There is no general workaround
available in user code - Gnus doesn't have the hooks to allow user
code to interact with this phase of summary buffer generation. My
patch works around the limitation (bug) in XEmacs, but it's not
without cost. Maybe there's a better alternative, which doesn't need
to work this way, but I can't follow the code well enough to see it.

Just to re-clarify the original requirement - I want to make a part of
the summary line have an alternative face in certain conditions
(specifically, make the sender name change face if the sender is in my
BBDB). Writing a user format function which returns a string which has
face (and gnus-face) properties set should work (and does in FSF
Emacs) but it fails to preserve the face in XEmacs.

Paul.

-- 
This signature intentionally left blank



  reply	other threads:[~2002-10-14 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-12 15:39 Paul Moore
2002-10-14 12:01 ` Kai Großjohann
2002-10-14 21:00   ` Paul Moore [this message]
2002-10-15  9:24     ` Kai Großjohann
2002-10-16 20:18       ` Paul Moore
2002-10-17 13:03         ` Kai Großjohann
2002-10-17 19:34           ` Paul Moore
2002-10-17 13:00 ` Kai Großjohann
2002-10-17 19:48   ` Paul Moore
2002-10-18 14:34     ` Kai Großjohann
2002-10-18 18:15       ` Paul Moore

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=n2m-g.k7kkviqv.fsf@morpheus.demon.co.uk \
    --to=gustav@morpheus.demon.co.uk \
    /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).