From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#21921: New function comment-line also comments first line after region Date: Mon, 16 Nov 2015 09:02:12 +0000 Message-ID: References: <56477C57.6090109@live.com> <87a8qffpvl.fsf@gmx.us> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114057cc36dc940524a4aa5e X-Trace: ger.gmane.org 1447711241 30450 80.91.229.3 (16 Nov 2015 22:00:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2015 22:00:41 +0000 (UTC) Cc: 21921@debbugs.gnu.org To: Rasmus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 16 23:00:35 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZyRp9-0005yv-GS for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2015 23:00:31 +0100 Original-Received: from localhost ([::1]:50346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRp9-0007Ip-1j for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2015 17:00:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFgp-00064v-CO for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 04:03:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyFgk-0006N0-Cg for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 04:03:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFgk-0006Mw-9k for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 04:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZyFgj-0005a6-Ok for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 04:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2015 09:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21921 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21921-submit@debbugs.gnu.org id=B21921.144766453621399 (code B ref 21921); Mon, 16 Nov 2015 09:03:01 +0000 Original-Received: (at 21921) by debbugs.gnu.org; 16 Nov 2015 09:02:16 +0000 Original-Received: from localhost ([127.0.0.1]:39495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyFfz-0005Z4-Hn for submit@debbugs.gnu.org; Mon, 16 Nov 2015 04:02:15 -0500 Original-Received: from mail-lf0-f46.google.com ([209.85.215.46]:33410) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyFfx-0005Yw-JI for 21921@debbugs.gnu.org; Mon, 16 Nov 2015 04:02:14 -0500 Original-Received: by lfaz4 with SMTP id z4so19082735lfa.0 for <21921@debbugs.gnu.org>; Mon, 16 Nov 2015 01:02:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tGdwz0fZLzzDERi5/Bn0TxMAi+7mRRnLlqEGXiFOkcc=; b=aIczOE/bGRfIdEMxlhYnr6HPb6ArIuLrgVD0VpMPS/boQE/RAiUY74/pT76z+9JqKD yCMT9SPo5CN14qUrIDnMmxoPmz8gRA/RCpNjMZDAQKjiD47bWFO2uf1JKw2Ybg/NvfTs aFbY3SfNy5Css0eZLbQT6dVvioy7Z11jHgdsiZ5j5mW29m470H5N+vp4PlwU9HLQrXaH GHny9V8Azg9QHP49uvCVBqegPrhbGC0et/IaAyatARpS7Oe+iCB1j7VoMET9tlmcY6DS wZusR4KnzkxaunwPtRWIbsTX7IJYYPpTkZ1S346UHdriQbMAysEbqlBj5Sn0q/pf0ish 1W8g== X-Received: by 10.25.23.42 with SMTP id n42mr16811965lfi.42.1447664532509; Mon, 16 Nov 2015 01:02:12 -0800 (PST) Original-Received: by 10.112.63.70 with HTTP; Mon, 16 Nov 2015 01:02:12 -0800 (PST) Original-Received: by 10.112.63.70 with HTTP; Mon, 16 Nov 2015 01:02:12 -0800 (PST) In-Reply-To: <87a8qffpvl.fsf@gmx.us> X-Google-Sender-Auth: GbvNFEmfiTu7i3M6GsTuPqtyYZ8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108778 Archived-At: --001a114057cc36dc940524a4aa5e Content-Type: text/plain; charset=UTF-8 On 15 Nov 2015 11:45 am, "Rasmus" wrote: > > > > Yet pressing C-x C-; comments out all three lines. I find this second example especially confusing. > > > > Is this behaviour only surprising to me? > > Perhaps the confusion is caused by region not being displayed at column > zero. > > The behavior is correct IMO. > > For your particular examples, comment-dwim does what you want, it seems. > > Hope it helps, > Rasmus Indeed. When I was deciding how comment-line should work on a region, I specifically chose to not make it identical to comment-dwim. Maybe it should still treat the "region ends at a newline" case specially. Some emacs commands do that already. Not sure though, since that would be slightly redundant with comment-dwim. --001a114057cc36dc940524a4aa5e Content-Type: text/html; charset=UTF-8


On 15 Nov 2015 11:45 am, "Rasmus" <rasmus@gmx.us> wrote:
> >
> > Yet pressing C-x C-; comments out all three lines. I find this second example especially confusing.
> >
> > Is this behaviour only surprising to me?
>
> Perhaps the confusion is caused by region not being displayed at column
> zero.
>
> The behavior is correct IMO.
>
> For your particular examples, comment-dwim does what you want, it seems.
>
> Hope it helps,
> Rasmus

Indeed. When I was deciding how comment-line should work on a region, I specifically chose to not make it identical to comment-dwim.

Maybe it should still treat the "region ends at a newline" case specially. Some emacs commands do that already.
Not sure though, since that would be slightly redundant with comment-dwim.

--001a114057cc36dc940524a4aa5e--