Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: info-gnus-english@gnu.org
Subject: Re: Cursoring in an article : want to add a hook.
Date: Tue, 04 Mar 2008 10:05:55 +0100	[thread overview]
Message-ID: <87zlteoo3w.fsf@member.fsf.org> (raw)
In-Reply-To: <fqi7gp$o0l$1@registered.motzarella.org>

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	other threads:[~2008-03-04  9:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 15:43 Richard G Riley
2008-03-03 18:39 ` Tassilo Horn
     [not found] ` <mailman.8245.1204569624.18990.info-gnus-english@gnu.org>
2008-03-04  1:09   ` Richard G Riley
2008-03-04  9:05     ` Tassilo Horn [this message]
     [not found]     ` <mailman.8274.1204621575.18990.info-gnus-english@gnu.org>
2008-03-04 13:54       ` Richard G Riley
2008-03-04 16:49         ` Tassilo Horn
2008-03-04 16:57         ` Richard G Riley
     [not found]         ` <mailman.8291.1204649408.18990.info-gnus-english@gnu.org>
2008-03-04 17:03           ` Richard G Riley
2008-03-04 18:00           ` Richard G Riley
2008-03-04 19:10             ` Tassilo Horn
     [not found]             ` <mailman.8297.1204657843.18990.info-gnus-english@gnu.org>
2008-03-04 19:38               ` Richard G Riley
2008-03-05  7:57                 ` Tassilo Horn
2008-03-05 10:51                   ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlteoo3w.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).