info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursoring in an article : want to add a hook.


From: Tassilo Horn
Subject: Re: Cursoring in an article : want to add a hook.
Date: Tue, 04 Mar 2008 10:05:55 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Richard G Riley <rileyrgdev@gmail.com> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]