ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] ratpoison+xbindkey problems...


From: Emilio Lopes
Subject: Re: [RP] ratpoison+xbindkey problems...
Date: Sat Oct 19 10:47:03 2002
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Jonathan Walther wrote:
> Vardhan Varma wrote:

> >>rp -c "select"
> >  --> pops up the little-edit-box. in -nox mode, it should take from STDIN

> In non-interactive mode, it should return without doing anything; either
> you provide the window to select on the command line, or not at all.

Agreed.

> >>rp -c "select foobar"
> > --> pops up the 'error no such window' . in -nox mode, it should print on 
> > STDOUT

> The error popping up is correct behavior, if window "foobar" doesn't
> exist.  Maybe printing to STDERR would be ok too.

I think Ratpoison should not display anything using the message bar
when called non-interactively. I find it disturbing when the message
bar pops up while a script runs. BTW, Emacs disables display-update
when running a macro. One could use `echo' to display a message (or
`curframe') if necessary.

AND: Ratpoison should return some error code when a command fails
(non-interactively), as e.g. selecting a non-existent window or
calling `focus' when the display has only one frame. Scripts could
then use this error code for something useful.

The script bellow, which swaps the windows of the current and of the
`other' frame, would e.g. profit from these changes. It currently
does the wrong thing if there is only one frame because I can't check
if (the first) `focuslast' succeeded. The "current frame" messages
appearing during execution are also disturbing (I admit I only see
them in a heavily loaded slow computer).

#!/bin/sh
## Time-stamp: <2002-05-03 18:06:36 ecl>
## Emilio Lopes <address@hidden>

## Swap the windows of this and the `other' frame.
## Current frame retains the focus.

## THIS FILE IS IN THE PUBLIC DOMAIN.  USE AT YOUR OWN RISK!

ratpoison -c 'select -' \
          -c 'focuslast' \
          -c 'other' \
          -c 'focuslast' \
          -c 'other' \
          -c 'focuslast'


> >>rp -c "help"
> > --> in -nox mode, print on stdout.

> In non-interactive mode, should print on stdout, just like the windows
> command does.

Exactly. And now you have a list of all key-bindings! :-)


 Emilio





reply via email to

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