emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On the adoption of transient.el


From: Arthur Miller
Subject: Re: On the adoption of transient.el
Date: Sat, 14 Aug 2021 22:45:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Óscar Fuentes <ofv@wanadoo.es> writes:

> Arthur Miller <arthur.miller@live.com> writes:
>
>> Jonas Bernoulli <jonas@bernoul.li> writes:
>>
>>>> I have to run Magit than bb and than Magit will offer a completing
>>>> read which will pop the asked Helm interface. To me this is not a
>>>> straightforward enough
>>>
>>>   (global-set-key [f1] 'magit-checkout)
>>>
>>> Also you generally don't have to "run Magit" and can just use "C-x M-g"
>>> and in file-visiting buffers also "C-c M-g".
>>
>> Hi Jonas, I have tried your magit-checkout now. It does not really do
>> what I had in mind. It seems to just be a wrapper around git checkout,
>> and similar to git checkout gives error if there are unstaged changes.
>>
>> What I wanted was a fast straightforward branch switcher, no questions
>> asked.
>>
>> The strategy is to stash save all buffers belonging to the project,
>> stash everything, inclusive untracked files, and than checkout to the
>> other branch. When checked back, the stash is applied back. I don't know
>> if you have something like that in magit or if it is something generally
>> desirable, but I always wanted something simple and dirty to be able to
>> switch fast when I need it.
>
> How would Magit know that when you "return back" to a branch it must
> apply a certain stash?

Stash can take a name.

> Work-In-Progress management system, which use branches instead of
> apply a certain stash?

No, Stashes are exactly for that (stash create a branch under the hood I
think, but it is not important).

>                        It seems to me that you are asking for some
> Work-In-Progress management system, which use branches instead of
> stashes. IIRC there are some Magit extensions for this and even creating

I don't ask for anything. I was in a discussion and wanted a fast
switcher, was told to use Magit and didn't found it fitting my
needs. Jonas said I should try magit-checkout, and I just explained why
it does not fit my particular need. Just as act of politness to Jonas
kind advice on magit, nothing more.

> your own doesn't seem difficult, but IMHO your use case, in the way you
> describe it, has dubious applications in general.

It is not a "general" solution. I want it to quickly switch branches and
be able to quickly come back. If you work on something bigger, and than
need to checkout another branch for a small fix or lookup and switching
back, I want to save myself of manual work. That is the use
case. Dubious or not :).

> For starters, the part about automatically stashing untracked files, I
> have seem cases where it would stash gigabytes of build products.

Well, if you have case where you have gigabytes of files in git repo,
than you don't want to use this one?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]