Skip to content
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

Improve interaction, colors, etc. #112

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

JohnC32
Copy link

@JohnC32 JohnC32 commented Mar 24, 2023

No description provided.

John Ciolfi added 14 commits February 24, 2023 15:16
…ages, etc.

1. C-g in the FZF buffer results in exit code of 130. This is now handled and C-g gracefully removes
   FZF without error messages showing up.

2. An exit code of 1 from fzf isn't an error, that's when there's no input and now we don't see an
   error for this case.

3. C-x C-c was causing an "active process exist" prompt when the FZF buffer was present. Now if you
   exit while FZF buffer is present you don't get prompted.

5. Make C-x the terminal escape character. This means the key bindings behave similar to M-x ansi-term
   and thus you can use C-x 1 to maximize, etc.

6. The package used to state it required Emacs 24. However, it would not work in Emacs 24 because
   of the use of seq-filter. The package requires Emacs 25 and later, so I updated Package-Requires.
   I tested on Emacs 25, 26, 27 as we use all of these.

7. Fixed a couple compile warnings. Now this compiles warning free on Emacs 25, 26, 27.

8. Reduced debugging messages. "FZF blah" messages where showing up in *Messages* buffer
   even when there was success. I put these under an `fzf-show-debug-messages` variable
   thus reducing noise in *Messages*.

9. Added 'Interacting with the FZF buffer' to the readme.
- Make colors switch when Emacs theme is switched
- Provide independent color settings for Emacs when in a dark frame, light frame, or terminal.
- Tweak color settings and leverage color styles
- Improve fzf/args defcustom help to describe how to setup colors
Consider fzf/args set to "--invalid-switch ...". fzf--after-term-handle-exit
will catch the error, which is exit code 2, and now generates error message
   FZF error: 2, unkown option --invalid-switch
previously it would generate
   FZF error: 2
If an Emacs theme is selected, then (frame-parameter nil 'background-mode) will return 'light or
'dark. We now leveage that.
@eval-exec
Copy link

Great! How about adding colored nerd "icon"?

@DinoChiesa
Copy link

This works for me on Emacs 29.4, Windows 11.
Thanks for sharing this.
It would be nice to keep the interaction all contained within Emacs, but I understand the challenges there.

@JohnC32
Copy link
Author

JohnC32 commented Dec 27, 2024

I assume by all interaction contained within Emacs, you are referring to Windows where I leveraged a separate cmd shell to get the fzf input. On Unix-like systems, all input should be within Emacs because we can use the term package. If there were a similar package for Windows, we could keep all interaction within Emacs. One terminal I haven't tried, is https://codeberg.org/akib/emacs-eat but I suspect this only works on Unix systems.

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

Successfully merging this pull request may close these issues.

3 participants