GNU bug report logs - #6822
comment-padding skips first char in html-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Lennart Borgman <lennart.borgman@HIDDEN>; dated Sun, 8 Aug 2010 17:10:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 6822 <at> debbugs.gnu.org:


Received: (at 6822) by debbugs.gnu.org; 9 Aug 2010 15:29:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 11:29:48 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OiUIO-0007qh-NB
	for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 11:29:48 -0400
Received: from impaqm1.telefonica.net ([213.4.138.1])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OiUIM-0007qV-M1
	for 6822 <at> debbugs.gnu.org; Mon, 09 Aug 2010 11:29:48 -0400
Received: from IMPmailhost4.adm.correo ([10.20.102.125])
	by IMPaqm1.telefonica.net with bizsmtp
	id sF2o1e00K2iL0W201FWTRw; Mon, 09 Aug 2010 17:30:27 +0200
Received: from ceviche.home ([83.40.4.203])
	by IMPmailhost4.adm.correo with BIZ IMP
	id sFWQ1e00C4NokFF1kFWR12; Mon, 09 Aug 2010 17:30:27 +0200
X-Brightmail-Tracker: AAAAAA==
X-TE-authinfo: authemail="monnier$movistar.es"
	|auth_email="monnier@HIDDEN"
X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01"
Received: by ceviche.home (Postfix, from userid 20848)
	id 88D2866138; Mon,  9 Aug 2010 17:30:24 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: Chong Yidong <cyd@HIDDEN>
Subject: Re: bug#6822: comment-padding skips first char in html-mode
In-Reply-To: <87eie84qxo.fsf@HIDDEN> (Chong Yidong's message of
	"Sun, 08 Aug 2010 19:37:07 -0400")
Date: Mon, 09 Aug 2010 10:35:06 +0200
Message-ID: <jwvk4o089yv.fsf-monnier+emacs@HIDDEN>
References: <AANLkTik3rJX45_khaYZdqE+GzaT7Q09iw+rLguVsA9Wa@HIDDEN>
	<87eie84qxo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 6822
Cc: 6822 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

>> (setq comment-padding "xy")
>> gives
>> <!-- yy --> - html-mode

> This is because of this behavior in comment-padright and
> comment-padleft:

>   If STR already contains padding, the corresponding amount is
>   ignored from `comment-padding'.

> I'm not sure what the reason is.  Stefan?

IIRC the issue is that comment-padding interacts with comment-start and
comment-end in otherwise unexpected ways.  E.g. often "comment-start"
includes a trailing space, since this string is used as-is when you
insert a comment via comment-indent.  But if you set comment-padding to
2, you usually don't want the resulting spacing to be 3 spaces when
you do comment-region.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6822; Package emacs. Full text available.

Message received at 6822 <at> debbugs.gnu.org:


Received: (at 6822) by debbugs.gnu.org; 8 Aug 2010 23:36:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 08 19:36:29 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OiFPp-0008DS-Dh
	for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 19:36:29 -0400
Received: from pantheon-po44.its.yale.edu ([130.132.50.78])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <cyd@HIDDEN>) id 1OiFPn-0008DN-Sm
	for 6822 <at> debbugs.gnu.org; Sun, 08 Aug 2010 19:36:28 -0400
Received: from furry (173-9-75-145-NewEngland.hfc.comcastbusiness.net
	[173.9.75.145]) (authenticated bits=0)
	by pantheon-po44.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id
	o78Nb75u017489
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 8 Aug 2010 19:37:07 -0400
Received: by furry (Postfix, from userid 1000)
	id B2A80C013; Sun,  8 Aug 2010 19:37:07 -0400 (EDT)
From: Chong Yidong <cyd@HIDDEN>
To: Stefan Monnier  <monnier@HIDDEN>
Subject: Re: bug#6822: comment-padding skips first char in html-mode
References: <AANLkTik3rJX45_khaYZdqE+GzaT7Q09iw+rLguVsA9Wa@HIDDEN>
Date: Sun, 08 Aug 2010 19:37:07 -0400
In-Reply-To: <AANLkTik3rJX45_khaYZdqE+GzaT7Q09iw+rLguVsA9Wa@HIDDEN>
	(Lennart Borgman's message of "Sat, 7 Aug 2010 23:35:14 +0200")
Message-ID: <87eie84qxo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed)
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6822
Cc: 6822 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Lennart Borgman <lennart.borgman@HIDDEN> writes:

> (setq comment-padding "xy")
>
> gives
>
> <!-- yy --> - html-mode

This is because of this behavior in comment-padright and
comment-padleft:

  If STR already contains padding, the corresponding amount is
  ignored from `comment-padding'.

