unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
       [not found]                                       ` <100sp2-f0c.ln1@ibhome.cgitftp.uiggm.nsc.ru>
@ 2005-07-06  8:23                                         ` Pascal Bourguignon
  2005-07-07  9:24                                           ` Ivan Boldyrev
  0 siblings, 1 reply; 9+ messages in thread
From: Pascal Bourguignon @ 2005-07-06  8:23 UTC (permalink / raw)


Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:

> On 9161 day of my life Pascal Bourguignon wrote:
>> [ Now, if anybody could explain me why it doesn't work automatically
>>   when I put this in my ~/.emacs:
>>
>>     (case window-system
>>       ((nil)
>>        (message "houra")
>>        (normal-erase-is-backspace-mode)) ; never works :-(
>
> Does at least (message "houra") work?
> Try also to use (normal-erase-is-backspace-mode 1)

Yes, houra is logged.  And with:
  (setq inhibit-default-init t) ; and
  (normal-erase-is-backspace-mode 1) ; it still leaves
C-h bound to delete-backward-char, and
DEL translated to C-d bound to delete-char

It's been that way forever (20,7, 21.[123], 22.0.50.*).


(After I run manually M-x normal-erase-is-backspace-mode RET
C-h is prefix for help, and
DEL is bound to delete-backward-char, as expected).


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Litter box not here.
You must have moved it again.
I'll poop in the sink. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-06  8:23                                         ` ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul Pascal Bourguignon
@ 2005-07-07  9:24                                           ` Ivan Boldyrev
  2005-07-07 13:34                                             ` Pascal Bourguignon
  0 siblings, 1 reply; 9+ messages in thread
From: Ivan Boldyrev @ 2005-07-07  9:24 UTC (permalink / raw)


