Gnus development mailing list
 help / color / mirror / Atom feed
* B [backspace] should act like B [delete]?
@ 1999-06-14 15:27 Karl Kleinpaste
  1999-06-14 16:03 ` Kai.Grossjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Kleinpaste @ 1999-06-14 15:27 UTC (permalink / raw)


This morning, I stopped inverting the sense of my keyboard's DEL and
BS keys for the first time in about...13 years.  And so I discovered
that `B BS' doesn't do for me what `B DEL' does.

--- /home/karl/Emacs/Gnus/gnus-sum.el	Sun Jun 13 21:15:52 1999
+++ gnus-sum.el	Mon Jun 14 11:18:04 1999
@@ -1539,6 +1539,7 @@
     "\M-\C-e" gnus-summary-expire-articles-now
     "\177" gnus-summary-delete-article
     [delete] gnus-summary-delete-article
+    [backspace] gnus-summary-delete-article
     "m" gnus-summary-move-article
     "r" gnus-summary-respool-article
     "w" gnus-summary-edit-article


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 15:27 B [backspace] should act like B [delete]? Karl Kleinpaste
@ 1999-06-14 16:03 ` Kai.Grossjohann
  1999-06-14 16:23   ` Karl Kleinpaste
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kai.Grossjohann @ 1999-06-14 16:03 UTC (permalink / raw)


Karl Kleinpaste <karl@justresearch.com> writes:

  >      "\177" gnus-summary-delete-article
  >      [delete] gnus-summary-delete-article
  > +    [backspace] gnus-summary-delete-article

Normally, <backspace> and <delete> both generate DEL, and DEL (\177)
is bound.  Binding <backspace> or <delete> overrides that generation
of DEL.

In my .emacs, I have (global-set-key (kbd "<delete>") ...), but _no_
line for (kbd "<backspace>").  I think you should let at least one
key to generate DEL -- many useful bindings exist for DEL in many
modes.

All of the above applies to Emacs, dunno about XEmacs.  But I think
DEL is also used there.

kai
-- 
Abort this operation?   [OK]  [Cancel]


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 16:03 ` Kai.Grossjohann
@ 1999-06-14 16:23   ` Karl Kleinpaste
  1999-06-14 21:49     ` Kai.Grossjohann
  1999-06-14 17:07   ` Harry Putnam
  1999-06-14 17:55   ` Hrvoje Niksic
  2 siblings, 1 reply; 10+ messages in thread
From: Karl Kleinpaste @ 1999-06-14 16:23 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:
> Normally, <backspace> and <delete> both generate DEL, and DEL (\177)
> is bound.  Binding <backspace> or <delete> overrides that generation
> of DEL.

No, not so.

Under X, the key labelled "<-" generates keysym Backspace and the one
labelled "Del" generates keysym Delete.  XEmacs knows the difference,
annoyingly.  Experiment with xev(1), and you'll see what I mean.  If
Emacs hides the distinction, it has done you a disservice.

Having grown up on the VT100 (aka "God's") keyboard¹, I inverted the
sense of these 2 keys on X keyboards for many, many years, because
Delete Belongs At The Upper Right Of The Main Keyboard².  The number
of conflicts this causes, with applications which want to react to
keysym Backspace but are blissfully unaware of Delete, has gotten
large.  So I finally gave in, tweaked my stty(1) invocation in
.bash_login, undid the key inversion, and went in search of unexpected
misbehavior with respect to Backspace and Delete.

My hands still want desperately to type "B <-", which is why I'd like
for the B summary submap to do -delete-article in that case.
Generally speaking, Backspace and Delete both do deletion-related
things, so it seemed to be a sensible suggestion.

--karl

¹ I have a VT102 of my very own.  Really.
² Under X, I *still* invert the placement of the `~ and ESC keys -- I
even switch their keycaps -- because Escape Belongs At The Upper
Left Of The Main Keyboard. :-)


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 16:03 ` Kai.Grossjohann
  1999-06-14 16:23   ` Karl Kleinpaste
@ 1999-06-14 17:07   ` Harry Putnam
  1999-06-14 21:51     ` Kai.Grossjohann
  1999-06-14 17:55   ` Hrvoje Niksic
  2 siblings, 1 reply; 10+ messages in thread
From: Harry Putnam @ 1999-06-14 17:07 UTC (permalink / raw)


On Mon, Jun 14, 1999 at 06:03:39PM +0200, Kai.Grossjohann@CS.Uni-Dortmund.DE wrote:

> In my .emacs, I have (global-set-key (kbd "<delete>") ...), but _no_
> line for (kbd "<backspace>").  I think you should let at least one
> key to generate DEL -- many useful bindings exist for DEL in many
> modes.

