all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs calculator
@ 2005-01-15 22:50 B.T. Raven
  2005-01-16  2:46 ` Sean Richards
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: B.T. Raven @ 2005-01-15 22:50 UTC (permalink / raw)


I added the following lines to my .emacs (i386-mingw: 21.3.1):

(autoload 'calculator "calculator"
    "Run the Emacs calculator." t)
  (global-set-key [(control return)] 'calculator)

After saving this, exiting, restarting, still no go. C-h k C-return is
shown as undefined.

Then I replaced the last line with:
(define-key global-map [(control return)] 'calculator)

Same result. What I am I doing wrong?

Thanks,

Ed

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

* Re: emacs calculator
  2005-01-15 22:50 emacs calculator B.T. Raven
@ 2005-01-16  2:46 ` Sean Richards
  2005-01-16 10:33 ` kurtz
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Sean Richards @ 2005-01-16  2:46 UTC (permalink / raw)


"B.T. Raven" <ecmn@cpinternet.com> writes:

> I added the following lines to my .emacs (i386-mingw: 21.3.1):
>
> (autoload 'calculator "calculator"
>     "Run the Emacs calculator." t)
>   (global-set-key [(control return)] 'calculator)
>
> After saving this, exiting, restarting, still no go. C-h k C-return is
> shown as undefined.
>
> Then I replaced the last line with:
> (define-key global-map [(control return)] 'calculator)
>
> Same result. What I am I doing wrong?

I prefer a different notation for emacs key bindings. Try this way

(global-set-key (kbd "C-<return>") 'calculator)

Sean

-- 
"Hver sin smak", sa vintapperen, han drakk mens de andre sloss.

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

* Re: emacs calculator
  2005-01-15 22:50 emacs calculator B.T. Raven
  2005-01-16  2:46 ` Sean Richards
@ 2005-01-16 10:33 ` kurtz
  2005-01-16 13:16   ` Matthew Huggett
       [not found]   ` <mailman.13475.1105882289.27204.help-gnu-emacs@gnu.org>
  2005-01-17  1:16 ` Peter Dyballa
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: kurtz @ 2005-01-16 10:33 UTC (permalink / raw)



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

B.T. Raven escribe:
> After saving this, exiting, restarting, still no go. C-h k C-return is
> shown as undefined.

Sorry if I ask something unbearably obvious, why C-h k?

