* Commenting Multiple Lines
@ 2011-09-18 18:20 Nachiappan A
2011-09-18 20:58 ` Deniz Dogan
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Nachiappan A @ 2011-09-18 18:20 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
Hi All,
I use C-c C-c to comment multiple lines, to un-comment multiple lines the
tutorial says give negative argument and C-c C-c.
How to provide negative argument ?
--
Regards
Nachiappan A
[-- Attachment #2: Type: text/html, Size: 282 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-18 18:20 Commenting Multiple Lines Nachiappan A
@ 2011-09-18 20:58 ` Deniz Dogan
2011-09-18 21:01 ` Jambunathan K
2011-09-18 21:27 ` Drew Adams
2 siblings, 0 replies; 8+ messages in thread
From: Deniz Dogan @ 2011-09-18 20:58 UTC (permalink / raw)
To: help-gnu-emacs
On 2011-09-18 20:20, Nachiappan A wrote:
> Hi All,
>
> I use C-c C-c to comment multiple lines, to un-comment multiple lines
> the tutorial says give negative argument and C-c C-c.
> How to provide negative argument ?
>
There are a lot of different ways, but the most common are probably:
M-- C-c C-c
C-u - C-c C-c
C-- C-c C-c (doesn't work in terminals)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-18 18:20 Commenting Multiple Lines Nachiappan A
2011-09-18 20:58 ` Deniz Dogan
@ 2011-09-18 21:01 ` Jambunathan K
2011-09-18 23:07 ` suvayu ali
2011-09-18 21:27 ` Drew Adams
2 siblings, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2011-09-18 21:01 UTC (permalink / raw)
To: Nachiappan A; +Cc: help-gnu-emacs
Nachiappan A <nachimdu@gmail.com> writes:
> Hi All,
>
> I use C-c C-c to comment multiple lines, to un-comment multiple lines
> the tutorial says give negative argument and C-c C-c.
> How to provide negative argument ?
C-h k M-;
C-h f comment-dwim
> --
> Regards
> Nachiappan A
>
>
>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Commenting Multiple Lines
2011-09-18 18:20 Commenting Multiple Lines Nachiappan A
2011-09-18 20:58 ` Deniz Dogan
2011-09-18 21:01 ` Jambunathan K
@ 2011-09-18 21:27 ` Drew Adams
2 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2011-09-18 21:27 UTC (permalink / raw)
To: 'Nachiappan A', help-gnu-emacs
> I use C-c C-c to comment multiple lines, to un-comment multiple
> lines the tutorial says give negative argument and C-c C-c.
> How to provide negative argument ?
Deniz already answered your negative-argument question.
But which command do you have bound to `C-c C-c'?
(You can use `C-h k' to find out.)
There are various ways to comment and uncomment multiple lines.
One way is to use command `comment-dwim', bound by default to `M-;'.
Jambunathan suggested using this.
"DWIM" means "do what I mean", and the idea is that the command
does different things in different contexts, but what it does is
always the right thing (what you meant) for each context.
FWIW, I find that "DWIM" is often misguided and presumptuous.
It too often really means "do something the command author thought
would be the right thing".
Personally, I prefer to use command `comment-region', which I bind
to `C-M-;'. With a plain prefix argument (i.e., `C-u') it
uncomments the region. It's an old command, simple and dependable.
It's not dwim: it never second-guesses you.
Use `C-h f' to find out more about any given function (e.g., command).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-18 21:01 ` Jambunathan K
@ 2011-09-18 23:07 ` suvayu ali
2011-09-19 3:38 ` Nachiappan A
0 siblings, 1 reply; 8+ messages in thread
From: suvayu ali @ 2011-09-18 23:07 UTC (permalink / raw)
To: Nachiappan A; +Cc: Emacs mailing list
On Sun, Sep 18, 2011 at 11:01 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
> C-h f comment-dwim
>
Usually bound to M-; by default.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-18 23:07 ` suvayu ali
@ 2011-09-19 3:38 ` Nachiappan A
2011-09-19 4:45 ` Deniz Dogan
2011-09-19 6:00 ` Suvayu Ali
0 siblings, 2 replies; 8+ messages in thread
From: Nachiappan A @ 2011-09-19 3:38 UTC (permalink / raw)
To: suvayu ali; +Cc: Emacs mailing list
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
Hi All,
Thanks for the reply. M-; works for me. It does both the job of commenting
and un-commenting.
@Drew Adams : When i did 'C-h k' and tried 'C-c C-c' below was the
description
"runs the command comment-region, which is an interactive compiled Lisp
function."
Just trying to understanding, both C-c C-c and M-; does the job of
commenting, what is the basic difference ?
Where can i find all such emacs shortcuts related to programming ?
One more question, is it allowed to resort help from group by sending out
mail to the group mail id
help-gnu-emacs@gnu.org ?
--
Regards
Nachiappan A
[-- Attachment #2: Type: text/html, Size: 871 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-19 3:38 ` Nachiappan A
@ 2011-09-19 4:45 ` Deniz Dogan
2011-09-19 6:00 ` Suvayu Ali
1 sibling, 0 replies; 8+ messages in thread
From: Deniz Dogan @ 2011-09-19 4:45 UTC (permalink / raw)
To: help-gnu-emacs
On 2011-09-19 05:38, Nachiappan A wrote:
> Hi All,
>
> Thanks for the reply. M-; works for me. It does both the job of
> commenting and un-commenting.
>
> @Drew Adams : When i did 'C-h k' and tried 'C-c C-c' below was the
> description
> "runs the command comment-region, which is an interactive compiled Lisp
> function."
>
> Just trying to understanding, both C-c C-c and M-; does the job of
> commenting, what is the basic difference ?
C-c C-c is not a universal binding for commenting. M-; is. C-c C-c is
most likely bound by some major mode you are using. Try it in e.g.
lisp-mode and you will see that it does not do commenting there.
> Where can i find all such emacs shortcuts related to programming ?
This also depends on the modes you are using. You can use e.g. C-h b to
see all bindings currently active (usually a pretty long list), or you
can use C-h m to see a description of all modes you are currently using,
which narrows the list of bindings for each mode down.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Commenting Multiple Lines
2011-09-19 3:38 ` Nachiappan A
2011-09-19 4:45 ` Deniz Dogan
@ 2011-09-19 6:00 ` Suvayu Ali
1 sibling, 0 replies; 8+ messages in thread
From: Suvayu Ali @ 2011-09-19 6:00 UTC (permalink / raw)
To: Nachiappan A; +Cc: Emacs mailing list
On Sun, 18 Sep 2011 23:38:24 -0400
Nachiappan A <nachimdu@gmail.com> wrote:
> One more question, is it allowed to resort help from group by sending
> out mail to the group mail id
> help-gnu-emacs@gnu.org ?
Aren't you doing that right now? help-gnu-emacs is an open to all
discussion/help mailing list for Emacs. So yes, you can ask about
almost anything here as long as it is related to Emacs.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-19 6:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-18 18:20 Commenting Multiple Lines Nachiappan A
2011-09-18 20:58 ` Deniz Dogan
2011-09-18 21:01 ` Jambunathan K
2011-09-18 23:07 ` suvayu ali
2011-09-19 3:38 ` Nachiappan A
2011-09-19 4:45 ` Deniz Dogan
2011-09-19 6:00 ` Suvayu Ali
2011-09-18 21:27 ` Drew Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).