all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* haml plus kill-rectangle hangs emacs
@ 2010-04-02 19:12 Audrey Lee
  2010-04-02 22:20 ` Peter Dyballa
  2010-04-06  6:17 ` Kevin Rodgers
  0 siblings, 2 replies; 3+ messages in thread
From: Audrey Lee @ 2010-04-02 19:12 UTC (permalink / raw)
  To: help-gnu-emacs

Hello emacs people.

I have bumped into an issue with emacs when I try to kill-rectangle
inside a file which is in haml-mode.

I see 2 symptoms:

1. Emacs "hangs"
2. The emacs process start hogging 99% of the CPU on my Mac.

Here is info about my emacs:

GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Carbon Version 1.6.0)
 of 2009-01-02 on seijiz.local

Question 1:
  - In my .emacs, What might be some simple syntax I can use to
disable kill-rectangle while I am in haml-mode ?

Question 2:
  - In my .emacs, What might be some simple syntax I can use to
connect a key to a function, but only for haml-mode, not globally.

Question 3:
  - Does emacs have some kind of debugger I can use to tell me what
files it is reading when I execute emacs commands?

These are the only emacs questions I can think of today.




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

* Re: haml plus kill-rectangle hangs emacs
  2010-04-02 19:12 haml plus kill-rectangle hangs emacs Audrey Lee
@ 2010-04-02 22:20 ` Peter Dyballa
  2010-04-06  6:17 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2010-04-02 22:20 UTC (permalink / raw)
  To: Audrey Lee; +Cc: help-gnu-emacs


Am 02.04.2010 um 21:12 schrieb Audrey Lee:

> Question 1:
>  - In my .emacs, What might be some simple syntax I can use to
> disable kill-rectangle while I am in haml-mode ?

	(global-unset-key KEY)

>
> Question 2:
>  - In my .emacs, What might be some simple syntax I can use to
> connect a key to a function, but only for haml-mode, not globally.

	(define-key KEYMAP KEY DEF)

>
> Question 3:
>  - Does emacs have some kind of debugger I can use to tell me what
> files it is reading when I execute emacs commands?


Yes (edebug node in info). You could also use this code to record in  
*Messages* buffer loading of Elisp files:

	(defadvice load (before debug-log activate)
	  (message "(Tipp von Kai G) Lade jetzt: %s" (ad-get-arg 0)))

It's just a bit complicated with Carbon Emacs finding the right init  
file...


Starting with Leopard (Mac OS X 10.5) you can also use DTrace, part of  
the OS. DTrace is exact, but also complicated.


Mac OS X's Activity Meter allows to take samples of a wild running  
process.

--
Greetings
                                  <]
   Pete       o        __o         |__    o           recumbo
     ___o    /I       -\<,         |o \  -\),-%       ergo sum!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________





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

* Re: haml plus kill-rectangle hangs emacs
  2010-04-02 19:12 haml plus kill-rectangle hangs emacs Audrey Lee
  2010-04-02 22:20 ` Peter Dyballa
@ 2010-04-06  6:17 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2010-04-06  6:17 UTC (permalink / raw)
  To: help-gnu-emacs

Audrey Lee wrote:
> Hello emacs people.
> 
> I have bumped into an issue with emacs when I try to kill-rectangle
> inside a file which is in haml-mode.
> 
> I see 2 symptoms:
> 
> 1. Emacs "hangs"
> 2. The emacs process start hogging 99% of the CPU on my Mac.
> 
> Here is info about my emacs:
> 
> GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Carbon Version 1.6.0)
>  of 2009-01-02 on seijiz.local
> 
> Question 1:
>   - In my .emacs, What might be some simple syntax I can use to
> disable kill-rectangle while I am in haml-mode ?

Commands can only be disabled globally, via the disabled property.

But you can disable a keybinding locally, via local-unset-key,
local-set-key, or define-key.  E.g.

(add-hook 'html-mode-hook
	  (lambda ()
	    (local-set-key (where-is-internal 'kill-rectangle
					      (current-local-map) t)
			   'undefined)))

> Question 2:
>   - In my .emacs, What might be some simple syntax I can use to
> connect a key to a function, but only for haml-mode, not globally.

(add-hook 'html-mode-hook
	  (lambda ()
	    (local-set-key SOME-KEY SOME-COMMAND)))

> Question 3:
>   - Does emacs have some kind of debugger I can use to tell me what
> files it is reading when I execute emacs commands?

Emacs has a debugger you can use all the time.  This is probably
too intrusive, but you get the idea:

(debug-on-entry 'load)

> These are the only emacs questions I can think of today.

Tomorrow is another day. :-)

-- 
Kevin Rodgers
Denver, Colorado, USA





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

end of thread, other threads:[~2010-04-06  6:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 19:12 haml plus kill-rectangle hangs emacs Audrey Lee
2010-04-02 22:20 ` Peter Dyballa
2010-04-06  6:17 ` Kevin Rodgers

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.