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

make harpoon-go-to work when in harpoon-file #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emillenz
Copy link

@emillenz emillenz commented Nov 21, 2024

harpoon-go-to should work as expected inside harpoon-file

i think it would be good default behaviour to make harpoon-go-to also work as expected (to jump to the file associated with the number) when inside the harpoon-file buffer of the project.

since most users have bound harpoon-go-to-1 etc. to a fixed keybind, which doesn't not work when inside the harpoon-file.

current erroneous behaviour

currently harpoon errors when trying this, since the file HARPOON-CACHE-FILE/harpoon doesn't exist. this happens because harpoon reads the HARPOON-CACHE-FILE itself as a project and thus tries to open its harpoon-file, which obviously doesn't exist.
(there was also a bug where (eq major-mode 'harpoon-mode) is called inside (with-temp-buffer) and thus is always nil.)

test it

follow these steps, one time with, and one time without the proposed changes:
1. navigate to an existing project
2. call harpoon-toggle-file
3. call eg. harpoon-go-to-1 and observe behaviour

@emillenz emillenz force-pushed the master branch 3 times, most recently from 4b2331c to 55f3d50 Compare November 22, 2024 05:22
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.

1 participant