From: Ben Bacarisse <ben.lists@bsb.me.uk>
To: info-gnus-english@gnu.org
Subject: Re: washing and `article-translate-strings' in what hook?
Date: Mon, 01 Jun 2015 11:08:42 +0100 [thread overview]
Message-ID: <87617768r9.fsf@bsb.me.uk> (raw)
In-Reply-To: <87iob8qo7i.fsf@debian.uxu> (Emanuel Berg's message of "Mon, 01 Jun 2015 02:14:41 +0200")
Emanuel Berg <embe8573@student.uu.se> writes:
> Ben Bacarisse <ben.lists@bsb.me.uk> writes:
>
>> I think you need to wrap the body in
>>
>> (gnus-with-article-buffer ...)
>>
>> This will have the added effect of making the
>> interactive function work from the summary buffer
>> window (provided there is a current article in some
>> buffer, of course).
>
> That's exactly right!
>
> But how is anyone to realize this?
Ah, good question. I don't know. I learned what I know by reading
other people's code (some of it the Gnus sources).
> Because there is no article argument to
> `article-translate-strings', the current article is
> all it can be applied to (?). So then shouldn't it say
> there is none, if there isn't?
>
> Or did this happen to some *other* article which
> I have been unaware of?
That's possible. The code operates on the current buffer, so it was
probably editing something!
> And why did it work calling it interactively but not
> doing the same from Lisp?
> Is `gnus-article-prepare-hook' the wrong place so at
> that time there isn't a buffer set to work
> on, interactively?
I don't think the key distinction is interactive/non interactive. The
key issue is whether there is a "current buffer" which you can see
change. Selecting an article probably makes the article buffer current
so calling the function interactively works on the article you can see.
<snip>
--
Ben.
next prev parent reply other threads:[~2015-06-01 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 22:54 Emanuel Berg
2015-05-31 0:05 ` Ben Bacarisse
[not found] ` <mailman.4013.1433030725.904.info-gnus-english@gnu.org>
2015-06-01 0:14 ` Emanuel Berg
2015-06-01 10:08 ` Ben Bacarisse [this message]
2016-09-29 20:35 ` A smart auto-wash? (was: washing and `article-translate-strings' in what hook?) Dave Abrahams
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=87617768r9.fsf@bsb.me.uk \
--to=ben.lists@bsb.me.uk \
--cc=info-gnus-english@gnu.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).