From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Wed, 3 Mar 2021 16:00:55 +0200 Message-ID: <7eb7ee0f-7dba-c90d-cb58-af42c3828643@yandex.ru> References: <87im69uzlt.fsf@mail.linkov.net> <878s74fv27.fsf@mail.linkov.net> <4119ea3055ef8f306fc0@heytings.org> <4119ea30557ef84ca190@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38722"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 46859@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 03 15:02:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHS50-0009zB-Mp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 15:02:22 +0100 Original-Received: from localhost ([::1]:60820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHS4z-0006Uy-L6 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 09:02:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHS4g-0006Ti-IL for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 09:02:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHS4g-0004n9-9P for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 09:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHS4g-0004rL-74 for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 09:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Mar 2021 14:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46859 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46859-submit@debbugs.gnu.org id=B46859.161478006718601 (code B ref 46859); Wed, 03 Mar 2021 14:02:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 3 Mar 2021 14:01:07 +0000 Original-Received: from localhost ([127.0.0.1]:55426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHS3m-0004pw-Rc for submit@debbugs.gnu.org; Wed, 03 Mar 2021 09:01:07 -0500 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:39301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHS3k-0004pK-9l for 46859@debbugs.gnu.org; Wed, 03 Mar 2021 09:01:04 -0500 Original-Received: by mail-wm1-f48.google.com with SMTP id u125so6429096wmg.4 for <46859@debbugs.gnu.org>; Wed, 03 Mar 2021 06:01:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=T4Y+TKmLrCYoNyuSyp5ZFciorkbm2yis+/A57ViYieY=; b=TkUPMr7xLjjNXWUTsSJDWtaJiIsVb8DmiAGCWhcrfCvbvIs/ZSJeaeThelHgXqcK8y bYbnJMQaqDhYmnh4eiVvsXJBfxeyn3ohvgnRBugs+72Zb0g7Q1fIFdlCPByWHZBPUqmd 0he9qs30ze0YUJOj+ckpKr6M9jxiUcxx5ARg0DhyjA42VNm7zNnzHCzHNWW9R8Cryyec opAQrzLW4cQ9lQELD69Yyh3c+WfW5DvLUt2oMrywluL5hj3Sj8ZPZ4oB+/n9jOItpnWa GoJPgQV/9Xt+8sCTud6hD7+b99bGQfjSlA23xUMet1ahBxtsd9oZaP2Mva1g70FtEjox uvhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T4Y+TKmLrCYoNyuSyp5ZFciorkbm2yis+/A57ViYieY=; b=nnuIVxZ+f7PrjoJrxGf9YYvUqS7NuEHAy2PUgXvgoZQ9dJppGR68w87J2tNq3fOMyA Ze9MBwzH4LGbCjsFXZomFiup9FIOjiIVPUh9s47WLpxcNfvQo72UckiA3SUemq4PbEqW OPrXW6rUaFYY0CIywfokhie/qTxU3ZMuURaMrwA1U24X7ukEM55wRnRcbVGmSSID7xkt yjy9uBiuVJa075O81km+E0Bm3kS8nff5oGDj8KKoIa4NTIKU0Mf4tMuRNGzCf/rf0Eze tzAgYm+ZRqFenC7/yl2NiN4Q5fKw+RDxunRDWXeaUiIGOnQEYiab0o6jcauX5IDmB03V rSiw== X-Gm-Message-State: AOAM532qE4gVVe4Af78zTsCCH9fJBeiiD/05PZsmYk66CeIc6363SBLd 9lzpQIm3iNXcV6n5Z8vU+VFpUAyxMh0= X-Google-Smtp-Source: ABdhPJzcKTTZaiPYO2j8x7zRcIj77V3XbcoUSQkyRerxKMmQ0tZTk/FBlj/pxANrRMZugT8HGnC/zA== X-Received: by 2002:a1c:2155:: with SMTP id h82mr9436256wmh.169.1614780058317; Wed, 03 Mar 2021 06:00:58 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id x25sm7724540wmj.14.2021.03.03.06.00.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Mar 2021 06:00:57 -0800 (PST) In-Reply-To: <4119ea30557ef84ca190@heytings.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201275 Archived-At: On 03.03.2021 15:53, Gregory Heytings wrote: > How so?  AFAICS, it's the exact same kind of output, except that it gets > truncated.  And it's (obviously?) better to see the context of the > pattern you are searching for, instead of the first characters of the > lines on which the pattern is found, in which the pattern might not be > present. Since Grep doesn't return the column number of the match, we get it from parsing the string again. And if the string is now modified to be truncated from both sides, the column number will become wrong.