all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Nachiappan A'" <nachimdu@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Commenting Multiple Lines
Date: Sun, 18 Sep 2011 14:27:24 -0700	[thread overview]
Message-ID: <CCBCFF1E54F14C9A89CEFA372C6F28A0@us.oracle.com> (raw)
In-Reply-To: <CAN9n2azveXi_m_1c_t=aJzDVyQkRJ1_J-q7UpRO3SU9W48uCPg@mail.gmail.com>

> 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).




      parent reply	other threads:[~2011-09-18 21:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CCBCFF1E54F14C9A89CEFA372C6F28A0@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nachimdu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.