From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Farrington Newsgroups: gmane.emacs.devel Subject: Re: comment-dwim has no behavior to comment out the current line without a region Date: Tue, 9 Dec 2008 15:03:16 -0500 Message-ID: References: <972C2D7E-3A86-489B-AAE5-17A52B943DB3@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228853028 19453 80.91.229.12 (9 Dec 2008 20:03:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2008 20:03:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 09 21:04:52 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LA8p9-0004vT-05 for ged-emacs-devel@m.gmane.org; Tue, 09 Dec 2008 21:04:51 +0100 Original-Received: from localhost ([127.0.0.1]:51166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA8nx-0002yN-Pw for ged-emacs-devel@m.gmane.org; Tue, 09 Dec 2008 15:03:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA8nt-0002y0-Ci for emacs-devel@gnu.org; Tue, 09 Dec 2008 15:03:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA8nr-0002wz-HR for emacs-devel@gnu.org; Tue, 09 Dec 2008 15:03:33 -0500 Original-Received: from [199.232.76.173] (port=54780 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA8nr-0002ww-EF for emacs-devel@gnu.org; Tue, 09 Dec 2008 15:03:31 -0500 Original-Received: from rn-out-0910.google.com ([64.233.170.186]:30605) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LA8nq-0006j0-US for emacs-devel@gnu.org; Tue, 09 Dec 2008 15:03:31 -0500 Original-Received: by rn-out-0910.google.com with SMTP id k32so157257rnd.7 for ; Tue, 09 Dec 2008 12:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=kD/sX7HHh5cNNOg/bD29bPWUJ2AV2GX4ghxca2DOuUc=; b=GVGBVB5nMZkK9dbxEXI1UFaC7h0/vnI/MgUGUtYYiIbY5eqn08/zx0sdZqvOOPzwGI 6D8h8r7KOaORZWnZXSIhm+7GaygEqAjCSnkGQIWj4UGMtXLURIwVGaHwQP9gjoIW8m7F xjFeqQL2x0hE99sZKvC/0swhLMSDH2lHTFS70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=D/txQyrssXxnUSawvQxnUsDYlE9ebuZKstKW0ZSVopFWERCk8TxGkAnVUM2TNAlETw 1OFX9+UhspHRpEK8tjytL59smSTJZl8FcoXQChdh2H2ZQ9ItZdtAoa0eDIFNiGhdzuER AiiGDRLwcr2LGw/3G5/J/qMcoKo/VxlS7zvDw= Original-Received: by 10.101.69.10 with SMTP id w10mr475121ank.98.1228853010051; Tue, 09 Dec 2008 12:03:30 -0800 (PST) Original-Received: from lawn-128-61-25-5.lawn.gatech.edu (lawn-128-61-25-5.lawn.gatech.edu [128.61.25.5]) by mx.google.com with ESMTPS id d29sm538431and.21.2008.12.09.12.03.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Dec 2008 12:03:28 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.929.2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106736 Archived-At: On Dec 9, 2008, at 2:48 PM, Stefan Monnier wrote: >> Generally speaking, what makes BOL a "common starting point" to >> perform >> comment-indent more-so than any other part of the line? > > I'm not sure it's much more so, but it's at least as common as > current-indentation, end of line, etc... Any given place in the line, or end of line, does not have the same semantic ambiguity around what behavior should be when dealing with comment-dwim. BOL and possibly current-indentation are the only logical places where one could expect comment-dwim (which should do what you mean) to comment out the current line. >> Additionally, is not BOL semantically the clearest place to run >> comment-dwim >> and expect it to comment out a given line rather than having it run >> comment-indent? > > Could be. I'm not saying your idea isn't good. I'm just saying > that it > is not compatible with the current behavior and that the current > behavior makes sense as well. You may find some other way to combine > comment-indent, comment-kill, and comment-region onto a single key. > E.g. M-; M-; is currently unused. It's an incompatible change, yes. But it's also an attempt to remove some ambiguity from comment-dwim (which isn't doing what I mean). If the command is meant to "do what I mean", then for it not to have any method of commenting out the current line in a single keystroke is, I think, a flaw. It doesn't necessarily have to be my implementation, but given that commenting out a whole line is a very common task, comment-dwim should support some manner of doing this in a single keystroke, in my opinion.