all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: help-gnu-emacs Digest, Vol 62, Issue 20
       [not found] <47825bda.0d67260a.098f.05adSMTPIN_ADDED@mx.google.com>
@ 2008-01-08  7:38 ` Forrest
  2008-01-08  7:53   ` Lennart Borgman (gmail)
  2008-01-08  8:48   ` Mike Mattie
  2008-01-08  8:13 ` Forrest
       [not found] ` <mailman.5881.1199780028.18990.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 7+ messages in thread
From: Forrest @ 2008-01-08  7:38 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 922 bytes --]

> > global-set-key (kbd "C-,")
> > '(lambda () "scroll the page down" (interactive) (scroll-
> > down 1)))
>
> The console and other terminal emulations can only produce "key
> events" in the ASCII or extended ASCII range, i.e. 8 bit characters
> (man ascii). Therefore not every time you hold down the control
> "modifier" key and press some other key something with a meaning is
> produced. It's like when you're scribbling on paper: not every
> "picture" is a letter or a digit or worth an exhibition at MOMA ...
> C-, can work X which has its own concept of events that are
> abstracted from ASCII codes.

C-x C-c work well in console, so i guess there must be something wrong with
my key-binding settings. and also, emacs was designed in ages when X was not
popular, it's unreasonable that custom key-binding doesn't work

i'm a newbie, could you give me any detailed clue to solve it?

-- 
Stupid is as stupid does.

[-- Attachment #1.2: Type: text/html, Size: 1119 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
  2008-01-08  7:38 ` help-gnu-emacs Digest, Vol 62, Issue 20 Forrest
@ 2008-01-08  7:53   ` Lennart Borgman (gmail)
  2008-01-08  8:27     ` Forrest
  2008-01-08  8:48   ` Mike Mattie
  1 sibling, 1 reply; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-08  7:53 UTC (permalink / raw)
  To: Forrest; +Cc: help-gnu-emacs

Forrest wrote:
> 
>  > > global-set-key (kbd "C-,")
>  > > '(lambda () "scroll the page down" (interactive) (scroll-
>  > > down 1)))
>  >
>  > The console and other terminal emulations can only produce "key
>  > events" in the ASCII or extended ASCII range, i.e. 8 bit characters
>  > (man ascii). Therefore not every time you hold down the control
>  > "modifier" key and press some other key something with a meaning is
>  > produced. It's like when you're scribbling on paper: not every
>  > "picture" is a letter or a digit or worth an exhibition at MOMA ...
>  > C-, can work X which has its own concept of events that are
>  > abstracted from ASCII codes.
> 
> C-x C-c work well in console, so i guess there must be something wrong 
> with my key-binding settings. and also, emacs was designed in ages when 
> X was not popular, it's unreasonable that custom key-binding doesn't work
> 
> i'm a newbie, could you give me any detailed clue to solve it?


You can use

   C-h c (or C-h k)

to find out what keys Emacs sees. Try for example

   C-h c C-,

and look at the bottom of the screen for the message you receive.

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
       [not found] <47825bda.0d67260a.098f.05adSMTPIN_ADDED@mx.google.com>
  2008-01-08  7:38 ` help-gnu-emacs Digest, Vol 62, Issue 20 Forrest
@ 2008-01-08  8:13 ` Forrest
       [not found] ` <mailman.5881.1199780028.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Forrest @ 2008-01-08  8:13 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 782 bytes --]

> > `global-set-key' doesn't work in my console.
> > i have definitions below in my ~/.emacs:
> >
> > global-set-key (kbd "C-,")
> > '(lambda () "scroll the page down" (interactive) (scroll-down 1)))
> > (defun up-slightly () (interactive) (scroll-up 1))
> > (global-set-key [(control .)] 'up-slightly)
> >
> > then i went to console, launched emacs, opened a file, i can use the
> > "default" key-bindings like C-x C-c, but when i press C-, or C-. ,
> > nothing happened, they work well in X window, how can i get it work
> > in console?
>
> I believe the problem is that those particular keys (e.g. C-,) are not
> available using a console.

ah, yes, i tried C-j & C-k and it works, many thanks!

but why? why is it forbidden to use C-, in console?

-- 
Stupid is as stupid does.

[-- Attachment #1.2: Type: text/html, Size: 1007 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
  2008-01-08  7:53   ` Lennart Borgman (gmail)
