GNU bug report logs - #7179
23.2; copyright-update on spanning copyright-limit

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: Kevin Ryde <user42@HIDDEN>; Keywords: confirmed; dated Sat, 9 Oct 2010 00:23:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 7179) by debbugs.gnu.org; 4 Mar 2016 15:35:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 04 10:35:15 2016
Received: from localhost ([127.0.0.1]:33833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1abrl5-0000OM-8z
	for submit <at> debbugs.gnu.org; Fri, 04 Mar 2016 10:35:15 -0500
Received: from hermes.netfonds.no ([80.91.224.195]:47472)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <larsi@HIDDEN>) id 1abrl2-0000N8-L4
 for 7179 <at> debbugs.gnu.org; Fri, 04 Mar 2016 10:35:14 -0500
Received: from 2.150.35.31.tmi.telenormobil.no ([2.150.35.31] helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <larsi@HIDDEN>)
 id 1abrju-0004T4-7N; Fri, 04 Mar 2016 16:34:02 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Kevin Ryde <user42@HIDDEN>
Subject: Re: bug#7179: 23.2; copyright-update on spanning copyright-limit
In-Reply-To: <87ocb4ky9q.fsf@HIDDEN> (Kevin Ryde's message of "Sat, 09 Oct
 2010 11:25:37 +1100")
Date: Fri, 04 Mar 2016 14:40:07 +0000
Message-ID: <87fuw6i9x4.fsf@HIDDEN>
References: <87ocb4ky9q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-MailScanner-ID: 1abrju-0004T4-7N
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1457710444.97691@QY0N0Lja/dOYnsuQ9awWCA
X-Spam-Status: No
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 7179
Cc: 7179 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Kevin Ryde <user42@HIDDEN> writes:

> If you're unlucky enough to have a copyright notice spanning the
> `copyright-limit' position in the buffer then M-x copyright-update makes
> a bit of a mess inserting the current year at the wrong place.  For
> example,
>
>     (progn
>       (require 'copyright)
>       (switch-to-buffer "foo")
>       (erase-buffer)
>       (insert (make-string (- copyright-limit 14) ?x) "\n"
>               "\nCopyright 2006, 2007, 2008 Foo Bar\n\n")
>       (copyright-update))
>
> gives
>
>     Copyright 20, 1006, 2007, 2008 Foo Bar
>
> where I expected
>
>     Copyright 2006, 2007, 2008, 2010 Foo Bar

I can confirm that this is still present on the current Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#7179; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 9 Oct 2010 00:22:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 08 20:22:34 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 1P4NCs-0007nP-1w
	for submit <at> debbugs.gnu.org; Fri, 08 Oct 2010 20:22:34 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gg@HIDDEN>) id 1P4NCp-0007nI-DT
	for submit <at> debbugs.gnu.org; Fri, 08 Oct 2010 20:22:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gg@HIDDEN>) id 1P4NG0-0002op-5j
	for submit <at> debbugs.gnu.org; Fri, 08 Oct 2010 20:25:49 -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
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:54233)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gg@HIDDEN>) id 1P4NG0-0002ol-2s
	for submit <at> debbugs.gnu.org; Fri, 08 Oct 2010 20:25:48 -0400
Received: from [140.186.70.92] (port=33178 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1P4NFy-0001Xx-T8
	for bug-gnu-emacs@HIDDEN; Fri, 08 Oct 2010 20:25:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gg@HIDDEN>) id 1P4NFx-0002oa-P2
	for bug-gnu-emacs@HIDDEN; Fri, 08 Oct 2010 20:25:46 -0400
Received: from mailout2-12.pacific.net.au ([125.255.80.139]:50615
	helo=mailout2.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gg@HIDDEN>) id 1P4NFx-0002nx-4X
	for bug-gnu-emacs@HIDDEN; Fri, 08 Oct 2010 20:25:45 -0400
Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au
	[61.8.2.162])
	by mailout2.pacific.net.au (Postfix) with ESMTP id 9DF2C29D012
	for <bug-gnu-emacs@HIDDEN>; Sat,  9 Oct 2010 11:25:39 +1100 (EST)
Received: from blah.blah (ppp2C25.dyn.pacific.net.au [61.8.44.37])
	by mailproxy1.pacific.net.au (Postfix) with ESMTP id D34C08C16
	for <bug-gnu-emacs@HIDDEN>; Sat,  9 Oct 2010 11:25:38 +1100 (EST)
Received: from gg by blah.blah with local (Exim 4.72)
	(envelope-from <gg@HIDDEN>) id 1P4NFp-000393-4F
	for bug-gnu-emacs@HIDDEN; Sat, 09 Oct 2010 11:25:37 +1100
From: Kevin Ryde <user42@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.2; copyright-update on spanning copyright-limit
Date: Sat, 09 Oct 2010 11:25:37 +1100
Message-ID: <87ocb4ky9q.fsf@HIDDEN>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Spam-Score: -5.5 (-----)
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: -5.5 (-----)

If you're unlucky enough to have a copyright notice spanning the
`copyright-limit' position in the buffer then M-x copyright-update makes
a bit of a mess inserting the current year at the wrong place.  For
example,

    (progn
      (require 'copyright)
      (switch-to-buffer "foo")
      (erase-buffer)
      (insert (make-string (- copyright-limit 14) ?x) "\n"
              "\nCopyright 2006, 2007, 2008 Foo Bar\n\n")
      (copyright-update))

gives

    Copyright 20, 1006, 2007, 2008 Foo Bar

where I expected

    Copyright 2006, 2007, 2008, 2010 Foo Bar

I suppose the limit in the re-search-forward means only "Copyright 20"
is matched and the current year ", 10" inserted there.  Perhaps a fresh
`looking-at' or something would ensure the limit doesn't truncate the
optional-ness in the years part of the pattern.

I struck this in a short html file where the copyright line was actually
near the end, yet close enough to the start to be seen by
copyright-update with the copyright-at-end-flag false.  I suppose a
copyright-names-regexp might force a spanning line not to match, but I
had that empty.




In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-05-16 on raven, modified by Debian
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t




Acknowledgement sent to Kevin Ryde <user42@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#7179; 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, 4 Mar 2016 15:45:01 UTC

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