From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: New comment-sexp command and key bind Date: Fri, 21 Aug 2015 13:24:46 +0100 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1440159988 26643 80.91.229.3 (21 Aug 2015 12:26:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2015 12:26:28 +0000 (UTC) Cc: emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 21 14:26:27 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZSlOs-0001QY-W5 for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 14:26:27 +0200 Original-Received: from localhost ([::1]:41276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSlOs-0003DI-4u for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 08:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSlOV-0003Cw-AF for emacs-devel@gnu.org; Fri, 21 Aug 2015 08:26:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSlOU-0000kx-AO for emacs-devel@gnu.org; Fri, 21 Aug 2015 08:26:03 -0400 Original-Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:36292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSlOU-0008Q6-25 for emacs-devel@gnu.org; Fri, 21 Aug 2015 08:26:02 -0400 Original-Received: by lbbpu9 with SMTP id pu9so42514674lbb.3 for ; Fri, 21 Aug 2015 05:24:46 -0700 (PDT) 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:content-transfer-encoding; bh=pMButW/DLpYW5BuphYM3YQWFzLOO7DCPVKOryqwm0mU=; b=HAzF06TAgAjWmGMaF3dppvixDLsuqpYNj2UJeXpEvgGIMFDs7CCJrV0m4kFTAPXaco vCGa9uTaq2elW8SKSwBfEA/JXGDf9sHTl34ckJqdI8kAVVHXhya8NgyrZdkXuvqJXRKy 3oGKi+4kSckSFTmcTP+wuAI8mPv38zoCzw6AVTP66BV6GEqiUdhc0mCmUD36ZvWS8JxR J33Msvn9Ciaw1YY4bupd0hWGpc4GwdQstgydHSHBiZeT5eof97Qp2DxPFoy3wvfObxLv CjTAe8tTlDJ4zN0C6PHKThqIEuhlK+gdnJrFJl1bcnxi15h/gv9EvP7KQc0m2ymOs15n gYWQ== X-Received: by 10.112.126.101 with SMTP id mx5mr7849866lbb.35.1440159886861; Fri, 21 Aug 2015 05:24:46 -0700 (PDT) Original-Received: by 10.25.134.139 with HTTP; Fri, 21 Aug 2015 05:24:46 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: g8DVgmdj_gRbV8JAGp5EYui5jQI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189033 Archived-At: 2015-08-21 12:31 GMT+01:00 Jo=C3=A3o T=C3=A1vora : > This is interesting, I just tried it. > > Was it your intention to make the uncommenting behaviour for > consecutive sexps different from the commenting behaviour? The former > keeps point at the beginning of the sexp, while the latter advances > one sexp. I thing they should be uniform. Yes, it was intentional, though I'm still experimenting with the command so that's up for discussion. - When uncommenting, it leaves point exactly where it was unless you provide a prefix argument. With a prefix argument, it uncomments that many sexps and moves point after them. - When commenting, we always move point after the commented region (the prefix argument still specifies a number of sexps to comment). The only reason for this is that it's what seemed most useful to me. I never want point to be inside a sexp I just commented out (what could I possibly want to do with it?). OTOH, when I UNcomment something, I sometimes want to edit it afterwards (sometimes I don't, like I said, up for discussion). > I would prefer to *not* advance sexps. But I realize that that has the > drawback that it is difficult to advance one recently commented sexp. I really like advancing when commenting. It lets me comment a series of sexps by just holding down C-M- and then repeatedly hitting ; (of course, I can use the prefix arg for this, but sometimes I'm deciding which sexps to comment on the fly). Like you mention, it's also hard to manually forward-sexp after having commented it.