From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#24725: 25.1.50; vc-region-history may exceed max line number of file in repository Date: Thu, 20 Oct 2016 13:21:00 +0300 Message-ID: References: <87y41llol4.fsf@gmail.com> <8737jrejkd.fsf@gmail.com> <87r37bcuho.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1476958952 10125 195.159.176.226 (20 Oct 2016 10:22:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2016 10:22:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 Cc: 24725@debbugs.gnu.org To: Tino Calancha , Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 12:22:29 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxAUE-0008Hr-DD for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 12:22:10 +0200 Original-Received: from localhost ([::1]:53629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAUG-0004I2-I0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 06:22:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAUB-0004EX-24 for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxAU6-0006vD-4Z for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:22:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34176) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxAU6-0006v9-0d for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxAU5-00050s-Rt for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2016 10:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24725 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24725-submit@debbugs.gnu.org id=B24725.147695887119213 (code B ref 24725); Thu, 20 Oct 2016 10:22:01 +0000 Original-Received: (at 24725) by debbugs.gnu.org; 20 Oct 2016 10:21:11 +0000 Original-Received: from localhost ([127.0.0.1]:40366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxATH-0004zo-DA for submit@debbugs.gnu.org; Thu, 20 Oct 2016 06:21:11 -0400 Original-Received: from mail-lf0-f53.google.com ([209.85.215.53]:34345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxATF-0004zX-5v for 24725@debbugs.gnu.org; Thu, 20 Oct 2016 06:21:09 -0400 Original-Received: by mail-lf0-f53.google.com with SMTP id b81so76528774lfe.1 for <24725@debbugs.gnu.org>; Thu, 20 Oct 2016 03:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6IXxEqla5X3dFPPirggpwfiZ0/xge5XhshX24/GdEZE=; b=uW4L1l5yTM3/BuZsuEoOPQHB/2+vGmTJFroLe/jcsWHJ805TOqkBCialQ7aBJND3dD C1n81yziDCeOGjy51Dtj5hx1IrGdvl7dJt+oclgd7l7xI/WC/pQAfz0L32QV+Erp4uNR 7en3KXzkMcfrokxMBmlifTy2rlgXjEzJ/amqW8bn1osUqLsoqSjG47Ya5x2z4tOOMd7g v0NAse++BQAlP8Sqd71JbU+Nfm5PioxRIe2N0RGUGk4j7ELXlMVP6foHqeappumCylxG kCJBfhMo1N/X/KmdAhsPvGlaLf2d/xpZfx/nhH06hNzs68oEQuJzzNsNYgcpXgLxYOc+ NG0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6IXxEqla5X3dFPPirggpwfiZ0/xge5XhshX24/GdEZE=; b=NYGonQHlKZiUNTeHXy0lEs00qJKrHAab913F1ntRaooMgALtdi3rStFxG3tqnG3oAA eU6dzwG5D6XQcRCttq1LVfFLw2Fp88Wak5kVjRE0eHIWxmUylLEd5dxgBPdOv4SUx866 lAzKYOlKWcfvJSixC1yH+v1V1wHt8cm/9CQZXOkfk1LguAinRvqdQFf56Rv1AoAD+BjS 0seNkXc8dafcNvT4vhdgOOLjYLIiYU1JaE+LESrJ4v1TKZh/jJ0FGYeR74azA06vXMqn 0zvY3SFUjC9WKKFgrId9J4cclqO2e/9y5HTTm5HHviyVmMe4KN3ZyPBQAuzNvQvgLJvC ZNpw== X-Gm-Message-State: AA6/9Rnj4WNicUyX7WJT8kRu4vQGrdce2xz3rE2Audd0VHtpLtNvQyQoT+LOChINNkoXcw== X-Received: by 10.25.28.70 with SMTP id c67mr403997lfc.93.1476958863287; Thu, 20 Oct 2016 03:21:03 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id u14sm7717641lja.46.2016.10.20.03.21.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 03:21:02 -0700 (PDT) In-Reply-To: <87r37bcuho.fsf@gmail.com> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124728 Archived-At: On 20.10.2016 11:09, Tino Calancha wrote: >> Shouldn't that be fixed in the caller, and lto always be decremented if >> the regions ends at bol? > I think you are right. Otherwise we are including a line out of the > region, i.e., in interactive calls we also search in the history for > a line out of the highlighted region. > How about following new patch? LGTM, please install. Although I was thinking of simplifying it to just: (line-number-at-pos (1- to)) That can only bite us if TO is at bob, which would be very unusual.