unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] newcomment.el (comment-line): New command.
Date: Tue, 27 Jan 2015 00:35:31 -0200	[thread overview]
Message-ID: <CAAdUY-LXww7y6Hc76piLdBaqOn-nJHWu42MZDbuTCGOzNaocXA@mail.gmail.com> (raw)
In-Reply-To: <jwvh9vdmam3.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

On 26 Jan 2015 20:41, "Stefan Monnier" <monnier@iro.umontreal.ca> wrote:
>
> > Is there any particular reason why there's no `comment-line' command
> > in Emacs?
>
> Probably because the question goes both ways: is there any particular
> reason we'd need a comment-line command?
>
>    C-a C-SPC C-n M-;
>
> works for me when I need it.  M-x comment-line RET is much longer (even
> if you shorten it with something like partial-completion), so for such
> a command to make sense, you'd need a key binding for it.

Yes, you would. I didn't mention keybinds yet, because I was tackling this
by parts.

I bind it to `C-;'. Another viable key might be `C-M-;'. But it definitely
needs a key.
When you want to comment/uncomment something between 1 and 9 lines, it
always requires less keypresses than the M-; alternative.

Besides, commenting a single line is such a common scenario, I find it
deserves a single key instead of a 4 key combo.

It's also something that a lot of IDE's assign to a hotkey, so I'm sure I'm
not the only one that finds it useful. :-) And people who come from other
editors are sure to miss it.

[-- Attachment #2: Type: text/html, Size: 1416 bytes --]

  reply	other threads:[~2015-01-27  2:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 19:17 [PATCH] newcomment.el (comment-line): New command Artur Malabarba
2015-01-26 22:41 ` Stefan Monnier
2015-01-27  2:35   ` Artur Malabarba [this message]
2015-01-27  2:53     ` Drew Adams
2015-02-01 19:48       ` Artur Malabarba
2015-02-01 21:40         ` Drew Adams
2015-02-02 12:02           ` Artur Malabarba
2015-02-02  7:01         ` Thierry Volpiatto
2015-02-02 17:17         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAAdUY-LXww7y6Hc76piLdBaqOn-nJHWu42MZDbuTCGOzNaocXA@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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