From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: "Non-standard UI" Date: Sun, 8 Mar 2020 12:38:00 +0200 Message-ID: References: <505E43E1.9090801@yandex.ru> <87o92h7fv1.fsf@mail.linkov.net> <878stissii.fsf@mail.linkov.net> <87muhtzh8z.fsf@mail.linkov.net> <875zfvzfvp.fsf@mail.linkov.net> <8772f3cb-5af2-f89a-db47-682d9feef125@yandex.ru> <87lfoqjr20.fsf@mail.linkov.net> <87y2slup32.fsf@mail.linkov.net> <318f40f9-78ae-d739-6ac8-b7bb04598aad@yandex.ru> <877e022uul.fsf@mail.linkov.net> <3c0c8d61-1df2-b481-655a-d0b610ee6324@yandex.ru> <8736ap10x9.fsf@mail.linkov.net> <3631ca1d-9a11-8ff6-08bb-6d18268e47d2@yandex.ru> <87r1y7odxt.fsf@mail.linkov.net> <87ftemuzd6.fsf@mail.linkov.net> <874kuzk694.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="24127"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: emacs-devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 08 11:38:50 2020 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 1jAtKc-0006DG-8M for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Mar 2020 11:38:50 +0100 Original-Received: from localhost ([::1]:56746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAtKb-00039o-B7 for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Mar 2020 06:38:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35445) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAtJt-0002d2-KT for emacs-devel@gnu.org; Sun, 08 Mar 2020 06:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAtJs-0007ww-KR for emacs-devel@gnu.org; Sun, 08 Mar 2020 06:38:05 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:35771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAtJs-0007vg-Da for emacs-devel@gnu.org; Sun, 08 Mar 2020 06:38:04 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id m3so6797957wmi.0 for ; Sun, 08 Mar 2020 03:38:04 -0700 (PDT) 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=HAxMmmU/YLnk07ri4BoSA/7Lc5wxL4RhzeIv0NdHPTQ=; b=FnoGa49hjdaEK9t+13uWK0Fgv9SzrBzOyKzIMS1TVAItecfUhViJOnP6LgTtMyCwIF U1N4F9Cpiwxy1wP4jRKJdAVofEJ/okf0OysZ2Y7pWGMot8cABVr3dp1WNz3E8AZ73s9y 8je0Zb2kT9S4UlAz03xL/aSJG/jtfbEhL80KEIzRvMeSp22nnvmQ2JDybmZqd2Y7KOTo hUsES+itJDFaAtP+zoNhEtGOtwRxeEPvZKRH/VzTk9QbrXOZs9fDpoSP/32nja7pofbz CtOnrV9E0WpX1wUmv4eAAKgpPOI1YlTUpQutbez6d9bP/wyuctJ87Wq/9Ba0u1XLTl+K ftJw== 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=HAxMmmU/YLnk07ri4BoSA/7Lc5wxL4RhzeIv0NdHPTQ=; b=dv3LuZg/1oMpqiLKFEDU/IsWsvC3kGEvpubQEUiK6zGvdPYm8911le3lwPWtC2ii7c +rhNNCL7Cqn8sOSf/wL4of37isY5yKhTOsezI53Rc3VLKdPsE6U1heLrf/m3JZQJbBYd Qe0VBsJZyy4fJfY4kZTgE8UXU1X3HlYsRrmQN+P0dFyFjuQI0zSST4jZU8amuJig3iaP 8M3TwqpK10ZdnAQNoldUF0rw+nvuUNKE2WSJz2GQXhcJ5XqkbRRltuxR6iofz8mX15Bj rEv4ll0LqQCKwjagWPtgw5XGGa/3Awtpd/73kLG/p9U88vv4lVsisGw9clHOQRM/ZPOo +1bA== X-Gm-Message-State: ANhLgQ1wb5nL76NboFLz6CF+tV2Y5Banv1cY7onmv4EbmevUELudABmF G2UXq3vbK8mHolzXLS16VBtSV49j X-Google-Smtp-Source: ADFU+vsQsHhLrQXYNyp3Ewt8JVj8VVsY/nVvL4BR6rN+vj7dLEclD5RUjfU4mHKs+9PhlpTtFrf75A== X-Received: by 2002:a1c:4604:: with SMTP id t4mr14082822wma.164.1583663882679; Sun, 08 Mar 2020 03:38:02 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y15sm741029wrq.89.2020.03.08.03.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Mar 2020 03:38:01 -0700 (PDT) In-Reply-To: <874kuzk694.fsf@mail.linkov.net> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 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:245335 Archived-At: On 08.03.2020 2:53, Juri Linkov wrote: >>> rgrep/vc-git-grep provides good UI. >> >> No, it doesn't. It's the bare-bone-est UI possible, and it wastes a lot of >> horizontal space. It doesn't provide a means to search-and-replace. And >> it's not fit for programmatic construction, so Xref can't use it. > > If you don't like the grep output format, you can replace 'grep-filter' > with your own process filter that would transform it to any other format. Or I can reuse the existing code. The suggestion is not bad, but the grep-filter approach isn't going to work for Xref, at least, because the data format is a list of values. And there's not much point in writing code to re-create Xref's UI in yet another way, if it can't replace the existing builder. Overall, grep itself is fast, and we've done enough optimization on the way its results are processed that it being synchronous shouldn't be a significant problem on modern systems with small-to-medium projects, at least. But, of course, we could do better. > We already had 2 different formats: grep and occur, and now came a new > 3rd format: xref. I think any attempt to standardize on the output format > should be welcome. Of course. But that would take some concerted effort, and not a dismissive attitude. All three have some valuable features (Occur's inline editing feature comes to mind), but they also have each own domain of application thus far. So it would require work to make the features work everywhere (e.g. have Occur's inline editing work without visiting all files in advance). > Of course, a general UI should be customizable enough > to provide look and feel of any of the current formats. So far, Xref provides variables xref-show-xrefs-function and xref-show-definitions-function, and I know for a fact that there are third-party packages out there that take advantage of these variables. > Why not take the best parts from these contenders? > Take async part of finding matches from grep and > transform its output to any format you like. I surely wouldn't refuse an extension of Xref API to asynchronous fetching of results. It's unlikely to work though grep-filter, though.