On 9162 day of my life Pascal Bourguignon wrote:
>>> [ Now, if anybody could explain me why it doesn't work automatically
>>>   when I put this in my ~/.emacs:
>>>
>>>     (case window-system
>>>       ((nil)
>>>        (message "houra")
>>>        (normal-erase-is-backspace-mode)) ; never works :-(
>>
>> Does at least (message "houra") work?
>> Try also to use (normal-erase-is-backspace-mode 1)
>
> Yes, houra is logged.  And with:
>   (setq inhibit-default-init t) ; and
>   (normal-erase-is-backspace-mode 1) ; it still leaves
> C-h bound to delete-backward-char, and
> DEL translated to C-d bound to delete-char

What about

(add-hook 'emacs-startup-hook
  (lambda ()
     (case window-system
       ...)))

-- 
Ivan Boldyrev

                  Sorry my terrible English, my native language is Lisp!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-07  9:24                                           ` Ivan Boldyrev
@ 2005-07-07 13:34                                             ` Pascal Bourguignon
  2005-07-07 15:19                                               ` Kevin Rodgers
                                                                 ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Pascal Bourguignon @ 2005-07-07 13:34 UTC (permalink / raw)


Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:

> On 9162 day of my life Pascal Bourguignon wrote:
>>>> [ Now, if anybody could explain me why it doesn't work automatically
>>>>   when I put this in my ~/.emacs:
>>>>
>>>>     (case window-system
>>>>       ((nil)
>>>>        (message "houra")
>>>>        (normal-erase-is-backspace-mode)) ; never works :-(
>>>
>>> Does at least (message "houra") work?
>>> Try also to use (normal-erase-is-backspace-mode 1)
>>
>> Yes, houra is logged.  And with:
>>   (setq inhibit-default-init t) ; and
>>   (normal-erase-is-backspace-mode 1) ; it still leaves
>> C-h bound to delete-backward-char, and
>> DEL translated to C-d bound to delete-char
>
> What about
>
> (add-hook 'emacs-startup-hook
>   (lambda ()
>      (case window-system
>        ...)))

(add-hook 'emacs-startup-hook
          (lambda ()
            (message "setting up the keyboard")
            (case window-system
              ((nil)
               (message "houra")
               (normal-erase-is-backspace-mode 1))
              ((x)
               (define-key global-map [(delete)]    "\C-d")
               (make-face-bold 'bold-italic))
              ((mac)
               (setq mac-command-key-is-meta nil
                     mac-reverse-ctrl-meta   nil)
               (set-keyboard-coding-system 'mac-roman)))))

I get:
    setting up the keyboard
    houra
in the *Message*, but C-h is still delete-backward-char and DEL delete-char.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-07 13:34                                             ` Pascal Bourguignon
@ 2005-07-07 15:19                                               ` Kevin Rodgers
       [not found]                                               ` <mailman.2452.1120750028.2857.help-gnu-emacs@gnu.org>
  2005-07-08 10:34                                               ` Ivan Boldyrev
  2 siblings, 0 replies; 9+ messages in thread
From: Kevin Rodgers @ 2005-07-07 15:19 UTC (permalink / raw)


Pascal Bourguignon wrote:
 > Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:
 >>What about
 >>
 >>(add-hook 'emacs-startup-hook
 >>  (lambda ()
 >>     (case window-system
 >>       ...)))
 >
 > (add-hook 'emacs-startup-hook
 >           (lambda ()
 >             (message "setting up the keyboard")
 >             (case window-system
 >               ((nil)
 >                (message "houra")
 >                (normal-erase-is-backspace-mode 1))
 >               ((x)
 >                (define-key global-map [(delete)]    "\C-d")
 >                (make-face-bold 'bold-italic))
 >               ((mac)
 >                (setq mac-command-key-is-meta nil
 >                      mac-reverse-ctrl-meta   nil)
 >                (set-keyboard-coding-system 'mac-roman)))))
 >
 > I get:
 >     setting up the keyboard
 >     houra
 > in the *Message*, but C-h is still delete-backward-char and DEL 
delete-char.

I believe term-setup-hook is the correct place for that:

,----[ C-h v term-setup-hook RET ]
| term-setup-hook's value is nil
|
| Documentation:
| Normal hook run after loading terminal-specific Lisp code.
| It also follows `emacs-startup-hook'.  This hook exists for users to set,
| so as to override the definitions made by the terminal-specific file.
| Emacs never sets this variable itself.
|
| Defined in `startup'.
`----

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
       [not found]                                               ` <mailman.2452.1120750028.2857.help-gnu-emacs@gnu.org>
@ 2005-07-07 15:45                                                 ` Pascal Bourguignon
  0 siblings, 0 replies; 9+ messages in thread
From: Pascal Bourguignon @ 2005-07-07 15:45 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Pascal Bourguignon wrote:
>  > Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:
>  >>What about
>  >>
>  >>(add-hook 'emacs-startup-hook
>  >>  (lambda ()
>  >>     (case window-system
>  >>       ...)))
>  >
>  > (add-hook 'emacs-startup-hook
>  >           (lambda ()
>  >             (message "setting up the keyboard")
>  >             (case window-system
>  >               ((nil)
>  >                (message "houra")
>  >                (normal-erase-is-backspace-mode 1))
>  >               ((x)
>  >                (define-key global-map [(delete)]    "\C-d")
>  >                (make-face-bold 'bold-italic))
>  >               ((mac)
>  >                (setq mac-command-key-is-meta nil
>  >                      mac-reverse-ctrl-meta   nil)
>  >                (set-keyboard-coding-system 'mac-roman)))))
>  >
>  > I get:
>  >     setting up the keyboard
>  >     houra
>  > in the *Message*, but C-h is still delete-backward-char and DEL
> delete-char.
>
> I believe term-setup-hook is the correct place for that:

I get the same results with:

(add-hook 'term-setup-hook ; emacs-startup-hook
          (lambda ()
            (message "setting up the keyboard")
            ...))

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-07 13:34                                             ` Pascal Bourguignon
  2005-07-07 15:19                                               ` Kevin Rodgers
       [not found]                                               ` <mailman.2452.1120750028.2857.help-gnu-emacs@gnu.org>
@ 2005-07-08 10:34                                               ` Ivan Boldyrev
  2005-07-08 12:26                                                 ` Pascal Bourguignon
  2 siblings, 1 reply; 9+ messages in thread
From: Ivan Boldyrev @ 2005-07-08 10:34 UTC (permalink / raw)


On 9163 day of my life Pascal Bourguignon wrote:
> (add-hook 'emacs-startup-hook
>           (lambda ()
>             (message "setting up the keyboard")
>             (case window-system
>               ((nil)
>                (message "houra")
>                (normal-erase-is-backspace-mode 1))
>
> I get:
>     setting up the keyboard
>     houra
> in the *Message*, but C-h is still delete-backward-char and DEL delete-char.

Then use after-init-hook or clean up you default.el :)

-- 
Ivan Boldyrev

                  Sorry my terrible English, my native language is Lisp!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-08 10:34                                               ` Ivan Boldyrev
@ 2005-07-08 12:26                                                 ` Pascal Bourguignon
  2005-07-09 14:51                                                   ` Ivan Boldyrev
  0 siblings, 1 reply; 9+ messages in thread
From: Pascal Bourguignon @ 2005-07-08 12:26 UTC (permalink / raw)


Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:

> On 9163 day of my life Pascal Bourguignon wrote:
>> (add-hook 'emacs-startup-hook
>>           (lambda ()
>>             (message "setting up the keyboard")
>>             (case window-system
>>               ((nil)
>>                (message "houra")
>>                (normal-erase-is-backspace-mode 1))
>>
>> I get:
>>     setting up the keyboard
>>     houra
>> in the *Message*, but C-h is still delete-backward-char and DEL delete-char.
>
> Then use after-init-hook or clean up you default.el :)


The only thing that my defaults.el files contain is this:

;;;BEGIN gcl addition
(autoload 'dbl "dbl" "Make a debugger to run lisp, maxima and or gdb in" t)
;;;END gcl addition

And I even don't have a defaults.el for 22.0.50...

Now, with:

(add-hook 'after-init-hook ; emacs-startup-hook
          (lambda ()
            (message "setting up the keyboard")
            (case window-system
              ((nil)
               (message "houra")
               (normal-erase-is-backspace-mode 1)
               (message "C-h = %S" (key-binding "\C-h"))
               (message "DEL = %S" (key-binding "\C-?")))
              ((x)
               (define-key global-map [(delete)]    "\C-d")
               (make-face-bold 'bold-italic))
              ((mac)
               (setq mac-command-key-is-meta nil
                     mac-reverse-ctrl-meta   nil)
               (set-keyboard-coding-system 'mac-roman)))))

the *Message* end with:


Loading erc-ring (source)...done
Loading erc-nickserv (source)...done
Loading erc-track (source)...done
C-h = help-command         <-------
DEL = vm-scroll-backward   <-------
.EMACS DONE
setting up the keyboard
houra
C-h = help-command         <-------
DEL = delete-backward-char <-------
Loading jit-lock...done
For information about the GNU Project and its goals, type C-h C-p.


and with: M-x (progn (message "C-h = %S" (key-binding "\C-h")) (message "DEL = %S" (key-binding "\C-?"))) RET

It adds:

C-h = help-command
DEL = delete-backward-char


BUT C-h still deletes the backward char !!!

M-x describe-key RET C-h RET gives:

   DEL runs the command delete-backward-char
   ...

whatever the combination of ticks on the xterm options:
  Backarrow key (BS/DEL)
  Delete is DEL

C-q C-h inserts ^?


Note that as soon as I quit emacs, C-v C-h enters ^H as expected: the
terminal works correctly... 


Or as soon as I M-x normal-erase-is-backspace-mode RET manually, it
behaves as expected:

C-q C-h inserts ^H
and C-h gives the help prefix.


Perhaps the modes are reset even after after-init-hook?

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-08 12:26                                                 ` Pascal Bourguignon
@ 2005-07-09 14:51                                                   ` Ivan Boldyrev
  2005-07-09 16:50                                                     ` Pascal Bourguignon
  0 siblings, 1 reply; 9+ messages in thread
From: Ivan Boldyrev @ 2005-07-09 14:51 UTC (permalink / raw)


On 9164 day of my life Pascal Bourguignon wrote:
> Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:
> Now, with:
>
> (add-hook 'after-init-hook ; emacs-startup-hook

Hm...  It seems that normal-erase-is-backspace-mode dosn't just
rebind keys, it also tweak terminal settings.  Then use this hook:

,----[ C-h v term-setup-hook RET ]
| term-setup-hook's value is nil
| 
| Documentation:
| Normal hook run after loading terminal-specific Lisp code.
| It also follows `emacs-startup-hook'.  This hook exists for users to set,
| so as to override the definitions made by the terminal-specific file.
| Emacs never sets this variable itself.
| 
| Defined in `startup'.
`----

-- 
Ivan Boldyrev

                                        | recursion, n:
                                        |       See recursion

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
  2005-07-09 14:51                                                   ` Ivan Boldyrev
@ 2005-07-09 16:50                                                     ` Pascal Bourguignon
  0 siblings, 0 replies; 9+ messages in thread
From: Pascal Bourguignon @ 2005-07-09 16:50 UTC (permalink / raw)


Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:

> On 9164 day of my life Pascal Bourguignon wrote:
>> Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:
>> Now, with:
>>
>> (add-hook 'after-init-hook ; emacs-startup-hook
>
> Hm...  It seems that normal-erase-is-backspace-mode dosn't just
> rebind keys, it also tweak terminal settings.  Then use this hook:

Thank you all.  After all, it seems the best path is to avoid
normal-erase-is-backspace-mode altogether.  Without it, it works as I
want in the terminal.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-07-09 16:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OYFue.13881$XB2.3578516@twister.nyc.rr.com>
     [not found] ` <Ao2dnSrQPYTKcVjfRVn-qg@speakeasy.net>
     [not found]   ` <u64vuarhm.fsf@nhplace.com>
     [not found]     ` <64vundua.fsf@comcast.net>
     [not found]       ` <ubr5mvsr2.fsf@nhplace.com>
     [not found]         ` <uoe9lgkhf.fsf@nhplace.com>
     [not found]           ` <sqr7egx2kr.fsf@cam.ac.uk>
     [not found]             ` <86fyuwhj09.fsf@drjekyll.mkbuelow.net>
     [not found]               ` <1120409203.491118.234340@z14g2000cwz.googlegroups.com>
     [not found]                 ` <868y0nfy9g.fsf@drjekyll.mkbuelow.net>
     [not found]                   ` <42C8661F.7BB80E2F@freenet.de>
     [not found]                     ` <86pstze7mr.fsf@drjekyll.mkbuelow.net>
     [not found]                       ` <uoe9jtmdz.fsf@nhplace.com>
     [not found]                         ` <uk6k77zrb.fsf@news.dtpq.com>
     [not found]                           ` <86wto6vfa6.fsf@drjekyll.mkbuelow.net>
     [not found]                             ` <u64vq8mz1.fsf@news.dtpq.com>
     [not found]                               ` <86r7ee74qo.fsf@drjekyll.mkbuelow.net>
     [not found]                                 ` <uoe9i73yx.fsf@news.dtpq.com>
     [not found]                                   ` <m3u0jaw5vv.fsf@4dv.net>
     [not found]                                     ` <87slyuw0ka.fsf@thalassa.informatimago.com>
     [not found]                                       ` <100sp2-f0c.ln1@ibhome.cgitftp.uiggm.nsc.ru>
2005-07-06  8:23                                         ` ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul Pascal Bourguignon
2005-07-07  9:24                                           ` Ivan Boldyrev
2005-07-07 13:34                                             ` Pascal Bourguignon
2005-07-07 15:19                                               ` Kevin Rodgers
     [not found]                                               ` <mailman.2452.1120750028.2857.help-gnu-emacs@gnu.org>
2005-07-07 15:45                                                 ` Pascal Bourguignon
2005-07-08 10:34                                               ` Ivan Boldyrev
2005-07-08 12:26                                                 ` Pascal Bourguignon
2005-07-09 14:51                                                   ` Ivan Boldyrev
2005-07-09 16:50                                                     ` Pascal Bourguignon

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 read-only IMAP folder(s) and NNTP newsgroup(s).