@ 2008-01-08  8:27     ` Forrest
  0 siblings, 0 replies; 7+ messages in thread
From: Forrest @ 2008-01-08  8:27 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]

On Jan 8, 2008 3:53 PM, Lennart Borgman (gmail) <lennart.borgman@gmail.com>
wrote:
>
>
>
> Forrest wrote:
> >
> > > > global-set-key (kbd "C-,")
> > > > '(lambda () "scroll the page down" (interactive) (scroll-
> > > > down 1)))
> > >
> > > The console and other terminal emulations can only produce "key
> > > events" in the ASCII or extended ASCII range, i.e. 8 bit characters
> > > (man ascii). Therefore not every time you hold down the control
> > > "modifier" key and press some other key something with a meaning is
> > > produced. It's like when you're scribbling on paper: not every
> > > "picture" is a letter or a digit or worth an exhibition at MOMA ...
> > > C-, can work X which has its own concept of events that are
> > > abstracted from ASCII codes.
> >
> > C-x C-c work well in console, so i guess there must be something wrong
> > with my key-binding settings. and also, emacs was designed in ages when
> > X was not popular, it's unreasonable that custom key-binding doesn't
work
> >
> > i'm a newbie, could you give me any detailed clue to solve it?
>
>
> You can use
>
> C-h c (or C-h k)
>
> to find out what keys Emacs sees. Try for example
>
> C-h c C-,
>
> and look at the bottom of the screen for the message you receive.
>

i tried C-h c C-, in console, nothing happened, seems like emacs didn't
receive the key pressing event

-- 
Stupid is as stupid does.

[-- Attachment #1.2: Type: text/html, Size: 1881 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
  2008-01-08  7:38 ` help-gnu-emacs Digest, Vol 62, Issue 20 Forrest
  2008-01-08  7:53   ` Lennart Borgman (gmail)
@ 2008-01-08  8:48   ` Mike Mattie
  2008-01-08  9:31     ` Nick Roberts
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Mattie @ 2008-01-08  8:48 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1527 bytes --]

On Tue, 8 Jan 2008 15:38:08 +0800
Forrest <forrest.yu@gmail.com> wrote:

> > > global-set-key (kbd "C-,")
> > > '(lambda () "scroll the page down" (interactive) (scroll-
> > > down 1)))

try a space like this:
(kbd "C-c ,")


If that fixes it try using a function I previously posted that eliminates the errors
from the process of defining keys.

(defun insert-key-notation ()
  "inject a complete \(kbd \"sequence\"\) with key notation for a key sequence given by prompt"
  (interactive)
  (insert "(kbd \"")
  (insert (format-kbd-macro (read-key-sequence "Key? " nil t)))
  (insert "\")"))

it will define the kbd sexp for you after it prompts you for the key sequence.

> > The console and other terminal emulations can only produce "key
> > events" in the ASCII or extended ASCII range, i.e. 8 bit characters
> > (man ascii). Therefore not every time you hold down the control
> > "modifier" key and press some other key something with a meaning is
> > produced. It's like when you're scribbling on paper: not every
> > "picture" is a letter or a digit or worth an exhibition at MOMA ...
> > C-, can work X which has its own concept of events that are
> > abstracted from ASCII codes.
> 
> C-x C-c work well in console, so i guess there must be something
> wrong with my key-binding settings. and also, emacs was designed in
> ages when X was not popular, it's unreasonable that custom
> key-binding doesn't work
> 
> i'm a newbie, could you give me any detailed clue to solve it?
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
  2008-01-08  8:48   ` Mike Mattie
