From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations Date: Mon, 02 Jul 2018 16:35:20 +0200 Message-ID: <87po05d7tj.fsf@gmail.com> References: <87y3etsqb7.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530542356 12949 195.159.176.226 (2 Jul 2018 14:39:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Jul 2018 14:39:16 +0000 (UTC) Cc: 32034@debbugs.gnu.org, dgutov@yandex.ru To: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 02 16:39:11 2018 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 1fZzyw-0003Ak-VB for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Jul 2018 16:39:11 +0200 Original-Received: from localhost ([::1]:33208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fa00z-0005X7-AG for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Jul 2018 10:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzvz-0001MH-Jr for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2018 10:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzvu-00035C-MG for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2018 10:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35759) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzvu-000356-Hg for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2018 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZzvu-00054k-7x for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2018 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jul 2018 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32034-submit@debbugs.gnu.org id=B32034.153054213219467 (code B ref 32034); Mon, 02 Jul 2018 14:36:02 +0000 Original-Received: (at 32034) by debbugs.gnu.org; 2 Jul 2018 14:35:32 +0000 Original-Received: from localhost ([127.0.0.1]:43653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZzvQ-00053v-0K for submit@debbugs.gnu.org; Mon, 02 Jul 2018 10:35:32 -0400 Original-Received: from mail-wm0-f65.google.com ([74.125.82.65]:54282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZzvL-00053g-Sx for 32034@debbugs.gnu.org; Mon, 02 Jul 2018 10:35:30 -0400 Original-Received: by mail-wm0-f65.google.com with SMTP id i139-v6so9276980wmf.4 for <32034@debbugs.gnu.org>; Mon, 02 Jul 2018 07:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=yo/FcCK3BL+2bX3TIQJhM0XCoftKm+XYwrRqrXsUuv8=; b=k64M8VZXobOMvefJkeLTD/asfPPn3xSHjDkszdJPHkId+e74gwfExey8Exk9k1u0AF 2uQWnNK+p5mBJJVqpdpJUpDc0PNBBx97b9Ul0n+keUpk968LK0+zESpTOPS4C6jahj3y NIH2jpj4MyT3f9I5UYVu8i/pHlslKT3zsD4PwgGv3WhUXKPtQ0syFle+fTIICsYqzGkH lNAzVZmlxwhAHQILyW6nuoZ7itY0M1uDipx24EjUyqCA743W8JehpisgGhv84bFZrVs0 9WlkreZsES4rKka4VsFNKu4v6Tz2DjCEOYY7VnvMbrGPIJKtMMkuiGk8+8vr7hj9Qj+d +Nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=yo/FcCK3BL+2bX3TIQJhM0XCoftKm+XYwrRqrXsUuv8=; b=tWWaDxLphg+5Teg2bv58smyPwFuIAQpt9owPVfxewQk73varKWlqWMPrfpdAZFBSNF zytH+rWQLF982BGWmVi8DT2lDpbIS1d1v+ldZwAQMJwyUfHJ1cNgVMA50kD4RkQmQLTl ZeXX+zbdBsxqblca+Y34Qw1Bjdm1O9XGUlvUn6lbIhUEaqQcSEgvurOBMRLLDXH7Zn0T Lfu3kI7Z0BtqpMKYf+eGRi7dWqlVjSnsMZvpHBljU934jkSirFbgNV9A5aDXNEZGksnN yyxVaFWQ2VEwc2FBSrR/IahZEiPv6+zb9DTOHyVtcf69M1gfXUBx+HD1XAznc24fa3/K nG1w== X-Gm-Message-State: APt69E1jt/EPMsgBixZsi5qrZN6G6lICvcUZC54zKhnnzcl9NJjw7Hn5 fDPtaMCL70lnSNrgNDqpR84= X-Google-Smtp-Source: AAOMgpeKtmL45VVfvSitbwBS2HIl3fKJ9RABos4203EtO5OynqZso43lqvhCtK5LBLtHBLC49CeBFg== X-Received: by 2002:a1c:3b82:: with SMTP id i124-v6mr8814210wma.57.1530542122009; Mon, 02 Jul 2018 07:35:22 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id q14-v6sm14901329wmd.20.2018.07.02.07.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 07:35:21 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <87y3etsqb7.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 02 Jul 2018 14:46:52 +0100") 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:148089 Archived-At: joaotavora@gmail.com (Jo=C3=A3o T=C3=A1vora) writes: > > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index b0bdd62ae9..d38328cccd 100644ppp > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -119,13 +119,19 @@ xref-make-file-location > (with-current-buffer > (or (get-file-buffer file) > (let ((find-file-suppress-same-file-warnings t)) > + (unless (file-exists-p file) > + (error "File %s doesn't exist!" file)) > (find-file-noselect file))) > (save-restriction > (widen) > (save-excursion > (goto-char (point-min)) > (beginning-of-line line) > - (forward-char column) > + (ignore-errors (forward-char column)) > + (unless (and (=3D (1+ (current-line)) line) > + (=3D (current-column) column)) > + (message "Intended xref location was line=3D%d, column=3D%d" > + line column)) > (point-marker)))))) I think the message could be clearer, the current one doesn=CA=BCt express that something unexpected happened. How about "Xref intended location line=3D%d, column=3D%d is out of range" or similar. Regards Robert