[-- Attachment #1.2: 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] 10+ messages in thread

* Re: emacs calculator
  2005-01-16 10:33 ` kurtz
@ 2005-01-16 13:16   ` Matthew Huggett
       [not found]   ` <mailman.13475.1105882289.27204.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Matthew Huggett @ 2005-01-16 13:16 UTC (permalink / raw)


>> After saving this, exiting, restarting, still no go. C-h k C-return is
>> shown as undefined.

> Sorry if I ask something unbearably obvious, why C-h k?

to check what is command is bound to C-RET

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

* Re: emacs calculator
       [not found]   ` <mailman.13475.1105882289.27204.help-gnu-emacs@gnu.org>
@ 2005-01-16 22:41     ` B.T. Raven
  0 siblings, 0 replies; 10+ messages in thread
From: B.T. Raven @ 2005-01-16 22:41 UTC (permalink / raw)





"Matthew Huggett" <mhuggett@zam.att.ne.jp> wrote in message
news:mailman.13475.1105882289.27204.help-gnu-emacs@gnu.org...
> >> After saving this, exiting, restarting, still no go. C-h k C-return
is
> >> shown as undefined.
>
> > Sorry if I ask something unbearably obvious, why C-h k?
>
> to check what is command is bound to C-RET
>
>
>

Of course I can type M-x calculator to get the calc mini-buffer but why
can't I assign this function to a key? Is it because the calculator.el
file isn't loaded until the first time it's invoked?
Btw, whose question is that that Matthew is answering? I didn't see
"Sorry if I ask...." posted on this newsgroup.

Ed.

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

* Re: emacs calculator
  2005-01-15 22:50 emacs calculator B.T. Raven
  2005-01-16  2:46 ` Sean Richards
  2005-01-16 10:33 ` kurtz
@ 2005-01-17  1:16 ` Peter Dyballa
  2005-01-17 20:38 ` Stefan Monnier
       [not found] ` <mailman.13583.1105927733.27204.help-gnu-emacs@gnu.org>
  4 siblings, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2005-01-17  1:16 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 15.01.2005 um 23:50 schrieb B.T. Raven:

> After saving this, exiting, restarting, still no go. C-h k C-return is
> shown as undefined.
>
> Then I replaced the last line with:
> (define-key global-map [(control return)] 'calculator)

I'd use

   (global-set-key [c-return] 'calculator)

Besides this it's good to check whether C-return really works. In a 
terminal I don't have C-return, all Emacs sees is RET. When you first 
do 'C-h k C-return' and then 'C-x Esc Esc' (repeat-complex-command) you 
can see in the mini-buffer the proper syntax for the key (and save it 
for later use with C-a C-k C-g).

--
Greetings

   Pete

"Email is a wonderful thing for people whose role in life is to be on 
top of things. But not for me; my role is to be on the bottom of 
things. What I do takes long hours of studying and uninterruptible 
concentration."   -Donald Knuth

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

* Re: emacs calculator
  2005-01-15 22:50 emacs calculator B.T. Raven
                   ` (2 preceding siblings ...)
  2005-01-17  1:16 ` Peter Dyballa
@ 2005-01-17 20:38 ` Stefan Monnier
       [not found] ` <mailman.13583.1105927733.27204.help-gnu-emacs@gnu.org>
  4 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2005-01-17 20:38 UTC (permalink / raw)


> I added the following lines to my .emacs (i386-mingw: 21.3.1):
> (autoload 'calculator "calculator"
>     "Run the Emacs calculator." t)

This is redundant since `calculator' is already autoloaded in
Emacs-21.3.

> After saving this, exiting, restarting, still no go.  C-h k C-return is
> shown as undefined.

What does C-h c C-return say?


        Stefan

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

* Re: emacs calculator
       [not found] ` <mailman.13583.1105927733.27204.help-gnu-emacs@gnu.org>
@ 2005-01-18  3:40   ` B.T. Raven
  2005-01-18  7:09     ` Sean Richards
  2005-01-18 10:52     ` Peter Dyballa
  0 siblings, 2 replies; 10+ messages in thread
From: B.T. Raven @ 2005-01-18  3:40 UTC (permalink / raw)



"Peter Dyballa" <Peter_Dyballa@Web.DE> wrote in message
news:mailman.13583.1105927733.27204.help-gnu-emacs@gnu.org...
>
> Am 15.01.2005 um 23:50 schrieb B.T. Raven:
>
> > After saving this, exiting, restarting, still no go. C-h k C-return
is
> > shown as undefined.
> >
> > Then I replaced the last line with:
> > (define-key global-map [(control return)] 'calculator)
>
> I'd use
>
>    (global-set-key [c-return] 'calculator)
>
> Besides this it's good to check whether C-return really works. In a
> terminal I don't have C-return, all Emacs sees is RET. When you first
> do 'C-h k C-return' and then 'C-x Esc Esc' (repeat-complex-command)
you
> can see in the mini-buffer the proper syntax for the key (and save it
> for later use with C-a C-k C-g).
>
> --
> Greetings
>
>    Pete
>
> "Email is a wonderful thing for people whose role in life is to be on
> top of things. But not for me; my role is to be on the bottom of
> things. What I do takes long hours of studying and uninterruptible
> concentration."   -Donald Knuth

Thanks, Sean and Peter and Stefan. I didn't know that 'calculator was
being autoloaded from somewhere, so I guess I can remove that line from
my .emacs. It turns out that all of the various ways of binding the
C-return key work just fine. The problem was that I thought .emacs was
being read from site-lisp when in fact it was being read from d:\emacs.
My directory structure in this neck of the woods is
d:emacs\emacs-21.3\bin etc. Since one thing leads to another, my
question now is whether it's possible to force runemacs.exe to look for
.emacs in site-lisp instead of whatever is in HOME (or HOME$ or ~\,
whatever that means). Is there a search path order where .emacs is
looked for?

Thanks again,

Ed.

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

* Re: emacs calculator
  2005-01-18  3:40   ` B.T. Raven
@ 2005-01-18  7:09     ` Sean Richards
  2005-01-18 10:52     ` Peter Dyballa
  1 sibling, 0 replies; 10+ messages in thread
From: Sean Richards @ 2005-01-18  7:09 UTC (permalink / raw)


"B.T. Raven" <ejmn@cpinternet.com> writes:

> Thanks, Sean and Peter and Stefan. I didn't know that 'calculator was
> being autoloaded from somewhere, so I guess I can remove that line from
> my .emacs. It turns out that all of the various ways of binding the
> C-return key work just fine. The problem was that I thought .emacs was
> being read from site-lisp when in fact it was being read from d:\emacs.
> My directory structure in this neck of the woods is
> d:emacs\emacs-21.3\bin etc. Since one thing leads to another, my
> question now is whether it's possible to force runemacs.exe to look for
> .emacs in site-lisp instead of whatever is in HOME (or HOME$ or ~\,
> whatever that means). Is there a search path order where .emacs is
> looked for?

Have a look at the 'Init File' node in Emacs info 

The Init File, `~/.emacs'
=========================

   When Emacs is started, it normally loads a Lisp program from the file
`.emacs' or `.emacs.el' in your home directory.  We call this file your
"init file" because it specifies how to initialize Emacs for you.  You
can use the command line switch `-q' to prevent loading your init file,
and `-u' (or `--user') to specify a different user's init file (*note
Initial Options::).

   There can also be a "default init file", which is the library named
`default.el', found via the standard search path for libraries.  The
Emacs distribution contains no such library; your site may create one
for local customizations.  If this library exists, it is loaded
whenever you start Emacs (except when you specify `-q').  But your init
file, if any, is loaded first; if it sets `inhibit-default-init'
non-`nil', then `default' is not loaded.

   Your site may also have a "site startup file"; this is named
`site-start.el', if it exists.  Like `default.el', Emacs finds this
file via the standard search path for Lisp libraries.  Emacs loads this
library before it loads your init file.  To inhibit loading of this
library, use the option `--no-site-file'.  *Note Initial Options::.

   You can place `default.el' and `site-start.el' in any of the
directories which Emacs searches for Lisp libraries.  The variable
`load-path' (*note Lisp Libraries::) specifies these directories.  Many
sites put these files in the `site-lisp' subdirectory of the Emacs
installation directory, typically `/usr/local/share/emacs/site-lisp'.

...

Sean

-- 
"Hver sin smak", sa vintapperen, han drakk mens de andre sloss.

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

* Re: emacs calculator
  2005-01-18  3:40   ` B.T. Raven
  2005-01-18  7:09     ` Sean Richards
@ 2005-01-18 10:52     ` Peter Dyballa
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2005-01-18 10:52 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 18.01.2005 um 04:40 schrieb B.T. Raven:

> Is there a search path order where .emacs is looked for?

No. .emacs is always in a HOME directory (at least for UNIXen). You 
could try to manipulate %HOME% ...
--
Greetings

   Pete

"Computers are good at following instructions,
but not at reading your mind."
D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9

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

end of thread, other threads:[~2005-01-18 10:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-15 22:50 emacs calculator B.T. Raven
2005-01-16  2:46 ` Sean Richards
2005-01-16 10:33 ` kurtz
2005-01-16 13:16   ` Matthew Huggett
     [not found]   ` <mailman.13475.1105882289.27204.help-gnu-emacs@gnu.org>
2005-01-16 22:41     ` B.T. Raven
2005-01-17  1:16 ` Peter Dyballa
2005-01-17 20:38 ` Stefan Monnier
     [not found] ` <mailman.13583.1105927733.27204.help-gnu-emacs@gnu.org>
2005-01-18  3:40   ` B.T. Raven
2005-01-18  7:09     ` Sean Richards
2005-01-18 10:52     ` Peter Dyballa

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.