From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: comment-kill and the state of the world Date: Fri, 17 Oct 2003 20:01:09 GMT Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <878ynldq65.fsf@newsguy.com> <87r81byg53.fsf@newsguy.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066421795 22334 80.91.224.253 (17 Oct 2003 20:16:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2003 20:16:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 17 22:16:33 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAb1V-00048g-00 for ; Fri, 17 Oct 2003 22:16:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAb1T-0006LL-Ov for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Oct 2003 16:16:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-NNTP-Posting-Host: 132.204.24.42 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1066420869 132.204.24.42 (Fri, 17 Oct 2003 16:01:09 EDT) Original-NNTP-Posting-Date: Fri, 17 Oct 2003 16:01:09 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:117378 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13308 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13308 > Ah, but you get the same thing with comment-dwim with an argument on a > line with an existing comment. Is that any better? The command throuh which you reach the code is not very relevant. > It comes down to comment-dwim. It really tries to do too much. The > different situations should be separated, and then common patterns will > emerge to make into subroutines. Huh? They are separate. You can call comment-indent or comment-region or uncomment-region or comment-kill directly. It's just that after many years of using those commands (they were there in Emacs-18 already), it appeared that most of their combined functionality could be provided with a single key binding. Feel free not to use it or to criticize it constructively. > Right now, comment-dwim calls comment-indent if not a blank line, but > inserts a comment itself on a blank one. The two braches are quite > different, use different customization variables, etc. They don't use the same settings because experience indicates that they should behave differently. For example, in Lisp, comment-indent should use a single `;' whereas when inserting a comment on a blank line to be indented at the same level as code, it should use `;;'. Also in one circumstance a space might be desired but not in the other, ... The way to customize those could be improved. It is currently mostly due to historical baggage. For example, the number of spaces to put after the comment marker in comment-indent can only be specified directly in `comment-start', whereas comments on their own line specify it with `comment-add' (which incidentally cannot remove space from `comment-start'). Suggestions are welcome, but don't forget that supporting people's current settings (embedded in packages written in 1997, for example) is important. > And, let me repeat myself, the reindent in comment-kill is a bug. You can repeat it all you want here, but it will only get heard by the powers that be if you post it via M-x report-emacs-bug. I'd tend to agree, BTW, after thinking about it a bit more. Stefan