Summary: Emacs newbie: customizing blocks/regions
flag
Messages 1 - 10 of 889 - Collapse all
/groups/adfetch?adid=1Bk0lhIAAAC4Uo8R8wwWqRsenaWzgKaAxyxpo7bMRVgpn9ZMKisPfQ
Summary: Emacs newbie: customizing blocks/regions  
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  Allan  
View profile  
 More options Oct 1 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: al...@interport.net (Allan)
Date: 1996/10/01
Subject: Re: Summary: Emacs newbie: customizing blocks/regions

jmcb...@mailhost.tcs.tulane.edu (Jason F. McBrayer) wrote:

Yes, I will look into this.  I ran the backtrace you suggested,
then I "egrep"ped around the .el files for the variable
"exec-directory", which was plain wrong: "/usr/local/bin/emacs/bin"
                                                      Oops    ^^^^

is the "exec-directory" set from the environmental variables?
I'll poke around and set it the "config.sys" accordingly.

This is such a trivial problem, but I want to get it fixed.
That shows me for moving from the install path (I wanted to mirror
the Unix site I use).


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  Kai Grossjohann  
View profile  
 More options Oct 2 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: Kai Grossjohann <grossjoh...@ls6.informatik.uni-dortmund.de>
Date: 1996/10/02
Subject: Re: Summary: Emacs newbie: customizing blocks/regions

>>>>> Allan  writes:

  Allan> is the "exec-directory" set from the environmental variables?
  Allan> I'll poke around and set it the "config.sys" accordingly.

There are plenty of environment variables that Emacs evaluates.  Each
environment variable can be overridden by setting an ELisp variable.
Example: EMACSLOADPATH versus load-path.

  Allan> This is such a trivial problem, but I want to get it fixed.
  Allan> That shows me for moving from the install path (I wanted to
  Allan> mirror the Unix site I use).

Emacs is usually installed in /usr/local.  That means binaries in
/usr/local/bin, architecture independent stuff in
/usr/local/com/emacs, architecture dependent stuff in
/usr/local/share/emacs, info files in /usr/local/info, and so on.  You
can call configure with the --prefix option to change this:

./configure --prefix=/opt/local

This replaces "/usr/local" in all of the directories with
"/opt/local".  This results in compiled-in defaults for the different
directories and pathes.

kai
--
Life is hard and then you die.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Inverted question mark  
1.  Kai Stricker  
View profile  
 More options Oct 1 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: stric...@ph-cip.uni-koeln.de (Kai Stricker)
Date: 1996/10/01
Subject: Inverted question mark

Hello,

I am using GNU Emacs 19.30.1.
When writing spanish texts in iso-accents-mode all the accents work
properly. But ~? doesn't supply an inverted question mark as it should do
according to the documentation. Neither does ~! supply an inverted
exclamation mark.

What can I do about it???

Thanks,
Kai

Please answer by email:  stric...@ph-cip.uni-koeln.de


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  era eriksson  
View profile  
 More options Oct 2 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: era eriksson <rerik...@cc.helsinki.fi>
Date: 1996/10/02
Subject: Re: Inverted question mark

On 1 Oct 1996 13:15:49 GMT, stric...@ph-cip.uni-koeln.de (Kai
Stricker) posted to gnu.emacs.help:
 > When writing spanish texts in iso-accents-mode all the accents work
 > properly. But ~? doesn't supply an inverted question mark as it should do
 > according to the documentation. Neither does ~! supply an inverted
 > exclamation mark.

You could use iso-insert instead, which binds those to C-x 8 ? and
C-x 8 ! and also defines a function for inserting them if you don't
remember the keybinding or (shrug) the octal code.
  I don't know what a typical German setup would look like; with a
Swedish/Finnish keyboard and an Emacs configured to read and display
Latin-1, at least, iso-accents is more or less redundant. You can get
most accented characters (Spanish included) via dead keys which are
handled already in the keyboard driver. iso-insert, OTOH, is useful.

/* era */

--
See <http://www.ling.helsinki.fi/~reriksso/> for mantra, disclaimer, etc.
* If you enjoy getting spam, I'd appreciate it if you'd register yourself
  at the following URL:  <http://www.ling.helsinki.fi/~reriksso/spam.html>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keyboard and Emacs  
1.  Jari Aalto  
View profile  
 More options Oct 2 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: ssj...@uta.fi (Jari Aalto)
Date: 1996/10/02
Subject: Re: Keyboard and Emacs