Kai, A little off topic, but what does the full code look like, and what 
does it accomplish for you?


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 16:03 ` Kai.Grossjohann
  1999-06-14 16:23   ` Karl Kleinpaste
  1999-06-14 17:07   ` Harry Putnam
@ 1999-06-14 17:55   ` Hrvoje Niksic
  1999-06-14 21:57     ` Kai.Grossjohann
  2 siblings, 1 reply; 10+ messages in thread
From: Hrvoje Niksic @ 1999-06-14 17:55 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:

> Karl Kleinpaste <karl@justresearch.com> writes:
> 
>   >      "\177" gnus-summary-delete-article
>   >      [delete] gnus-summary-delete-article
>   > +    [backspace] gnus-summary-delete-article
> 
> Normally, <backspace> and <delete> both generate DEL, and DEL (\177)
> is bound.  Binding <backspace> or <delete> overrides that generation
> of DEL.
> 
> In my .emacs, I have (global-set-key (kbd "<delete>") ...), but _no_
> line for (kbd "<backspace>").  I think you should let at least one
> key to generate DEL -- many useful bindings exist for DEL in many
> modes.

I don't understand any of what you said here, but I know that Karl's
patch is quite correct.  Without it, `B backspace' will not work.

Under XEmacs, backspace and delete do not both generate DEL.


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 16:23   ` Karl Kleinpaste
@ 1999-06-14 21:49     ` Kai.Grossjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai.Grossjohann @ 1999-06-14 21:49 UTC (permalink / raw)


Karl Kleinpaste <karl@justresearch.com> writes:

  > Kai.Grossjohann@CS.Uni-Dortmund.DE writes:
  > > Normally, <backspace> and <delete> both generate DEL, and DEL (\177)
  > > is bound.  Binding <backspace> or <delete> overrides that generation
  > > of DEL.
  > 
  > No, not so.

In what way is my explanation wrong?  I think saying "emacs-20.3 -q
-no-site-file" then hitting C-h c <backspace> and C-h c <delete> will
show you that I was right.

Hm.

Maybe I should have said `by default' instead of `normally'...

  > Under X, the key labelled "<-" generates keysym Backspace and the one
  > labelled "Del" generates keysym Delete.  XEmacs knows the difference,
  > annoyingly.  Experiment with xev(1), and you'll see what I mean.  If
  > Emacs hides the distinction, it has done you a disservice.

I know about the keysyms.  Emacs can also tell the difference.  But
it's just that by default there is no difference.  I think that
binding two keys to do the same thing by default is not a bad thing
per se.  Cf. C-h and F1, or TAB and C-i, or RET and C-m, or even C-x
u and C-_.

  > Having grown up on the VT100 (aka "God's") keyboard¹, I inverted the
  > sense of these 2 keys on X keyboards for many, many years, because
  > Delete Belongs At The Upper Right Of The Main Keyboard².  The number
  > of conflicts this causes, with applications which want to react to
  > keysym Backspace but are blissfully unaware of Delete, has gotten
  > large.  So I finally gave in, tweaked my stty(1) invocation in
  > .bash_login, undid the key inversion, and went in search of unexpected
  > misbehavior with respect to Backspace and Delete.
  > 
  > My hands still want desperately to type "B <-", which is why I'd like
  > for the B summary submap to do -delete-article in that case.

Well, that's what you can do with the default setup of Gnus under
Emacs.  The <backspace> key generates DEL, and B DEL is bound to
-delete-article, and Bob's your uncle.  No problem there.

Btw, DEL is also bound to scroll-down (or something similar) in
view-mode, and since <backspace> generates DEL by default, the
intuitive keybinding works fine.  On Emacs.

The fact that <delete> *also* does all of this is of little impact to
the <backspace> key.  The default behavior that <delete> also
generates DEL should be turned off.  But why turn off the <backspace>
behavior, too?  The key already does the right thing.

  > Generally speaking, Backspace and Delete both do deletion-related
  > things, so it seemed to be a sensible suggestion.

Well, I don't really know how XEmacs handles all this.  I vaguely
remember that it works differently there.  But I don't recall any
details.  I hope I have explained in sufficient detail what I think
should be done in Emacs.  But let me say it again:

  - Default Emacs behavior:
    <backspace> and <delete> generate DEL, and all keybindings refer
    to DEL, neither to <backspace> nor to <delete>.

  - Kai's suggested Emacs behavior:
    <backspace> generates DEL, all keybindings refer to DEL.
    <delete> is rebound to delete-char in most modes.

As you can see, my suggestion means that all existing DEL bindings
continue to be used, and the <backspace> key retains the `delete in a
backward direction' meaning it used to have all along.  (By this I
mean that the key in that position used to have that meaning, though
that key used to be called DEL and not <backspace>.)

  > ¹ I have a VT102 of my very own.  Really.
  > ² Under X, I *still* invert the placement of the `~ and ESC keys -- I
  > even switch their keycaps -- because Escape Belongs At The Upper
  > Left Of The Main Keyboard. :-)

He, at work I've got a Sun type 5 kbd, and there the ESC key is to the
left of the 1 -- that's what you're talking about, right?  I admit
that I also get along with the default PC kbd placement of ESC.

