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

magit-find-file: Add an option to adjust default branch #3967

Closed
xuhdev opened this issue Sep 12, 2019 · 2 comments
Closed

magit-find-file: Add an option to adjust default branch #3967

xuhdev opened this issue Sep 12, 2019 · 2 comments
Labels
wont add This feature will not be worked on

Comments

@xuhdev
Copy link

xuhdev commented Sep 12, 2019

Currently, interactively invoking magit-find-file pops up a list of branches (I'm using ivy), and defaults to the current branch. However, I would prefer {worktree}, which is my most commonly used option. It would be nice if magit-find-file provides some option to adjust this default option.

@tarsius
Copy link
Member

tarsius commented Sep 12, 2019

However, I would prefer {worktree}, which is my most commonly used option.

It wasn't my intention for this command to be used like this. I think you should use regular find-file for that. I suspect that you want to use magit-find-file instead of find-file because the former in some contexts automatically suggests the expected file, while the latter does not, so I can understand why you want to use the former.

The plan is to remove magit-find-file and instead teach Emacs how to treat blobs as "regular" files by defining a file handler. This is similar to how Tramp allows accessing remote files mostly as if they were local files. See #2958

Once that has been implemented find-file can be used to find blobs and magit-find-file is no longer necessary. So magit-find-file can be removed, but that results in the lose of some convenience functionality. So I plan to implement some new command to open any file (including but not limited blobs) with some extra functionality related to opening blobs.

This command will likely be named git-handler-find-file and be usable as replacement of find-file. But I am still very unsure of the details.

Considering that (a) I am intending to completely change how this works and (b) you are using the current implementation in an unintended way, I do not want to make the suggested changes.

@xuhdev
Copy link
Author

xuhdev commented Sep 12, 2019

OK, thanks. I think point (a) is sufficient to decline implementing this, I'm not gonna insist. I'll keep an eye on #2958 . Thanks again for your work!

@xuhdev xuhdev closed this as completed Sep 12, 2019
xuhdev added a commit to xuhdev/spacemacs that referenced this issue Oct 5, 2019
counsel-git find a file in the current git repository. "gff" has been
occupied by magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
(Ideally magit-find-file should be bound to gfF, since it would be less
frequently used than counsel-git; but it is likely too late at this
moment.)
@tarsius tarsius added the wont add This feature will not be worked on label Oct 6, 2019
xuhdev added a commit to xuhdev/spacemacs that referenced this issue Oct 16, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
duianto pushed a commit to syl20bnr/spacemacs that referenced this issue Oct 16, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
thanhvg pushed a commit to thanhvg/spacemacs that referenced this issue Nov 4, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
sei40kr pushed a commit to sei40kr/spacemacs that referenced this issue Nov 11, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
fzuellich pushed a commit to fzuellich/spacemacs that referenced this issue Nov 18, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
tgroshon pushed a commit to tgroshon/spacemacs that referenced this issue Nov 22, 2019
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See magit/magit#3967 for
explanation. This is why we need another key binding for counsel-git.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wont add This feature will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants