* advising gnus - a report from the front lines
@ 2008-05-22 8:37 Paul Collins
2008-05-24 5:16 ` Michael Olson
2008-05-24 6:27 ` Daniel Pittman
0 siblings, 2 replies; 4+ messages in thread
From: Paul Collins @ 2008-05-22 8:37 UTC (permalink / raw)
To: ding
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, which is
annoying since I habitually recall *Group* with `M-x gnus RET'. I've
removed the check from my local copy, but it might be nice to fix it in
Gnus so that it doesn't trip others up.
--
Paul Collins
Wellington, New Zealand
Dag vijandelijk luchtschip de huismeester is dood
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: advising gnus - a report from the front lines
2008-05-22 8:37 advising gnus - a report from the front lines Paul Collins
@ 2008-05-24 5:16 ` Michael Olson
2008-05-25 0:30 ` Paul Collins
2008-05-24 6:27 ` Daniel Pittman
1 sibling, 1 reply; 4+ messages in thread
From: Michael Olson @ 2008-05-24 5:16 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
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, which is
> annoying since I habitually recall *Group* with `M-x gnus RET'. I've
> removed the check from my local copy, but it might be nice to fix it
> in Gnus so that it doesn't trip others up.
Setting `gnus-default-directory' might help. Maybe the
`gnus-set-default-directory' function could force the current directory
to be something sane if (file-remote-p default-directory) is non-nil.
--
| Michael Olson | FSF Associate Member #652 |
| http://mwolson.org/ | Hobbies: Lisp, HCoop |
| Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
`-------------------------------------------------------'
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: advising gnus - a report from the front lines
2008-05-24 5:16 ` Michael Olson
@ 2008-05-25 0:30 ` Paul Collins
0 siblings, 0 replies; 4+ messages in thread
From: Paul Collins @ 2008-05-25 0:30 UTC (permalink / raw)
To: ding
Michael Olson <mwolson@member.fsf.org> writes:
> 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. [snipped]
>
> Setting `gnus-default-directory' might help.
This does what I want, and it's also not terminally broken like I have
just realized the piece of advice above is. Changing the cwd of random
buffers turns out to cause confusing behaviour.
Thanks also Daniel for your informative reply.
Regards,
--
Paul Collins
Wellington, New Zealand
Dag vijandelijk luchtschip de huismeester is dood
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: advising gnus - a report from the front lines
2008-05-22 8:37 advising gnus - a report from the front lines Paul Collins
2008-05-24 5:16 ` Michael Olson
@ 2008-05-24 6:27 ` Daniel Pittman
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Pittman @ 2008-05-24 6:27 UTC (permalink / raw)
To: ding
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-25 0:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-22 8:37 advising gnus - a report from the front lines Paul Collins
2008-05-24 5:16 ` Michael Olson
2008-05-25 0:30 ` Paul Collins
2008-05-24 6:27 ` Daniel Pittman
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).