@ 2008-01-08  9:31     ` Nick Roberts
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Roberts @ 2008-01-08  9:31 UTC (permalink / raw)
  To: Mike Mattie; +Cc: help-gnu-emacs

Mike Mattie writes:
 > On Tue, 8 Jan 2008 15:38:08 +0800
 > Forrest <forrest.yu@gmail.com> wrote:
 > 
 > > > > global-set-key (kbd "C-,")
 > > > > '(lambda () "scroll the page down" (interactive) (scroll-
 > > > > down 1)))
 > 
 > try a space like this:
 > (kbd "C-c ,")

Have you tried this?  It won't work.

 > If that fixes it try using a function I previously posted that eliminates
 > the errors from the process of defining keys.

If it were so simple don't you think Emacs would do this?

 > (defun insert-key-notation ()
 >   "inject a complete \(kbd \"sequence\"\) with key notation for a key sequence given by prompt"
 >   (interactive)
 >   (insert "(kbd \"")
 >   (insert (format-kbd-macro (read-key-sequence "Key? " nil t)))
 >   (insert "\")"))
 > 
 > it will define the kbd sexp for you after it prompts you for the key sequence.

It looks like the reason that it doesn't work has already been explained but
Forrest has decided not to accept the answer (or perhaps there is a
communication problem)...

 > > > The console and other terminal emulations can only produce "key
 > > > events" in the ASCII or extended ASCII range, i.e. 8 bit characters
 > > > (man ascii). Therefore not every time you hold down the control
 > > > "modifier" key and press some other key something with a meaning is
 > > > produced. It's like when you're scribbling on paper: not every
 > > > "picture" is a letter or a digit or worth an exhibition at MOMA ...
 > > > C-, can work X which has its own concept of events that are
 > > > abstracted from ASCII codes.
 > > 
 > > C-x C-c work well in console, so i guess there must be something
 > > wrong with my key-binding settings. and also, emacs was designed in
 > > ages when X was not popular, it's unreasonable that custom
 > > key-binding doesn't work

Do "man ascii". This is 128 character set and 96, or thereabout, are printing
characters.  If there were a control character counterpart for each one that
would result in 192 character set.  Presumably control characters only exist
for C-@ to C-_ (0 to 32, @ to _ being 64 to 96).

 > > i'm a newbie, could you give me any detailed clue to solve it?

On a normal console, I don't think you can.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: help-gnu-emacs Digest, Vol 62, Issue 20
       [not found] ` <mailman.5881.1199780028.18990.help-gnu-emacs@gnu.org>
@ 2008-01-08 12:28   ` Andreas Eder
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Eder @ 2008-01-08 12:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Forrest,

>>>>> "Forrest" == Forrest  <forrest.yu@gmail.com> writes:

    Forrest> ah, yes, i tried C-j & C-k and it works, many thanks!
    Forrest> but why? why is it forbidden to use C-, in console?

It is not forbidden, there just is *no* such key in the console. X
recognises it as a key combination, but in the console there is no
key equivalent and the keyboard driver does not generate a key. It
has nothing to do with emacs.

'Andreas

-- 
Wherever I lay my .emacs, there's my $HOME.

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

end of thread, other threads:[~2008-01-08 12:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <47825bda.0d67260a.098f.05adSMTPIN_ADDED@mx.google.com>
2008-01-08  7:38 ` help-gnu-emacs Digest, Vol 62, Issue 20 Forrest
2008-01-08  7:53   ` Lennart Borgman (gmail)
2008-01-08  8:27     ` Forrest
2008-01-08  8:48   ` Mike Mattie
2008-01-08  9:31     ` Nick Roberts
2008-01-08  8:13 ` Forrest
     [not found] ` <mailman.5881.1199780028.18990.help-gnu-emacs@gnu.org>
2008-01-08 12:28   ` Andreas Eder

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.