From: ············@gmail.com
Subject: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151176846.055583.100080@p79g2000cwp.googlegroups.com>
Do you remap your keyboard to make parenthesis easier to type? Mine are
located above the 9 and 0 and require a shift key and reaching to the
top keys.

From: Karstens Rage
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <ts-dnQ8A0-ogTgDZnZ2dnUVZ_qudnZ2d@comcast.com>
············@gmail.com wrote:
> 
> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.
> 
Yes, I make the [ and ] map to ( and )

k

-- 
http://karstensrage.blogspot.com/
Rants and raves about pretty much anything I happen to be thinking about
From: Russell McManus
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <87ac82uqok.fsf@cl-user.org>
············@gmail.com writes:

> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.

(defun rdm-lisp-mode-hook ()
  (setq lisp-indent-function 'common-lisp-indent-function)
  (local-set-key (kbd "[") 'insert-parentheses))
(add-hook 'lisp-mode-hook 'rdm-lisp-mode-hook)
From: Dmitry Gorbatovsky
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <e7k7tj$1n4$1@nntp.aioe.org>
············@gmail.com wrote:

> 
> 
> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.

I don't, but any suggestions indeed welcome.
cheers
dg
-- 
?If we knew what it was we were doing, it would not be called research,
would it??
        --Albert Einstein
From: David
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151184607.706996.92830@m73g2000cwd.googlegroups.com>
Dmitry Gorbatovsky wrote:
> ············@gmail.com wrote:
>
> >
> >
> > Do you remap your keyboard to make parenthesis easier to type? Mine are
> > located above the 9 and 0 and require a shift key and reaching to the
> > top keys.
>
> I don't, but any suggestions indeed welcome.
> cheers
> dg
> --
> ?If we knew what it was we were doing, it would not be called research,
> would it??
>         --Albert Einstein

Yes, I do. I swap square brackets (to the right of the 'P' and
unshifted) with parenthesis (above 9 and 0). I find it really really
helps. It's much rarer that I use square brackets anyway (in Lisp or
otherwise).

I also replace the Caps lock (left of 'A') with a control key, which is
also really helpful.
From: ············@gmail.com
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151187723.094028.308140@b68g2000cwa.googlegroups.com>
David wrote:

> Dmitry Gorbatovsky wrote:
> > ············@gmail.com wrote:
> >
> > >
> > >
> > > Do you remap your keyboard to make parenthesis easier to type? Mine are
> > > located above the 9 and 0 and require a shift key and reaching to the
> > > top keys.
> >
> > I don't, but any suggestions indeed welcome.
> > cheers
> > dg
> > --
> > ?If we knew what it was we were doing, it would not be called research,
> > would it??
> >         --Albert Einstein
>
> Yes, I do. I swap square brackets (to the right of the 'P' and
> unshifted) with parenthesis (above 9 and 0). I find it really really
> helps. It's much rarer that I use square brackets anyway (in Lisp or
> otherwise).
>
> I also replace the Caps lock (left of 'A') with a control key, which is
> also really helpful.

What do you use to do that?
From: Steven E. Harris
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <83ac82gl8a.fsf@torus.sehlabs.com>
············@gmail.com writes:

> What do you use to do that?

I've posted this before, but apparently it bears repeating. The first
two forms are the most important. The third and fourth forms restore
the square brackets to the Meta (or Alt) key combination of the same
keys.

If you can figure out how to use `self-insert-command' directly in the
define-key form, please let me know.


(defmacro make-key-inserter (def)
  "Substitute for `self-insert-command'."
  `(lambda (arg)
    (interactive "*P")
    (insert-char ,def (prefix-numeric-value arg))))

(define-key shared-lisp-mode-map ?\[ 'insert-parentheses)
(define-key shared-lisp-mode-map ?\] 'move-past-close-and-reindent)
(define-key shared-lisp-mode-map '(meta ?\[) (make-key-inserter ?\[))
(define-key shared-lisp-mode-map '(meta ?\]) (make-key-inserter ?\]))
(eval-after-load "slime"
  '(progn
     (define-key shared-lisp-mode-map '(meta control ?\]) 'slime-close-all-sexp)
     ;; Other SLIME-related bindings...
     ))

-- 
Steven E. Harris
From: Greg Menke
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <m34pya9hku.fsf@athena.pienet>
············@gmail.com writes:
> David wrote:
> 
> > Dmitry Gorbatovsky wrote:
> > I also replace the Caps lock (left of 'A') with a control key, which is
> > also really helpful.
> 
> What do you use to do that?

I do it by making my workstation a Sun machine configured with the
appropriate keyboard with ssh onto the box hosting the lisp environment.
Easier than trying to figure out the keymapping insanity.  With respect
to perverse complexity in *nix, its a close race between printing and
key mapping.

Gregm
From: Foxpointe
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <7YGdnXMha_wNfgDZnZ2dnUVZ_v6dnZ2d@comcast.com>
············@gmail.com wrote:
> David wrote:
> 
>> Dmitry Gorbatovsky wrote:
>>> ············@gmail.com wrote:
>>>
>>>>
>>>> Do you remap your keyboard to make parenthesis easier to type? Mine are
>>>> located above the 9 and 0 and require a shift key and reaching to the
>>>> top keys.
>>> I don't, but any suggestions indeed welcome.
>>> cheers
>>> dg
>>> --
>>> ?If we knew what it was we were doing, it would not be called research,
>>> would it??
>>>         --Albert Einstein
>> Yes, I do. I swap square brackets (to the right of the 'P' and
>> unshifted) with parenthesis (above 9 and 0). I find it really really
>> helps. It's much rarer that I use square brackets anyway (in Lisp or
>> otherwise).
>>
>> I also replace the Caps lock (left of 'A') with a control key, which is
>> also really helpful.
> 
> What do you use to do that?
> 

I also swap brackets and parens globally with the following in my .emacs:

(global-set-key (kbd "[") 'insert-parentheses)
(global-set-key (kbd "]") 'move-past-close-and-reindent)
(global-set-key (kbd "(") (lambda () (interactive) (insert "[")))
(global-set-key (kbd ")") (lambda () (interactive) (insert "]")))
From: Dmitry Gorbatovsky
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <e7kt4t$9ms$1@nntp.aioe.org>
Foxpointe wrote:
 
> I also swap brackets and parens globally with the following in my .emacs:
> 
> (global-set-key (kbd "[") 'insert-parentheses)
> (global-set-key (kbd "]") 'move-past-close-and-reindent)
> (global-set-key (kbd "(") (lambda () (interactive) (insert "[")))
> (global-set-key (kbd ")") (lambda () (interactive) (insert "]")))

Thank you ,
it works in xemacs (init.el) as well.

dg
-- 
?If we knew what it was we were doing, it would not be called research,
would it??
        --Albert Einstein
From: Thomas F. Burdick
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <xcvslls6uyk.fsf@conquest.OCF.Berkeley.EDU>
Foxpointe <·········@comcast.net> writes:

> I also swap brackets and parens globally with the following in my .emacs:
> 
> (global-set-key (kbd "[") 'insert-parentheses)
> (global-set-key (kbd "]") 'move-past-close-and-reindent)
> (global-set-key (kbd "(") (lambda () (interactive) (insert "[")))
> (global-set-key (kbd ")") (lambda () (interactive) (insert "]")))

I just do this locally in Lisp buffers, but to each his own.  If you
use this:

  (defun tfb:make-inserter (string)
    `(lambda (count)
      (interactive "p")
      (dotimes (i count)
        (insert ,string))))
  
  (global-set-key (kbd "(") (tfb:make-inserter "["))))
  (global-set-key (kbd ")") (tfb:make-inserter "]"))))
  