| 28.9.96, Erik Naggum <e...@naggum.no> gnu.emacs.help
| [Jari Aalto]
|
| You always and consistently choose one of the _wrong_
| ways....
| .. somesuch idiotic crap.
|
| [clip]
|
| the dangers that your "help" will cause people to experience.  I care about
| Emacs, I care about Emacs users, and you, Jari Aalto, do _neither_: you're
| just too damn stupid to realize that you're creating a lot of mess that
| others have to clean up after you.
|
| See?  I get all worked up again.  Jari, do the world a favor and start
| working for Microsoft Support instead of helping people with Emacs, OK?

I just wonder if you have any friends in your normal life... I know
french people to be temperamentic but it seems that Norweigian viking
blood is running as hot too....

/jari
--
"The Man who makes no mistakes does not usually make anything."


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  kb  
View profile  
 More options Oct 3 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: k...@cs.umb.edu ()
Date: 1996/10/03
Subject: Re: Keyboard and Emacs

    (If only the standalone version of "info" would recognize "prior",
    "next", "left" and the rest from the aforementioned keyboard...)

Please report texinfo bugs/lossage to bug-texi...@prep.ai.mit.edu.
It was just luck I happened to noticed this.

Adding arrow keys to standalone info would be fine thing to do.
I will probably do it in some future release.
If someone would like to volunteer to do it will probably happen sooner :-).

k...@cs.umb.edu


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  Kevin Rodgers  
View profile  
 More options Oct 3 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: kev...@ihs.com (Kevin Rodgers)
Date: 1996/10/03
Subject: Re: Keyboard and Emacs

Bill Richter (rich...@gauss.math.nwu.edu) wrote:
>But on a Sun running X11R5, the "Home" key does not use `Home' as its
>keysym, but instead `F27'!  So I need in my .emacs files

