From: Daniel Pittman <daniel@rimspace.net>
To: ding@gnus.org
Subject: Re: advising gnus - a report from the front lines
Date: Sat, 24 May 2008 16:27:32 +1000 [thread overview]
Message-ID: <87k5hkz06j.fsf@rimspace.net> (raw)
In-Reply-To: <87od6yhgyg.fsf@burly.wgtn.ondioline.org>
Paul Collins <paul@burly.ondioline.org> writes:
> I recently added the following piece of advice:
>
> (defadvice gnus (before gnus-homedir-advice activate)
> (cd (expand-file-name "~/")))
>
> This is so that subprocesses started by Gnus (e.g. my IMAP wossname)
> don't end up with a network directory as their cwd. However, advising
> the `gnus' function makes its check for compiled-ness trip,
Well, that makes the gnus function be something that isn't compiled.
You could, rather, try this:
;; The `gnus' function verifies it is compiler, so ensure that
;; the advice function is also compiled.
(defadvice gnus (before gnus-homedir-advice activate compile)
(cd "~/")) ; cd will expand the filename automatically
Note the presence of the `compile' flag to defadvice; from the help:
`compile': In conjunction with `activate' specifies that the
resulting advised function should be compiled.
That would achieve the same result without removing a (presumably
valuable) test from Gnus.
Regards,
Daniel
prev parent reply other threads:[~2008-05-24 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 8:37 Paul Collins
2008-05-24 5:16 ` Michael Olson
2008-05-25 0:30 ` Paul Collins
2008-05-24 6:27 ` Daniel Pittman [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=87k5hkz06j.fsf@rimspace.net \
--to=daniel@rimspace.net \
--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).