You'll still be able to pass prefix args to insert many ['s ( eg, C-q 10 ( )
From: Steven E. Harris
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <q94veqneplj.fsf@chlorine.gnostech.com>
············@gmail.com writes:

> What do you use to do that?

For the record, with LispWorks:

(editor:bind-key "Insert \()" #\[ :mode "Lisp")
(editor:bind-key "Insert \()" #\[ :mode "Execute")
(editor:bind-key "Move Over )" #\] :mode "Lisp")
(editor:bind-key "Move Over )" #\] :mode "Execute")
(editor:bind-string-to-key "[" #\meta-\[ :mode "Lisp")
(editor:bind-string-to-key "[" #\meta-\[ :mode "Execute")
(editor:bind-string-to-key "]" #\meta-\] :mode "Lisp")
(editor:bind-string-to-key "]" #\meta-\] :mode "Execute")

-- 
Steven E. Harris
From: Ken Tilton
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <yIWng.4478$HA2.1027@fe10.lga>
Steven E. Harris wrote:
> ············@gmail.com writes:
> 
> 
>>What do you use to do that?
> 
> 
> For the record, with LispWorks:
> 
> (editor:bind-key "Insert \()" #\[ :mode "Lisp")
> (editor:bind-key "Insert \()" #\[ :mode "Execute")

Anyone have the magic incantations for ACL? Can't find anything in the 
doc, and after eleven years maybe it is time to give it a try. Lord 
knows I hate shifting.

kenny

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Tim Johnson
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <slrne9s24d.49a.tim@linus.johnson.com>
On 2006-06-24, ············@gmail.com <············@gmail.com> wrote:
>
>
> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.
;; using emacs
(global-unset-key "\C-o")
(defun insert-parenthesis ()
	"Insert insert a pair of parenthesis and place cursor between."
	(interactive "*")
	(insert "()")
	(backward-char))
And I map this to Ctrl-o l 
;; But:
;; by disabling C-o. I disabled 'open-line, necessitating re-assigning that
;; function. 
;; It is probably not a good idea to re-assign standard emacs
;; keymappings, if you plan on using emacs on another machine, 
;; 'cuz you might end up looking clumsy ... :-). 

-- 
Tim Johnson <···@johnsons-web.com>
      http://www.alaska-internet-solutions.com
From: ···········@gmail.com
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151280907.326310.14850@u72g2000cwu.googlegroups.com>
············@gmail.com wrote:
> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.

I have a keyboard with a numpad so I've swapped all special characters
with the numerals.  It saves me the trouble of pressing shift for the
most common characters.  And swapping left_ctrl with capslock is
commonly done anyway.

Also get paredit.el
http://www.cliki.net/Editing%20Lisp%20Code%20with%20Emacs

I use xmodmap for the mappings.

Cheers
Vijay
From: Thomas A. Russ
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <ymir71b4g6s.fsf@sevak.isi.edu>
············@gmail.com writes:

> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.

No.  I just got used to the typing action and don't even notice it
anymore.



-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Christopher C. Stacy
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <yzlu067wc55.fsf@OSX663.local>
···@sevak.isi.edu (Thomas A. Russ) writes:

> ············@gmail.com writes:
>
>> Do you remap your keyboard to make parenthesis easier to type? Mine are
>> located above the 9 and 0 and require a shift key and reaching to the
>> top keys.
>
> No.  I just got used to the typing action and don't even notice it anymore.

When I started out with MACLISP, my ASCII keyboard had the parens
shifted above the numbers.  Then when I got Lisp Machine, I liked
the lowercase parens.  Then when LispMs went away, I went back to
the parens in the usual place.   I never found it to be a huge deal.

I did have a brief flirtation with remapping some keyboards with
xmodmap, but I didn't like it for some reason.  I think probably
I just hated Sun keyboards.

The Symbolics keyboards (and their Knight predecessors) were nice for
many other reasons, though.  Having Rubout (what most people know as
"Backspace") on the left, approximately where Caps Lock is on this
Powerbook I'm typing on, was a much bigger deal to me than the ()s.
Not to mention having good Control and Meta keys...
From: Kaz Kylheku
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151420849.868990.195470@75g2000cwc.googlegroups.com>
············@gmail.com wrote:
> Do you remap your keyboard to make parenthesis easier to type? Mine are
> located above the 9 and 0 and require a shift key and reaching to the
> top keys.

That would be tremendously important if typing speed were the
bottleneck in the software lifecycle.
From: Tim Bradshaw
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151433531.935106.14150@i40g2000cwc.googlegroups.com>
Kaz Kylheku wrote:

>
> That would be tremendously important if typing speed were the
> bottleneck in the software lifecycle.

Whereas, in the real world, making endless minute adjustments to your
environment such as, um, remapping keyboards, to avoid getting real
work done is probably about number 2 on the list of bottlenecks.

--tim (ctrl key in the right place but otherwise nothing)
From: vanekl
Subject: Re: Do you remap your keyboard for lisp?
Date: 
Message-ID: <1151433780.792963.308590@p79g2000cwp.googlegroups.com>
Kaz Kylheku wrote:
> ············@gmail.com wrote:
> > Do you remap your keyboard to make parenthesis easier to type? Mine are
> > located above the 9 and 0 and require a shift key and reaching to the
> > top keys.
>
> That would be tremendously important if typing speed were the
> bottleneck in the software lifecycle.

I had one manager who thought typing speed was. Our secretaries were
typically faster typists than us simple programmers. I guess we should
have made the secretaries programmers.

The other common metric was LOC. What that instigated was everybody
copying and pasting massive amounts of code instead of trying to reuse
it (the right way). You get what you measure.

Lou