From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.help Subject: Re: Diff could also show the changes within lines Date: Mon, 19 Nov 2012 17:45:20 +0000 (UTC) Message-ID: References: <87txu9arc8.fsf@gmail.com> <80d2zlvnos.fsf@somewhere.org> <80vcd8l0h4.fsf@somewhere.org> <80zk2j3kkf.fsf@somewhere.org> <80obizp4fv.fsf@somewhere.org> <808va3p0ia.fsf@somewhere.org> <80d2zej3kd.fsf@somewhere.org> <80lie2vigu.fsf@somewhere.org> <80a9uift32.fsf@somewhere.org> <80sj85lpsb.fsf@somewhere.org> 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 1353347180 16758 80.91.229.3 (19 Nov 2012 17:46:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 17:46:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 19 18:46:32 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1TaVQV-0002nI-6o for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 18:46:31 +0100 Original-Received: from localhost ([::1]:55411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaVQH-0003Pa-Pq for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 12:46:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaVQ5-0003MP-1s for help-gnu-emacs@gnu.org; Mon, 19 Nov 2012 12:46:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaVPi-0005sC-CI for help-gnu-emacs@gnu.org; Mon, 19 Nov 2012 12:45:59 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:50536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaVPi-0005qs-5g for help-gnu-emacs@gnu.org; Mon, 19 Nov 2012 12:45:42 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TaVPi-0001l9-Iy for help-gnu-emacs@gnu.org; Mon, 19 Nov 2012 18:45:42 +0100 Original-Received: from 94-21-19-223.pool.digikabel.hu ([94.21.19.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Nov 2012 18:45:42 +0100 Original-Received: from adatgyujto by 94-21-19-223.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Nov 2012 18:45:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 94.21.19.223 (Opera/9.80 (Windows NT 6.1) Presto/2.12.388 Version/12.10) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87799 Archived-At: Sebastien Vauban writes: > > Why? Because diff-mode is called (as that email contains a > diff), and some some effect -- which I don't understand -- is > that *the cursor is repositioned onto the first line of the > summary buffer* (while the code is supposed to be executed in > the other window, the one with the *contents* of the mail). I don't use Gnus, but from your decription it seem this line (run-at-time 0.0 nil (lambda () (goto-char (point-min))))) causes the problem. It is executed after the current command is finished and I guess Gnus puts back the cursor to the summary buffer, so this delayed (goto-char (point-min)) is executed there. An obvious fix is to execute the delayed goto-char only if the cursor is in a diff buffer after the command, that is don't do it in the Gnus summary buffer: (run-at-time 0.0 nil (lambda () (if (eq major-mode 'diff-mode) (goto-char (point-min)))))