Emacs python mode question

Discussion in 'Python' started by jblazi, Jan 10, 2004.

  1. jblazi

    jblazi Guest

    If I should like to go to line 345: how can I do that? Typing M-x
    goto-line and then 345 is a bit cumbersome.
    I defines the key Alt-g to be goto-line, but it does not work.

    TIA,
    jb


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
     
    jblazi, Jan 10, 2004
    #1
    1. Advertising

  2. jb> If I should like to go to line 345: how can I do that? Typing M-x
    jb> goto-line and then 345 is a bit cumbersome. I defines the key Alt-g
    jb> to be goto-line, but it does not work.

    Is M-g not bound to goto-line? You can check for keybindings by typing "C-h
    w" then entering the name of a command.

    Skip
     
    Skip Montanaro, Jan 10, 2004
    #2
    1. Advertising

  3. jblazi

    jblazi Guest

    On Sat, 10 Jan 2004 15:49:22 -0600, Skip Montanaro wrote:

    >
    > jb> If I should like to go to line 345: how can I do that? Typing M-x
    > jb> goto-line and then 345 is a bit cumbersome. I defines the key
    > Alt-g jb> to be goto-line, but it does not work.
    >
    > Is M-g not bound to goto-line? You can check for keybindings by typing
    > "C-h w" then entering the name of a command.


    Thx.
    gogo-line is on the menu but is not bound to a key. How can I bind it?

    --
    jb


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
     
    jblazi, Jan 10, 2004
    #3
  4. jb> gogo-line is on the menu but is not bound to a key. How can I bind
    jb> it?

    M-x global-set-key RET

    should do the job interactively. In your ~/.emacs file use something like:

    (define-key esc-map [g] 'goto-line)

    YMMV. I don't use GNU Emacs anymore. Keybindings is one area in which
    Emacs and XEmacs have diverged. Try C-h f define-key RET.

    Skip
     
    Skip Montanaro, Jan 10, 2004
    #4
  5. jblazi <> writes:

    > gogo-line is on the menu but is not bound to a key. How can I bind it?


    Put (global-set-key (kbd "M-g") 'goto-line) in your ~/.emacs

    Sean

    --
    "Hver sin smak", sa vintapperen, han drakk mens de andre sloss.
     
    Sean Richards, Jan 10, 2004
    #5
  6. In article <>, jblazi wrote:

    > If I should like to go to line 345: how can I do that? Typing M-x
    > goto-line and then 345 is a bit cumbersome.
    > I defines the key Alt-g to be goto-line, but it does not work.


    In XEmacs, you can just highlight the error line and middle-click. I don't
    know whether this feature is missing in Gnu Emacs or just turned off.

    Dave Cook
     
    David M. Cook, Jan 11, 2004
    #6
  7. jblazi

    jblazi Guest

    On Sat, 10 Jan 2004 16:25:59 -0600, Skip Montanaro wrote:

    > (define-key esc-map [g] 'goto-line)


    For one reason or the other, this does not work. (I tried several such
    options before posting.)
    When I do this (and save .emacs and restart Emacs of course) I get the
    message

    Set face default (M-g d) ...

    in the command line buffer.

    jb


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
     
    jblazi, Jan 11, 2004
    #7
  8. jblazi <> writes:

    > On Sat, 10 Jan 2004 16:25:59 -0600, Skip Montanaro wrote:
    >
    > > (define-key esc-map [g] 'goto-line)

    >
    > For one reason or the other, this does not work.


    It doesn't work because the above will specifically set ESC-g to goto-line,
    which isn't what you want, I guess. Try either of the following:

    (global-set-key [(meta g)] 'goto-line)
    (global-set-key "\eg" 'goto-line)

    Before you save your .emacs you can verify that the command works by pressing
    C-xC-e right after the closing ')' and then M-g.

    'as
     
    Alexander Schmolck, Jan 11, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John J Lee
    Replies:
    3
    Views:
    492
    bruno at modulix
    Dec 1, 2005
  2. Edward Loper
    Replies:
    0
    Views:
    478
    Edward Loper
    Aug 7, 2007
  3. Jeffrey Moss

    eruby mode emacs with mmm-mode

    Jeffrey Moss, Jul 6, 2005, in forum: Ruby
    Replies:
    1
    Views:
    151
    Alan Chen
    Jul 6, 2005
  4. PerlFAQ Server
    Replies:
    1
    Views:
    197
    Marc Girod
    Jan 8, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    168
    PerlFAQ Server
    Apr 12, 2011
Loading...

Share This Page