I'm not sure what the reason is.  Stefan?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6822; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Aug 2010 17:09:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 08 13:09:53 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Oi9Nh-0002jo-0c
	for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:09:53 -0400
Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1Oi9Nf-0002jh-0p
	for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:09:51 -0400
Received: from lists.gnu.org ([199.232.76.165]:33657)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>) id 1Oi9OL-0000eI-Ks
	for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:10:33 -0400
Received: from [140.186.70.92] (port=49895 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Oi9OB-0003OX-SJ
	for bug-gnu-emacs@HIDDEN; Sun, 08 Aug 2010 13:10:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1Ohr3H-0001NS-6R
	for bug-gnu-emacs@HIDDEN; Sat, 07 Aug 2010 17:35:41 -0400
Received: from mail-qw0-f41.google.com ([209.85.216.41]:64904)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1Ohr3H-0001NI-4M
	for bug-gnu-emacs@HIDDEN; Sat, 07 Aug 2010 17:35:35 -0400
Received: by qwk4 with SMTP id 4so7062936qwk.0
	for <bug-gnu-emacs@HIDDEN>; Sat, 07 Aug 2010 14:35:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:from:date
	:message-id:subject:to:content-type;
	bh=Z+Zv6DzDpDQlYe7+Qw1vgFe9DvFtdP3YDBBbZFCJTrs=;
	b=Z/TYE6cHAlAQgUgz9hUCd4sY2IeHVgxf5jLTN1Za5PE/eUfYdDglFjyML/JyT7tVzk
	wL73XNsKuTk4eY9qs+HNWTdFq4gX9SmdR9Av9K0PcpdS4iR2Xvv1VqA+amHfUKMjxoMA
	O0lzXfSOc8+z6NBmGokTnmtVx3PGKFfrgYiuM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:from:date:message-id:subject:to:content-type;
	b=fbYoCHX4MFeHvBm8ze0fjLwqcTCIk73BuJPJ1N0iibBih+YRyrQ30+JJ70O9QUgbB7
	zHHYYUzCZAic6GQH/j9/kLRxAOI8bUrjceObg+OR6IcLGG3vV1U/D5CfqMN3DnHotlbT
	uKDvARenJ0wt/iXrlHRmcbkn79CWZn/Ollf8I=
Received: by 10.229.8.210 with SMTP id i18mr5799258qci.180.1281216934242; Sat, 
	07 Aug 2010 14:35:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.61.153 with HTTP; Sat, 7 Aug 2010 14:35:14 -0700 (PDT)
From: Lennart Borgman <lennart.borgman@HIDDEN>
Date: Sat, 7 Aug 2010 23:35:14 +0200
Message-ID: <AANLkTik3rJX45_khaYZdqE+GzaT7Q09iw+rLguVsA9Wa@HIDDEN>
Subject: comment-padding skips first char in html-mode
To: Emacs Bugs <bug-gnu-emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

(setq comment-padding "xy")

gives

<!-- yy --> - html-mode


Trunk 2010-08-04.




Acknowledgement sent to Lennart Borgman <lennart.borgman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6822; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.