PS: I tried to consistently use different spelling: <backspace> and
    <delete> refer to keys on the kbd, and DEL and ESC and RET refer
    to names of ASCII characters.  After all, you can type C-[ to get
    ESC, too.

kai
-- 
Abort this operation?   [OK]  [Cancel]


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 17:07   ` Harry Putnam
@ 1999-06-14 21:51     ` Kai.Grossjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai.Grossjohann @ 1999-06-14 21:51 UTC (permalink / raw)


Harry Putnam <reader@newsguy.com> writes:

  > On Mon, Jun 14, 1999 at 06:03:39PM +0200,
  > Kai.Grossjohann@CS.Uni-Dortmund.DE wrote: 
  > 
  > > In my .emacs, I have (global-set-key (kbd "<delete>") ...), but _no_
  > > line for (kbd "<backspace>").  I think you should let at least one
  > > key to generate DEL -- many useful bindings exist for DEL in many
  > > modes.
  > 
  > Kai, A little off topic, but what does the full code look like, and what 
  > does it accomplish for you?

(global-set-key (kbd "<delete>") 'delete-char)

That's all.  The meaning should be obvious: hittnig the key labeled
"Delete" (next to the one labeled "End") is a lot like hitting C-d in
most modes.

kai
-- 
Abort this operation?   [OK]  [Cancel]


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 17:55   ` Hrvoje Niksic
@ 1999-06-14 21:57     ` Kai.Grossjohann
  1999-06-15  0:44       ` Karl Kleinpaste
  1999-06-15 15:33       ` Hrvoje Niksic
  0 siblings, 2 replies; 10+ messages in thread
From: Kai.Grossjohann @ 1999-06-14 21:57 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

  > I don't understand any of what you said here, but I know that Karl's
  > patch is quite correct.  Without it, `B backspace' will not work.

OK.  I don't know XEmacs, I wouldn't know.

On Emacs, <backspace> and <delete> (by default) generate the DEL ascii
character in much the same way as <tab> generates the TAB ascii
character.  In Emacs, it is possible to rebind <tab> to forward-char,
say, but C-i still retains the old meaning.

I don't really believe that people turn off the effect that <tab> and
C-i are the same thing, and in the same way I'd be surprised to hear
that people want to turn off the effect that <backspace> and DEL (is
that `C-?'?) are the same thing.

The <delete> key is a different matter altogether.

I think I'm going to install XEmacs at home to see what it is like in
this respect.

kai
-- 
Abort this operation?   [OK]  [Cancel]


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 21:57     ` Kai.Grossjohann
@ 1999-06-15  0:44       ` Karl Kleinpaste
  1999-06-15 15:33       ` Hrvoje Niksic
  1 sibling, 0 replies; 10+ messages in thread
From: Karl Kleinpaste @ 1999-06-15  0:44 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:
> On Emacs, <backspace> and <delete> (by default) generate the DEL ascii
> character in much the same way as <tab> generates the TAB ascii
> character.

I don't pretend to understand all the underlying goo of keyboard
handling in XEmacs, but I do undesstand that XEmacs doesn't convert
incoming X keyboard events into any charset elements.  Backspace and
Delete are just that, Backspace and Delete.  Notably, `C-h' and
Backspace are not at all the same thing.

> I don't really believe that people turn off the effect that <tab> and
> C-i are the same thing

Under X, XEmacs distinguishes between the concepts of <tab>, `C-i',
and `C-<tab>'.  There is no charset analogue to this; taken as mere
ASCII charset elements, a <tab> is already a "controllified" `I'
(which is to say, the control characters are those for which the upper
3 bits have been zeroed).

Within a terminal environment, including an xterm, XEmacs is of course
limited to the set of key events that survive xterm's massaging of the
X event stream into an ASCII stream -- `C-<tab>' is indeed identical
to <tab> is identical to `C-i'.

--karl


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

* Re: B [backspace] should act like B [delete]?
  1999-06-14 21:57     ` Kai.Grossjohann
  1999-06-15  0:44       ` Karl Kleinpaste
@ 1999-06-15 15:33       ` Hrvoje Niksic
  1 sibling, 0 replies; 10+ messages in thread
From: Hrvoje Niksic @ 1999-06-15 15:33 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:

> On Emacs, <backspace> and <delete> (by default) generate the DEL
> ascii character in much the same way as <tab> generates the TAB
> ascii character.

Neither of this is true in XEmacs.

> In Emacs, it is possible to rebind <tab> to forward-char, say, but
> C-i still retains the old meaning.

In XEmacs it is also possible to rebind both, but it doesn't mean that 
tab "generates" C-i.

> I think I'm going to install XEmacs at home to see what it is like
> in this respect.

Please do.


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

end of thread, other threads:[~1999-06-15 15:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-14 15:27 B [backspace] should act like B [delete]? Karl Kleinpaste
1999-06-14 16:03 ` Kai.Grossjohann
1999-06-14 16:23   ` Karl Kleinpaste
1999-06-14 21:49     ` Kai.Grossjohann
1999-06-14 17:07   ` Harry Putnam
1999-06-14 21:51     ` Kai.Grossjohann
1999-06-14 17:55   ` Hrvoje Niksic
1999-06-14 21:57     ` Kai.Grossjohann
1999-06-15  0:44       ` Karl Kleinpaste
1999-06-15 15:33       ` Hrvoje Niksic

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).