* Re: bug#12492: vc-dir vs. vc-root-dir [not found] <505E43E1.9090801@yandex.ru> @ 2015-01-21 20:55 ` Ivan Shmakov [not found] ` <871rzer8t2.fsf@mail.linkov.net> 1 sibling, 0 replies; 4+ messages in thread From: Ivan Shmakov @ 2015-01-21 20:55 UTC (permalink / raw) To: 12492, emacs-devel >>>>> Dmitry Gutov <dgutov@yandex.ru> writes: […] > 2) For almost all backends we can easily deduce the repository root > directory (exceptions: cvs, rcs, sccs), and I believe that in almost > all cases the user wants to see the status of this directory, not of > some subdirectory or any directory unrelated to the current buffer. > Hence the function vc-root-dir, which I think should be bound to 'C-x > v d' and the respective menu item. In the rare case when the user > need to do something unusual, they can do M-x vc-dir. We already have at least two pairs of commands (C-x v l vs. C-x v L /and/ C-x v = vs. C-x v D), of which one operates on the current file /and/ the other on the repository as a whole. Is there any good reason we can’t have a similar arrangement for vc-dir (C-x v d) and the proposed vc-root-dir command (say, C-x v /, – where ‘/’ is a kind of obvious mnemonic for “root”)? I find it way better than f302475471df, as it both keeps the current behavior for C-x v d for those who may still want it /and/ it offers a /prompt-free/ shortcut for those who’d always want to use vc-dir on the root. > When the backend doesn't have the function vc-xx-root, vc-root-dir > interactively delegates to vc-dir, so for CVS, for example, the > behavior will not change. That’s certainly sensible, too. […] -- FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <871rzer8t2.fsf@mail.linkov.net>]
[parent not found: <8d51a8c9-6200-84c9-cadb-09576b060fe1@yandex.ru>]
[parent not found: <87o92h7fv1.fsf@mail.linkov.net>]
[parent not found: <c077c5d4-c343-a902-d184-1aa66f40eb07@yandex.ru>]
[parent not found: <m38stkzoba.fsf@gnus.org>]
[parent not found: <878stissii.fsf@mail.linkov.net>]
[parent not found: <m34l44a9vk.fsf@gnus.org>]
[parent not found: <87muhtzh8z.fsf@mail.linkov.net>]
[parent not found: <875zfvzfvp.fsf@mail.linkov.net>]
[parent not found: <8772f3cb-5af2-f89a-db47-682d9feef125@yandex.ru>]
[parent not found: <87lfoqjr20.fsf@mail.linkov.net>]
[parent not found: <ef584215-0515-ac7a-4f3c-d7cd3d17b0d5@yandex.ru>]
[parent not found: <87y2slup32.fsf@mail.linkov.net>]
[parent not found: <318f40f9-78ae-d739-6ac8-b7bb04598aad@yandex.ru>]
[parent not found: <877e022uul.fsf@mail.linkov.net>]
[parent not found: <3c0c8d61-1df2-b481-655a-d0b610ee6324@yandex.ru>]
[parent not found: <8736ap10x9.fsf@mail.linkov.net>]
[parent not found: <3631ca1d-9a11-8ff6-08bb-6d18268e47d2@yandex.ru>]
[parent not found: <87r1y7odxt.fsf@mail.linkov.net>]
[parent not found: <a51ea0fb-e8a1-9a71-7ce2-3c49ee25289c@yandex.ru>]
[parent not found: <87ftemuzd6.fsf@mail.linkov.net>]
* "Non-standard UI", was: Re: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster) [not found] ` <87ftemuzd6.fsf@mail.linkov.net> @ 2020-03-06 15:24 ` Dmitry Gutov 2020-03-08 0:53 ` "Non-standard UI", Juri Linkov 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Gutov @ 2020-03-06 15:24 UTC (permalink / raw) To: Juri Linkov; +Cc: emacs-devel On 06.03.2020 1:59, 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. So we can't standardize on it, no matter how much you are used to it. >>>> Not to mention the unfortunate side-effect of having to visit 4000 buffers. >>> It visits only matched buffers. >> No. It looks through all project files and calls 'find-file' on each of >> them. Which is obviously inevitable since multi-occur only accepts a >> list of buffers, not files. > No, it doesn't call 'find-file' on each file, noccur-project > calls 'find-file' only on files with matches found by grep. I asked where that command is defined, linked a webpage, you said yes. But apparently you instead meant the newer version that's only on Github. Okay then. Only visiting files that have matches is better. But not good enough when a string I entered ends up in having an arbitrary number of buffers visited, even if that's less than 4000. It is one of "quality of life" things I have spent quite some effort on improving, and to be frank I don't appreciate you handwaving all that away by simply saying "non-standard". None of the "standard" UIs you mentioned provide the functionality we need. Grep is async, but cumbersome and has no provision of doing anything with the matches: Wgrep is not in Emacs, not even in GNU ELPA, and there's no quick "replace matching string with xxx" feature in it anyway. Occur only works with buffers, it's not async either, and the overhead of visiting who knows how many buffers is basically unlimited (Grep is way faster at finding matches than Emacs at visiting files). It's objectively *worse* for the purpose at hand, which will be especially evident in bigger projects. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "Non-standard UI", 2020-03-06 15:24 ` "Non-standard UI", was: Re: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster) Dmitry Gutov @ 2020-03-08 0:53 ` Juri Linkov 2020-03-08 10:38 ` "Non-standard UI" Dmitry Gutov 0 siblings, 1 reply; 4+ messages in thread From: Juri Linkov @ 2020-03-08 0:53 UTC (permalink / raw) To: Dmitry Gutov; +Cc: emacs-devel >> 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. > So we can't standardize on it, no matter how much you are used to it. > It is one of "quality of life" things I have spent quite some effort on > improving, and to be frank I don't appreciate you handwaving all that > away by simply saying "non-standard". 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, a general UI should be customizable enough to provide look and feel of any of the current formats. > None of the "standard" UIs you mentioned provide the functionality we > need. Grep is async, but cumbersome and has no provision of doing > anything with the matches: Wgrep is not in Emacs, not even in GNU ELPA, and > there's no quick "replace matching string with xxx" feature in it > anyway. Occur only works with buffers, it's not async either, and the > overhead of visiting who knows how many buffers is basically unlimited > (Grep is way faster at finding matches than Emacs at visiting files). > It's objectively *worse* for the purpose at hand, which will be especially > evident in bigger projects. 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "Non-standard UI" 2020-03-08 0:53 ` "Non-standard UI", Juri Linkov @ 2020-03-08 10:38 ` Dmitry Gutov 0 siblings, 0 replies; 4+ messages in thread From: Dmitry Gutov @ 2020-03-08 10:38 UTC (permalink / raw) To: Juri Linkov; +Cc: emacs-devel 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-08 10:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <505E43E1.9090801@yandex.ru> 2015-01-21 20:55 ` bug#12492: vc-dir vs. vc-root-dir Ivan Shmakov [not found] ` <871rzer8t2.fsf@mail.linkov.net> [not found] ` <8d51a8c9-6200-84c9-cadb-09576b060fe1@yandex.ru> [not found] ` <87o92h7fv1.fsf@mail.linkov.net> [not found] ` <c077c5d4-c343-a902-d184-1aa66f40eb07@yandex.ru> [not found] ` <m38stkzoba.fsf@gnus.org> [not found] ` <878stissii.fsf@mail.linkov.net> [not found] ` <m34l44a9vk.fsf@gnus.org> [not found] ` <87muhtzh8z.fsf@mail.linkov.net> [not found] ` <875zfvzfvp.fsf@mail.linkov.net> [not found] ` <8772f3cb-5af2-f89a-db47-682d9feef125@yandex.ru> [not found] ` <87lfoqjr20.fsf@mail.linkov.net> [not found] ` <ef584215-0515-ac7a-4f3c-d7cd3d17b0d5@yandex.ru> [not found] ` <87y2slup32.fsf@mail.linkov.net> [not found] ` <318f40f9-78ae-d739-6ac8-b7bb04598aad@yandex.ru> [not found] ` <877e022uul.fsf@mail.linkov.net> [not found] ` <3c0c8d61-1df2-b481-655a-d0b610ee6324@yandex.ru> [not found] ` <8736ap10x9.fsf@mail.linkov.net> [not found] ` <3631ca1d-9a11-8ff6-08bb-6d18268e47d2@yandex.ru> [not found] ` <87r1y7odxt.fsf@mail.linkov.net> [not found] ` <a51ea0fb-e8a1-9a71-7ce2-3c49ee25289c@yandex.ru> [not found] ` <87ftemuzd6.fsf@mail.linkov.net> 2020-03-06 15:24 ` "Non-standard UI", was: Re: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster) Dmitry Gutov 2020-03-08 0:53 ` "Non-standard UI", Juri Linkov 2020-03-08 10:38 ` "Non-standard UI" Dmitry Gutov
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).