help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: remapping a mouse button.


From: Thierry Volpiatto
Subject: Re: remapping a mouse button.
Date: Wed, 13 Aug 2008 11:50:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Tim X <timx@nospam.dev.null> writes:

> rgb <rbielaws@i1.net> writes:
>
>> My Mouse-2 button is also the wheel.
>> That makes stuff like using flyspell-correct-word hard because you
>> need to try not to scroll while pressing it.
>> What I want is for Mouse-4 to be viewed as Mouse-2
>> That is, do anything that would normally happen if I used Mouse-2.
>
> if your running under X, I believe you can configure this for all apps
> in the X config file (i.e. xorg.conf, xfee86.conf). 
>
> Tim

As Lennart said you call ls with -1 arg or you can always call ls with
this arg setting it like that:

,----
| (setq eshell-ls-initial-args '(-1)) 
`----

now when you call for example "ls | wc -l" , you will have the
good number of lines.

It would be cool to have a function to call in some hook to call ls -1
only if there is a "|" after ls, this function do that but i need a hook
to call it:

,----
| (defun eshell-set-ls ()
|   (let ((com-line
|          (eshell-parse-arguments (re-search-backward "ls") 
(line-end-position))))
|     (if (equal (nth 1 com-line) '(eshell-operator "|"))
|         (setq eshell-ls-initial-args '(-1))
|         (setq eshell-ls-initial-args nil))))
`----

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




reply via email to

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