From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha 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 19:44:54 +0900 Message-ID: <878ttjmh95.fsf@gmail.com> 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 X-Trace: blaine.gmane.org 1476960613 26607 195.159.176.226 (20 Oct 2016 10:50:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2016 10:50:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Dmitry Gutov To: 24725-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 12:50:09 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 1bxAvE-0005kz-SV for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 12:50:04 +0200 Original-Received: from localhost ([::1]:53753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAvH-0002Rq-4C for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 06:50:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxArO-0008Du-3u for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxArK-0008IR-6g for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:46:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxArK-0008IL-1L for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxArJ-0005g1-OS for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 06:46:01 -0400 Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2016 10:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 24725 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 24725@debbugs.gnu.org, tino.calancha@gmail.com, tino.calancha@gmail.com Original-Received: via spool by 24725-done@debbugs.gnu.org id=D24725.147696031321762 (code D ref 24725); Thu, 20 Oct 2016 10:46:01 +0000 Original-Received: (at 24725-done) by debbugs.gnu.org; 20 Oct 2016 10:45:13 +0000 Original-Received: from localhost ([127.0.0.1]:40377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxAqW-0005ew-Up for submit@debbugs.gnu.org; Thu, 20 Oct 2016 06:45:13 -0400 Original-Received: from mail-pf0-f178.google.com ([209.85.192.178]:36657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxAqU-0005eg-N2 for 24725-done@debbugs.gnu.org; Thu, 20 Oct 2016 06:45:11 -0400 Original-Received: by mail-pf0-f178.google.com with SMTP id e6so34384455pfk.3 for <24725-done@debbugs.gnu.org>; Thu, 20 Oct 2016 03:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:cc:date:in-reply-to:message-id :user-agent:mime-version; bh=Qh3J1Gz4C67Pnb37K0LZpk4t6i8JPxmYlME6mgUitHA=; b=IOJBNjF7AIuuHEycA/2p0QUl8pg6v2e6ZgS97PMxUGhOH7z6HW12a4KjKEynFcxGL4 3dj5fl3daTjbAUNZW+v/Ii6dqNITWCQAMz/SSDEojQCsAPbei8X79wbXmamXYPZNrrcI JBP5ybL+vRf+qpwc0JkGCuPtpbx1M/NRlPK5uyp1Jn1VbOoS9EIopi9wSfaOha/DnH6+ PUfyG1Nd9JSPWgv1IWms9EWM1F4jF15hvx+13V4DrfjRtdqsLdbD7uPlMLjYubY4LE0U CVoY0EhNW+VIS6JwYnE0yXd1AJ2ZYFQvbjV1HQe7BF/kXa3wLKzU5YqhSL4DVUSNhKyU lodg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:references:cc:date:in-reply-to :message-id:user-agent:mime-version; bh=Qh3J1Gz4C67Pnb37K0LZpk4t6i8JPxmYlME6mgUitHA=; b=FQCCFEt+GMttgYbAatmkqOtdCMjfYnr3xNdVxmXH56ObKN4s8hX6wJAH1WJIA+DacD hYtAMHkzFDxxqN2m6Fp/iAFnORD/VftXi8wDLn+l22GIS4MkrndS4tEGKaj3g0EimOtN t/LCdo6CtPsfw/Y2x/Z36ztX688Njh1IFDG0m7Dq4GscbekWqz0qmto5VzsZ3cNZyj7N n6O1cx9aMKGapsW3whm2xzMU641nByj+mCTkYwtyRhc4JEjLVFfltkxQ2/LKSVpfcy9o vLswSYTDGnTF6YYu8PgSJ3i9GwXuafQQ0GGThehyXSTIswUhkbHhgfIY8bB2z8BA1wBk hlIA== X-Gm-Message-State: AA6/9RkTchTHu1yzsQSUZvxwKGTH9sKRFtVsB7jAWEsf9ILKoM6eISXZLPtpog68k6uctg== X-Received: by 10.98.36.219 with SMTP id k88mr48774pfk.88.1476960304916; Thu, 20 Oct 2016 03:45:04 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id a4sm70905831pax.8.2016.10.20.03.45.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2016 03:45:04 -0700 (PDT) In-Reply-To: (Dmitry Gutov's message of "Thu, 20 Oct 2016 13:21:00 +0300") 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:124729 Archived-At: Dmitry Gutov writes: > 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. Good. It sounds more simple. Pushed that simple fix to emacs-25 branch as commit 3877c911