fold grep buffer reddit / emacs ---------------------------------------------------------------------- zsome · 2022-08-12 04:56 Hi, do you know any option where I can hide all results and see just the files where we have the found lines? Like a collapse all function in the grep buffer. ---------------------------------------------------------------------- unixbhaskar · 2022-08-12 07:06 Wild guess and assumption ....you might occur buffer to do that...provided you can. I am not aware of ever using that kind of stuff...but as per your lines states occur buffer shows result in a different format .So, there might be a possibility to teach it to display files then words. Again, I am not expert ,strong hunch. Also ,I don't know whether any predefined facility readily avaialble. ---------------------------------------------------------------------- pathemata · 2022-08-12 07:52 you can use `consult-focus-lines` with the file extension as a filter. ---------------------------------------------------------------------- by_wicker · 2022-08-12 12:59 It's not especially slick, but `grep -l *.` for instance will give you the list. Then `find-file-at-point` (`M-x ffap`) would open them. ---------------------------------------------------------------------- link0ff · 2022-08-12 17:57 You can type `TAB` on file names to show/hide file matches or `S-TAB` for all outlines while using xref and such customization: (add-hook 'xref-after-update-hook (lambda () (setq-local outline-regexp (if (eq xref-file-name- display 'abs) "/" "[^ 0-9]") outline-minor-mode-highlight nil outline-default-state 1) (outline-minor-mode +1))) ---------------------------------------------------------------------- zsome · 2022-08-15 12:16 Thank you, it seems it is a good direction but I need to find out which buffer what consult use ...