Gnus development mailing list
 help / color / mirror / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: Quote emphasis
Date: 01 Dec 1996 01:16:40 +0100	[thread overview]
Message-ID: <rjn2vzf79z.fsf@babbage.dina.kvl.dk> (raw)
In-Reply-To: Sudish Joseph's message of 30 Nov 1996 18:14:38 -0500


Sudish Joseph <sudish@mindspring.com> writes:

> In article <m2wwv3wcx8.fsf@altair.xemacs.org>,
> Steven L Baur <steve@miranova.com> writes:
> > I played around a bit with it, and while it does add more color, it
> > has the potential for confusing things more in messages which contain
> > code.
> 
> I liked it, but I agree that it can cause havoc for certain messages.

Which?  It works fine with the code snips I have seen.  The strings
gets highlighted, as if the code was font-locked.  

> > It would work best IMO if it were controlled by YAV, and possibly
> > restricted to only original text.  (It clashes at times with the
> > citation highlight :-( ).

I have emphasize before highlight-citation in
`gnus-article-display-hook' (that is the way they are listed in the
customization buffer), so I don't see this.

But I agree it should be on a separate hook function.  What should it
be called?  `highlight-quotes' would be "correct", but may be easy to
confuse with `highlight-citation'.

> I think the general solution to article buffer massagers that get in
> the way for special articles is to provide unmassagers, functions that
> reverse the effects of the massagers.  This would be useful for
> smiley.el as well.  
> 
> If all massagers provided two hook-safe functions, feature-foo-article
> and un-feature-foo-article, we wouldn't need variables.  They could be
> added to the appropriate hook and given bindings in the W keymap.

Too difficult, not all display features can be undone.

Here is an alternative:

Replace the call to `gnus-article-display-hook' with 

	(make-local-variable 'gnus-local-article-display-hook)
        (setq gnus-local-article-display-hook
              (copy-list gnus-article-display-hook))
        (run-hooks 'gnus-local-article-display-hook)

Bind each wash function along these lines:

  (defun gnus-wash-toggle-add-buttons ()
    "Toggle buttons in the current article."
    (interactive)
    (gnus-wash-toggle 'gnus-article-add-buttons))

  (defun gnus-wash-toggle (fun)
     "Toggle argument FUN in and redisplay the article."
     (if (memq fun gnus-local-article-display-hook)
         (remove-hook 'gnus-local-article-display-hook fun)
       (add-hook 'gnus-local-article-display-hook fun)
     ;; The next line is even more pseudo code than the rest...
     (copy-buffer " *Original Article*" "*Article*")
     (run-hooks 'gnus-local-article-display-hook)))

Some benefits would be:

The menu entries for the wash toggle functions would be checkboxes, and
they look *so* cool under XEmacs.

You could have the commands 

  (defun gnus-wash-apply ()
    "Use the current state to the wash toggles for future articles.
  The effect expires when you exit emacs."
    (interactive)
    (setq gnus-article-display-hook
          (copy-list gnus-local-article-display-hook)))

  (defun gnus-wash-set-defeault ()
    "Use the current state to the wash toggles for future articles.
  The effect expires when you exit emacs."
    (interactive)
    (gnus-wash-apply)
    (put 'gnus-article-display-hook 
         'saved-value (list gnus-article-display-hook))
    (custom-save))

with menu entries to make it really easy to customize the washing.


  reply	other threads:[~1996-12-01  0:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-29 22:45 Per Abrahamsen
1996-11-30 13:12 ` Lars Magne Ingebrigtsen
1996-11-30 16:27   ` Per Abrahamsen
1996-11-30 16:51     ` Lars Magne Ingebrigtsen
1996-11-30 20:22       ` Steven L Baur
1996-11-30 23:14         ` Sudish Joseph
1996-12-01  0:16           ` Per Abrahamsen [this message]
1996-12-01  1:15             ` Sudish Joseph
1996-12-01  6:27               ` Lars Magne Ingebrigtsen
1996-12-02 20:21       ` Edward J. Sabol

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=rjn2vzf79z.fsf@babbage.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /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).