From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17633 Path: news.gmane.org!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.gnus.user Subject: Re: washing and `article-translate-strings' in what hook? Date: Mon, 01 Jun 2015 11:08:42 +0100 Message-ID: <87617768r9.fsf@bsb.me.uk> References: <87wpzruh9b.fsf@debian.uxu> <87iob8qo7i.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1433153349 2236 80.91.229.3 (1 Jun 2015 10:09:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 10:09:09 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Jun 01 12:08:59 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzMeQ-0000cX-SA for gegu-info-gnus-english@m.gmane.org; Mon, 01 Jun 2015 12:08:59 +0200 Original-Received: from localhost ([::1]:51116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzMeP-0002Xd-Om for gegu-info-gnus-english@m.gmane.org; Mon, 01 Jun 2015 06:08:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzMeK-0002X7-04 for info-gnus-english@gnu.org; Mon, 01 Jun 2015 06:08:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzMeD-0002fd-B8 for info-gnus-english@gnu.org; Mon, 01 Jun 2015 06:08:51 -0400 Original-Received: from duffman.enixns.com ([91.238.164.3]:41694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzMeD-0002fK-26 for info-gnus-english@gnu.org; Mon, 01 Jun 2015 06:08:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bsb.me.uk; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:To:From; bh=vO6N5MiEEJKLcz1AEwgoNo5xuUzaHNMAbBgCbf5Tx24=; b=fyvHG2zzEGdmGkuo5hZpaGeEFCOPA/WKyt3ghey8J70w47W7FC/pzgXisac18KWpNI9Qx/RDWUOYvxM5c06ZZ3Ejx+FLRRTKKbFED588MlCn1ErP3rU5V8IkK/1VRS3I5JviNLExzHkyDFaGUAXMM1KFeR6unHtg0BtezlorKW0=; Original-Received: from dsl-217-155-82-182.zen.co.uk ([217.155.82.182]:34369 helo=skinny.bsb.me.uk) by duffman.enixns.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1YzMeA-002YTp-3d for info-gnus-english@gnu.org; Mon, 01 Jun 2015 11:08:42 +0100 Original-Received: by skinny.bsb.me.uk (masqmail 0.3.4, from userid 1000) id 1YzMeA-1rY-00 for ; Mon, 01 Jun 2015 11:08:42 +0100 In-Reply-To: <87iob8qo7i.fsf@debian.uxu> (Emanuel Berg's message of "Mon, 01 Jun 2015 02:14:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-enixltd-MailScanner-Information: Please contact the ISP for more information X-enixltd-MailScanner-ID: 1YzMeA-002YTp-3d X-enixltd-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-enixltd-MailScanner-SpamCheck: X-enixltd-MailScanner-From: ben.lists@bsb.me.uk X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - duffman.enixns.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - bsb.me.uk X-Get-Message-Sender-Via: duffman.enixns.com: authenticated_id: bsbmeuk/from_h X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.238.164.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17633 Archived-At: Emanuel Berg writes: > Ben Bacarisse 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. -- Ben.