8000 Freaks out in 29.x · Issue #116 · bling/fzf.el · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Freaks out in 29.x #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mcampbell opened this issue Jul 31, 2023 · 10 comments
Open

Freaks out in 29.x #116

mcampbell opened this issue Jul 31, 2023 · 10 comments

Comments

@mcampbell
Copy link

The display of "things" to find (at least for fzf-find-file) is all borked up in any of the 29.x branches, and also in the released 29.1.

Anyone else notice this?

@pierre-rouleau
Copy link
Contributor

What OS are you using?

@mcampbell
Copy link
Author

MacOS, but I think it did the same on WSL2 under Windows (Ubuntu guest VM)

@miguno
Copy link
miguno commented Sep 19, 2023

Same here on macOS 13.5.2, running Emacs 29.1 in wezterm.

Running M-x fzf-find-file, for example, results in:

Screenshot 2023-09-19 at 17 22 08

In text format:

*Async-native-compile-log* ✕    *compilation*<emacs> ✕    *Native-compile-Log* ✕    *scratch* ✕    *doom* ✕    *Messages* ✕    *clangd::stderr* ✕    *clangd* ✕    *fzf* ✕  +

>   < 55/55 (0) \342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342\224\200\342$
> .clang-format                                                                                                                                                                                               \342\2$
  .clang-tidy
$ doom version
GNU Emacs     v29.1            nil
Doom core     v3.0.0-pre       grafted, HEAD -> master, origin/master, origin/HEAD 2be3cf4b 2023-09-17 05:07:52 +0200
Doom modules  v23.09.0-pre     grafted, HEAD -> master, origin/master, origin/HEAD 2be3cf4b 2023-09-17 05:07:52 +0200

@miguno
Copy link
miguno commented Sep 19, 2023

Could this be related to #109 ?

@mcampbell
Copy link
Author

Could this be related to #109 ?

At least in my case I don't think so; I don't use colors.

@imarko
Copy link
imarko commented Dec 25, 2023

I am seeing something similar when using a recent enough fzf version and emacs runs with a non-UTF locale for example LANG=C or unset $LANG.

It is triggered by this change in fzf version 0.35.0 and newer:

- Info panel (match counter) will be followed by a horizontal separator by
  default
    - Use `--no-separator` or `--separator=''` to hide the separator
    - You can specify an arbitrary string that is repeated to form the
      horizontal separator. e.g. `--separator=╸`
    - The color of the separator can be customized via `--color=separator:...`
    - ANSI color codes are also supported

Emacs term mode (which fzf.el uses to run the fzf command) doesn't seems handle the escape sequences used unless we are in a UTF locale. Or maybe it's a coding system issue.

Most users are using UTF locales nowadays so they would not run into this.

@pierre-rouleau
Copy link
Contributor
pierre-rouleau commented Jan 8, 2024

I have just had the opportunity to test it on:

  • macOS 14.2.1
  • in emacs 29.1
  • running inside a macOs Terminal running the macOS zsh, with LANG is en_CA.UTF-8
  • fzf installed with Homebrew is: 0.45.0 (brew)

I don't see the problem. It works fine in that environment (in text mode). I was not able to test the graphics version of Emacs yet.

Are problem 8000 related to running emacs in graphics mode or in terminal mode or both?
When you see the problem inside Emacs, do you also see the problem in your shell?
For this problem, please identify:

  1. the OS type & version,
  2. emacs type and version,
  3. shell type and version, and the value of LANG environment variable
  4. fzf version.

Test fzf directly inside a OS shell, then inside Emacs.

@imarko
Copy link
imarko commented Jan 8, 2024

@pierre-rouleau I can only reproduce it in non-UTF8 locales for example LANG=C. With that it happens with both terminal and X11

@pierre-rouleau
Copy link
Contributor

@imarko I tried using LANG=C by just setting it in the zsh shell and used Emacs 29.1 in terminal mode in macOs Sonoma.
I can see the trailing lines showing escaped octal data with several fzf commands. M-x fzf does the same.

It looks as if the last 'separator line' shown after the 2 counts is not displayed properly. But fzf is displaying it fine when launched directly from the shell.

At this point I don't know enough about the screen output mechanism of Emacs to do more. I wonder if other operations experience the same type of problems with Emacs 29.1. I'd have to search a little in that area. I might have a bit of time later this month.

Has anyone experienced this problem on Emacs 28 or 30? Or with another command or package?

@mcampbell
Copy link
Author
mcampbell commented Jan 10, 2024

As author of the bug report, this all seems to be working FOR ME, now.

Both terminal mode emacs and GUI emacs.

Steps I made to success:

MacOS Sonoma 14.2.1
fzf version: 0.45.0 (brew)

  • Downloaded and uncompressed: emacs-29.1.tar.xz
  • ./configure --with-ns --prefix=/usr/local --disable-ns-self-contained
  • make && sudo make install

Ran both with straight setup and the following fzf config.

(use-package fzf
  :config
  (setq fzf/args "-x --color bw --print-query --margin=1,0 --no-hscroll"
        fzf/executable "fzf"
        fzf/git-grep-args "-i --line-number %s"
        ;; command used for `fzf-grep-*` functions
        ;; example usage for ripgrep:
        ;; fzf/grep-command "rg --no-heading -nH"
        fzf/grep-command "ggrep -nrH"  ;; ggrep is brew's install of gnu grep
        ;; If nil, the fzf buffer will appear at the top of the window
        fzf/position-bottom t
        fzf/window-height 15))

(Edit: Unless other people are having the problem, this can be closed as far as I am concerned.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0