>(global-set-key [f27] 'beginning-of-buffer)         ;R7=Home

Why not

        (global-set-key [f27] [home])           ; R7

as is done in Ethan Bradford's sun4-keys.el?
--
Kevin Rodgers <kevin.rodg...@ihs.com>   Project Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A201         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/754-3975[fax]


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Erik Naggum  
View profile  
 More options Oct 4 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: Erik Naggum <e...@naggum.no>
Date: 1996/10/04
Subject: Re: Keyboard and Emacs

[Bill Richter]

|   But on a Sun running X11R5, the "Home" key does not use `Home' as its
|   keysym, but instead `F27'!  So I need in my .emacs files
|  
|   (global-set-key [f27] 'beginning-of-buffer)         ;R7=Home

[Kevin Rodgers]

|   Why not
|  
|       (global-set-key [f27] [home])           ; R7
|  
|   as is done in Ethan Bradford's sun4-keys.el?

Please try

    (define-key function-key-map [f27] [home])

#\Erik
--
I could tell you, but then I would have to reboot you.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
5.  Bill Richter  
View profile  
 More options Oct 5 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: Bill Richter <rich...@borel.math.nwu.edu>
Date: 1996/10/05
Subject: Re: Keyboard and Emacs

>>>>> "Erik" == Erik Naggum <e...@naggum.no> responds to Kevin & me:

  >> (global-set-key [f27] 'beginning-of-buffer)          ;R7=Home
  >> (global-set-key [f27] [home])                        ; R7

  Erik> Please try

  Erik>     (define-key function-key-map [f27] [home])

Erik, can you explain what the difference is?  I know is that the
Emacs on-line hypertext manual has many rebinding examples using
`global-set-key' but only one like yours:

   * Rebind the key `C-x l' to run the function `make-symbolic-link'.

          (global-set-key "\C-xl" 'make-symbolic-link)

     or

          (define-key global-map "\C-xl" 'make-symbolic-link)

Let's compare Doc strings:

   global-set-key: an interactive compiled Lisp function.
   (global-set-key KEY COMMAND)
    ...
   COMMAND is a symbol naming an interactively-callable function.
                ^^^^^

OK, let's check:

(symbolp 'beginning-of-buffer)
 => t
(symbolp [home])        
 => nil
(vectorp 'beginning-of-buffer)
 => nil
(vectorp [home])        
 => t

OK, [home] evaluates to a vector, while beginning-of-buffer is a
symbol.  I suppose [home] isn't an "interactively-callable function."

   define-key: a built-in function.
   (define-key KEYMAP KEY DEF)

   DEF is anything that can be a key's definition:
    nil (means key is undefined in this keymap),
    a command (a Lisp function suitable for interactive calling)
    a string (treated as a keyboard macro),
    a keymap (to define a prefix key),
    a symbol.  When the key is looked up, the symbol will stand for its
       function definition, which should at that time be one of the above,
       or another symbol whose function definition is used, etc.
    a cons (STRING . DEFN), meaning that DEFN is the definition
       (DEFN should be a valid definition in its own right),
    or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP.

   If KEYMAP is a sparse keymap, the pair binding KEY to DEF is added at
   the front of KEYMAP.

Ah, but

(commandp [home])
 => t

on the same hand,

(commandp 'beginning-of-buffer)
 => t

so it's also fine to use

(define-key function-key-map [f27] 'beginning-of-buffer)

So your syntax is legitimized while Kevin's is not.  And yet what is
wrong with *using* Kevin's?  Is there anyway we'd get in trouble?
`s'-ing for commandp in the Emacs Lisp manual, I get:

   Interactive Call
   ================

      After the command loop has translated a key sequence into a
   definition, it invokes that definition using the function
   `command-execute'...

 - Function: commandp OBJECT
     Returns `t' if OBJECT is suitable for calling interactively; that
     is, if OBJECT is a command.  Otherwise, returns `nil'.

     The interactively callable objects include strings and vectors
     (treated as keyboard macros)...

     A symbol is `commandp' if its function definition is `commandp'.

and in fact both of these sexps evaluate to `beginning-of-buffer':

(command-execute [home])
(command-execute 'beginning-of-buffer)

So Kevin's is pretty close, when you read back to

   (global-set-key KEY COMMAND)

I thought to check this out when you got on Jari for not knowing the
difference between `setq' and `defconst'.  I didn't either, so I read
the Elisp manual, and the clearest thing I found was in the node
"Defining Symbols ================":

      In Emacs Lisp, a definition is not required in order to use a
   symbol as a variable or function.  Thus, you can make a symbol a
   global variable with `setq', whether you define it first or not.
   The real purpose of definitions is to guide programmers and
   programming tools.  They inform programmers who read the code that
   certain symbols are *intended* to be used as variables, or as
   functions.  In addition, utilities such as `etags' and
   `make-docfile' recognize definitions, and add appropriate
   information to tag tables and the `emacs/etc/DOC-VERSION'
   file. *Note Accessing Documentation::.

That really sounds like the difference "to inform programmers."  The
doc string reads

   (defconst SYMBOL INITVALUE DOCSTRING): define SYMBOL as a constant
   variable.  The intent is that programs do not change this value,
   but users may.  

So for users to use defconst would not conform to the convention.

  Erik> Always sets the value of SYMBOL to the result of evalling
   INITVALUE.  If SYMBOL is buffer-local, its default value is what is
   set; buffer-local values are not affected.  

Now maybe this is a place where it would be dumb to use `defconst'
instead of `setq'.

   Note: do not use `defconst' for user options in libraries that are not
   normally loaded, since it is useful for users to be able to specify
   their own values for such variables before loading the library.
   Since `defconst' unconditionally assigns the variable,
   it would override the user's choice.

But as they explain, for such variable you should use `defvar'
instead, this isn't a `setq' example:

   However, it does make a difference for initialization: `defconst'
   unconditionally initializes the variable, while `defvar'
   initializes it only if it is void.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
6.  Erik Naggum  
View profile  
 More options Oct 8 1996, 7:00 am
Newsgroups: gnu.emacs.help
From: Erik Naggum <e...@naggum.no>
Date: 1996/10/08
Subject: Re: Keyboard and Emacs

[Bill Richter]

|   Erik, can you explain what the difference is?

Vladimir Alexiev has already covered most of this, but I'd like to point
out that when making bindings in `function-key-map', other bindings that
affect a key will be bound automatically.  I.e., `function-key-map' (and
`keyboard-translate-table') _remap_, while all other maps map to a target.

E.g., if `f27' is remapped to `home' in `function-key-map', then any other
bindings of `home' made by any other package, will work equally well for
`f27'.  If `f27' is bound directly in some other map, it will remain mapped
even if `home' is bound to something else.  Therefore, it is wrong to bind
a key that is supposed to act like another (more recognized) key in any
other map than `function-key-map'.  Likewise, it is wrong to bind keys to
anything other than other keys in `function-key-map'.

You seem to have read the entire Emacs manual, _except_ the entry for
`function-key-map'.  Now would be a good time to type C-h v function-key-map.

#\Erik
--
I could tell you, but then I would have to reboot you.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google