From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#7179: 23.2; copyright-update on spanning copyright-limit Date: Sat, 09 Oct 2010 11:25:37 +1100 Message-ID: <87ocb4ky9q.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286585096 4245 80.91.229.12 (9 Oct 2010 00:44:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Oct 2010 00:44:56 +0000 (UTC) To: 7179@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 09 02:44:55 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P4NYU-0001zi-Cc for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Oct 2010 02:44:54 +0200 Original-Received: from localhost ([127.0.0.1]:59801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4NYT-0003Hg-B2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Oct 2010 20:44:53 -0400 Original-Received: from [140.186.70.92] (port=34506 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4NYM-0003HH-Pb for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2010 20:44:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4NVf-0004Oc-JD for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2010 20:42:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4NVf-0004OY-GQ for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2010 20:41:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P4NDK-0007ng-9C; Fri, 08 Oct 2010 20:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2010 00:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128658375429974 (code B ref -1); Sat, 09 Oct 2010 00:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Oct 2010 00:22:34 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4NCs-0007nP-1w for submit@debbugs.gnu.org; Fri, 08 Oct 2010 20:22:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4NCp-0007nI-DT for submit@debbugs.gnu.org; Fri, 08 Oct 2010 20:22:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4NG0-0002op-5j for submit@debbugs.gnu.org; Fri, 08 Oct 2010 20:25:49 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:54233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4NG0-0002ol-2s for submit@debbugs.gnu.org; Fri, 08 Oct 2010 20:25:48 -0400 Original-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@gnu.org; Fri, 08 Oct 2010 20:25:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4NFx-0002oa-P2 for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2010 20:25:46 -0400 Original-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 ) id 1P4NFx-0002nx-4X for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2010 20:25:45 -0400 Original-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 ; Sat, 9 Oct 2010 11:25:39 +1100 (EST) Original-Received: from blah.blah (ppp2C25.dyn.pacific.net.au [61.8.44.37]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id D34C08C16 for ; Sat, 9 Oct 2010 11:25:38 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1P4NFp-000393-4F for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2010 11:25:37 +1100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 08 Oct 2010 20:23:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40775 Archived-At: 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