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: idle-timer for processing all buffers with selected minor-mode. Date: Sun, 28 Oct 2012 19:38:31 +0000 (UTC) Message-ID: References: <87fw4ybe4n.fsf@gavenkoa.example.com> 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 1351453138 354 80.91.229.3 (28 Oct 2012 19:38:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 19:38:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 20:39:05 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 1TSYhK-0001jY-PP for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 20:39:02 +0100 Original-Received: from localhost ([::1]:59269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSYhC-0007pH-NE for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 15:38:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSYh7-0007p1-1u for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 15:38:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSYh4-0000XO-RQ for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 15:38:48 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSYh4-0000Vy-Kv for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 15:38:46 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TSYh8-0001YN-Gv for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 20:38:50 +0100 Original-Received: from 84-236-108-142.pool.digikabel.hu ([84.236.108.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Oct 2012 20:38:50 +0100 Original-Received: from adatgyujto by 84-236-108-142.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Oct 2012 20:38:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 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: 84.236.108.142 (Opera/9.80 (Windows NT 6.1; U; IBM EVV/3.0/EAK01AG9/LE; en) Presto/2.10.289 Version/12.02) 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:87475 Archived-At: Oleksandr Gavenko gmail.com> writes: > > While I playing with dumb implementation for: > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12747 > > I got question. Firstly what I think (is I right?): > > Emacs allow move complicate job to time when it idle by using > 'run-with-idle-timer'. A hook is better in this case. This is what I use for refining all chunks automatically: (add-hook 'diff-mode-hook 'my-diff-stuff) (defun my-diff-stuff () (unless (or (eq this-command 'dvc-diff) (eq this-command 'dvc-generic-refresh) (> (buffer-size) 20000)) (my-refine-all-diff-hunks))) (defun my-refine-all-diff-hunks () (interactive) (condition-case nil (save-excursion (goto-char (point-min)) (while (not (eobp)) (diff-hunk-next))) (error nil)))