all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* comment latex C-c C-c?
@ 2008-01-12 16:13 avilella
  2008-01-12 16:25 ` Ralf Angeli
  0 siblings, 1 reply; 6+ messages in thread
From: avilella @ 2008-01-12 16:13 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

How can I set my emacs configuration so that when in LaTeX mode, "C-c
C-c" will comment out the
lines with ("%") as does comment it in other modes?

Right now, when I do "C-c C-c", I get "Command: (default)

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

* Re: comment latex C-c C-c?
  2008-01-12 16:13 comment latex C-c C-c? avilella
@ 2008-01-12 16:25 ` Ralf Angeli
  2008-01-12 16:43   ` avilella
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2008-01-12 16:25 UTC (permalink / raw)
  To: help-gnu-emacs

* avilella@gmail.com (2008-01-12) writes:

> How can I set my emacs configuration so that when in LaTeX mode, "C-c
> C-c" will comment out the
> lines with ("%") as does comment it in other modes?
>
> Right now, when I do "C-c C-c", I get "Command: (default)

`C-c C-c' is the canonical key binding for starting a processor or
compiler in Emacs.  If you overwrote this with another command you'd
have to come up with another binding for this functionality.

Commenting (and uncommenting) is usually available via `M-;'.

-- 
Ralf

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

* Re: comment latex C-c C-c?
  2008-01-12 16:25 ` Ralf Angeli
@ 2008-01-12 16:43   ` avilella
  2008-01-12 16:57     ` Ralf Angeli
  2008-01-12 18:21     ` Thierry Volpiatto
  0 siblings, 2 replies; 6+ messages in thread
From: avilella @ 2008-01-12 16:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 12, 4:25 pm, Ralf Angeli <dev.n...@caeruleus.net> wrote:
> * avile...@gmail.com (2008-01-12) writes:
> > How can I set my emacs configuration so that when in LaTeX mode, "C-c
> > C-c" will comment out the
> > lines with ("%") as does comment it in other modes?
>
> > Right now, when I do "C-c C-c", I get "Command: (default)
>
> `C-c C-c' is the canonical key binding for starting a processor or
> compiler in Emacs.  If you overwrote this with another command you'd
> have to come up with another binding for this functionality.
>
> Commenting (and uncommenting) is usually available via `M-;'.
>
> --
> Ralf

I've got this in my .emacs file:

(global-set-key "\C-c\C-c" 'comment-region)

So I guess this should also work with latex mode, right?

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

* Re: comment latex C-c C-c?
  2008-01-12 16:43   ` avilella
@ 2008-01-12 16:57     ` Ralf Angeli
  2008-01-12 18:08       ` Lennart Borgman (gmail)
  2008-01-12 18:21     ` Thierry Volpiatto
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2008-01-12 16:57 UTC (permalink / raw)
  To: help-gnu-emacs

* avilella@gmail.com (2008-01-12) writes:

> I've got this in my .emacs file:
>
> (global-set-key "\C-c\C-c" 'comment-region)
>
> So I guess this should also work with latex mode, right?

Not necessarily if the mode defines and uses its own keymap.

-- 
Ralf

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

* Re: comment latex C-c C-c?
  2008-01-12 16:57     ` Ralf Angeli
@ 2008-01-12 18:08       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-12 18:08 UTC (permalink / raw)
  To: angeli; +Cc: help-gnu-emacs

Ralf Angeli wrote:
> * avilella@gmail.com (2008-01-12) writes:
> 
>> I've got this in my .emacs file:
>>
>> (global-set-key "\C-c\C-c" 'comment-region)
>>
>> So I guess this should also work with latex mode, right?
> 
> Not necessarily if the mode defines and uses its own keymap.

See also

   (info "(elisp) Key Binding Conventions")

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

* Re: comment latex C-c C-c?
  2008-01-12 16:43   ` avilella
  2008-01-12 16:57     ` Ralf Angeli
@ 2008-01-12 18:21     ` Thierry Volpiatto
  1 sibling, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2008-01-12 18:21 UTC (permalink / raw)
  To: avilella@gmail.com; +Cc: help-gnu-emacs

"avilella@gmail.com" <avilella@gmail.com> writes:

> On Jan 12, 4:25 pm, Ralf Angeli <dev.n...@caeruleus.net> wrote:
>> * avile...@gmail.com (2008-01-12) writes:
>> > How can I set my emacs configuration so that when in LaTeX mode, "C-c
>> > C-c" will comment out the
>> > lines with ("%") as does comment it in other modes?
>>
>> > Right now, when I do "C-c C-c", I get "Command: (default)
>>
>> `C-c C-c' is the canonical key binding for starting a processor or
>> compiler in Emacs.  If you overwrote this with another command you'd
>> have to come up with another binding for this functionality.
>>
>> Commenting (and uncommenting) is usually available via `M-;'.
>>
>> --
>> Ralf
>
> I've got this in my .emacs file:
>
> (global-set-key "\C-c\C-c" 'comment-region)
>
> So I guess this should also work with latex mode, right?

No, because C-c C-c is the latex command to compile your file
just do M-; (thats work in all the modes)

Setting keybindings to C-c C-c is a bad idea because this keybinding is
already used in many modes of emacs.

-- 
A + Thierry
Pub key: http://pgp.mit.edu

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 16:13 comment latex C-c C-c? avilella
2008-01-12 16:25 ` Ralf Angeli
2008-01-12 16:43   ` avilella
2008-01-12 16:57     ` Ralf Angeli
2008-01-12 18:08       ` Lennart Borgman (gmail)
2008-01-12 18:21     ` Thierry Volpiatto

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.