Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Klaus Berndl <Klaus.Berndl@raibau.raiffeisen.at>
Subject: Re: using defadvice to delete other windows when hiding threads
Date: 11 Sep 2002 17:23:25 +0200	[thread overview]
Message-ID: <uu1kw7doy.fsf@raibau.raiffeisen.at> (raw)
In-Reply-To: <65xc4rum.fsf@random.localnet.UnwiredUniverse.com>

On Wed, 11 Sep 2002, Derrell Lipman wrote:

>  I'm trying to learn how to use defadvice to modify gnus behavior.
>  
>  When I want to look only at the thread subjects in a group (T H) I always
>  also want to delete the other windows in the frame so that I see a larger
>  portion of the thread listing.
>  
>  I've tried the following, which gives no error when being eval'ed, but also
>  does nothing at all when I do T H...
>  
>  (defadvice gnus-summary-hide-all-threads (after activate)
>    "Display only one window when hiding all threads"
>    (delete-other-windows))
>  
>  What am I doing wrong here?

You must give your defadvice a name (should be senseful). Read the
documentation of defadvice carefully and you will see what is wrong...
In your advice you have given the name "activate" because you forget the
second parameter of defadvice and therefore your advice has never been
activated....

(defadvice gnus-summary-hide-all-threads (after my-first-advice activate)
 ...)

will do what you want!


>  Or is this entirely the wrong way to be going about this?  Should I just
>  define a new function that calls gnus-summary-hide-all-threads and
>  delete-other-windows, and bind T H to it?  I was hoping to use this as an
>  excuse to understand defadvice.

No, IMHO your way is not a bad way, you habe just to go it in the right way
(see above)... :-)

Ciao,
Klaus

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220


      reply	other threads:[~2002-09-11 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-11 12:45 Derrell.Lipman
2002-09-11 15:23 ` Klaus Berndl [this message]

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=uu1kw7doy.fsf@raibau.raiffeisen.at \
    --to=klaus.berndl@raibau.raiffeisen.at \
    /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).