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.devel Subject: Re: limit length of xref file header line Date: Mon, 13 Sep 2021 01:47:20 +0300 Message-ID: <7de0a2bd-57b8-5981-1619-601da5a22a9a@yandex.ru> References: <86sgtawcmk.fsf@stephe-leake.org> <86o93rv5pl.fsf@stephe-leake.org> <27ef39b7-36da-5e27-e61f-111fc7574903@yandex.ru> 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="1935"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: Stephen Leake , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 13 00:48:46 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mPYHF-0000IO-Nf for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Sep 2021 00:48:45 +0200 Original-Received: from localhost ([::1]:51284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPYHD-0008WV-T8 for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Sep 2021 18:48:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPYFy-0007o1-AP for emacs-devel@gnu.org; Sun, 12 Sep 2021 18:47:26 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPYFw-00062e-VU for emacs-devel@gnu.org; Sun, 12 Sep 2021 18:47:26 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id b6so11648697wrh.10 for ; Sun, 12 Sep 2021 15:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=CiG7c7AY9rPOVCyFpHzxH3NeK8b/13I6TKmETSUzSWk=; b=ESTZ619QmIRqppUzGLdpnrZVvDgu98VjfHN8kJem6kdPSBykoDZIvapKLdKhifS6gQ E+7/RQ+gVE5jRuZXGdD9JmVUIZoty9jNdP0aGxKaYYcjHXs7csSbDn1vanrf/GVy/FoD Q9uWVb3pUv5nJn3SuWJ2C6I+0BB0R5FpgtH6GBGW0+oruAJFfxdOZiUBEAxCgGJQQLAZ a/6cb97p19i8RrF4y/4DTot9dxionk48t7eH1c1e72jrRXAwg/TXxayFL8afBt9bLA2v jCN3450t7OU3CQg30S5aezobR7GDBHLTkDbA7z0eD/wKn4AVouqti8KSthjCKl7Pgv8s u7og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CiG7c7AY9rPOVCyFpHzxH3NeK8b/13I6TKmETSUzSWk=; b=AQ+GPFsvzS4Yt+yTVLMPuGNP2LlSfx3fN+gH4Mz79jzGdijI1iWUvM97L4Tha20Ed1 zAPcQdrH0kHGoJABSJmiJ5bEsVISEwDY+DjMvs/3/OHPD/uWc3yP0rJ0WtcQzEl3BaTg DJ6qe6VtHqwcghxER1nHzgexSj4WTTO5MU2p+eMz7b9I0xBEzI/M8pfhOIEbC7ldRhfE PNgg0zy/RhFHEhsWC+3Xo8FrdWAWg5RqU70CgIz6+tl5w5amVsBop8/EaaBAwecpdo7g aq2FyVi1EDJCwZ1PNeu6oYYjrDs7ll/J3M2ce17b11Ie2E5tmxPnoaUbx3e9JgksXNTK 7BtQ== X-Gm-Message-State: AOAM530WQ4GLOfzfeUyPA6ivOMETYIDZecVGayjGp3RCLADxSWLV/srP 4MSLhZOTPdfeyIIXNT4kgdZtYt2i0XI= X-Google-Smtp-Source: ABdhPJw+TXOgOPoDUvUG2qgTz0mS92l3QLALiCWcE90HjQx7iUDTABZKoo+2GPcAlGS1BOGpK3/pCw== X-Received: by 2002:a5d:4c41:: with SMTP id n1mr9487619wrt.404.1631486843484; Sun, 12 Sep 2021 15:47:23 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v28sm5595258wrv.93.2021.09.12.15.47.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Sep 2021 15:47:22 -0700 (PDT) In-Reply-To: <27ef39b7-36da-5e27-e61f-111fc7574903@yandex.ru> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=raaahh@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-3.584, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274611 Archived-At: Hi Stephen, On 26.05.2019 00:22, Dmitry Gutov wrote: > On 25.05.2019 1:38, Stephen Leake wrote: > >> So: >> >> (cl-defmethod xref-location-group ((l xref-file-location)) >>    (cl-ecase xref-file-name-display >>      (abs (oref l file)) >>      (nondirectory (file-name-nondirectory (oref l file))))) > > Yep. That should work. Just a heads-up: I just revisited this feature and changed the implementation to be closer to your proposed first version. Only with a check that a group indeed looks like a file name. I considered other options (like requiring all xref-location-group overrides for file-based types to pass the value through some public formatter function), but it didn't seem like worth the other people's trouble. But we can revert to that approach in some future version. So, see commit d314951043. Let me know if you encounter any problems.