From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/10561 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.user Subject: Re: Cursoring in an article : want to add a hook. Date: Tue, 04 Mar 2008 10:05:55 +0100 Message-ID: <87zlteoo3w.fsf@member.fsf.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204621586 29840 80.91.229.12 (4 Mar 2008 09:06:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2008 09:06:26 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Tue Mar 04 10:06:53 2008 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JWT6m-0006oC-I8 for gegu-info-gnus-english@m.gmane.org; Tue, 04 Mar 2008 10:06:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWT6F-0001bv-Hm for gegu-info-gnus-english@m.gmane.org; Tue, 04 Mar 2008 04:06:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWT6D-0001b1-B4 for info-gnus-english@gnu.org; Tue, 04 Mar 2008 04:06:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWT68-0001YS-Q8 for info-gnus-english@gnu.org; Tue, 04 Mar 2008 04:06:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWT68-0001YN-HT for info-gnus-english@gnu.org; Tue, 04 Mar 2008 04:06:08 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JWT68-0002Nu-8u for info-gnus-english@gnu.org; Tue, 04 Mar 2008 04:06:08 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWT65-0007Y7-6S for info-gnus-english@gnu.org; Tue, 04 Mar 2008 04:06:05 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JWT61-00018h-3M for info-gnus-english@gnu.org; Tue, 04 Mar 2008 09:06:01 +0000 Original-Received: from dslb-084-063-036-179.pools.arcor-ip.net ([84.63.36.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Mar 2008 09:06:01 +0000 Original-Received: from tassilo by dslb-084-063-036-179.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Mar 2008 09:06:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-084-063-036-179.pools.arcor-ip.net User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:2lTK7FPKqt0gY/PMstxDNrH2KzY= X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:10561 Archived-At: Richard G Riley writes: Hi Richard, > I did this and it works well enough. I now have an auto updated > rdictcc buffer when scrolling around in w3m or article buffers. Thanks > for your help. Maybe some sort of timer would be nice so it only > updates the rdictcc buffer after resting on the same word for a while > - but that is a little beyond my current experience at the > moment. I'd suggest to save the current word in a global variable (`defvar') and only update the translation if the current word is not nil and not string= with the saved word. When that's the case, do the translation and save the current word in the global variable. > Another nice addition might be to be able to set the rdictcc window > height so its always a fixed height at the bottom of the frame. I normally don't need that, because I use Emacs fullscreen and use this in my ~/.emacs. --8<---------------cut here---------------start------------->8--- (defun th-split-window (window) "Split WINDOW either horizontally or vertically. If the WINDOW is wide enough, then split horizontally, else vertically." (if (>= (window-width window) 150) (split-window window nil t) (split-window window))) (setq split-window-preferred-function 'th-split-window) --8<---------------cut here---------------end--------------->8--- So new windows will be created beside (and not below) the current one if the current window has more than 150 columns. The variable `split-window-preferred-function' is pretty new, so it's possible that it won't work for you unless you use emacs 23. Bye, Tassilo