wasamasa / eyebrowse

A simple-minded way of managing window configs in emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The logical issue in eyebrowse

c0001 opened this issue · comments

I found the logical issue in eyebrowse which's added will improve eyebrowse's user's experience.

This issue was about candidates in "eyebrowse-switch-to-window-config" which has the all window
configs especially include include current window config.

I think this was redundant because the candidates of current for choicing must not been apear in
"eyebrowse-switch-to-window" 's candidates and this will let people have the problem of choice
current window config repeatly.

The detailed of what I mean was below:

If we assumme that have six window configs for eyebrowse and they are [1,2,3,4,5,6] .

And now I am in 2th workspace, and I want to switch to another workspace but forget it's slot
numberic also for long editing time that I forget current window config's slot numberic.

Now I use M-x 'eyebrowse-switch-to-window-config' to show all the candidates and unfortunatelly I
choice 'slot:2' just now current window config's slot! And the next time I remember current window
config was 'slot:2' and because of this I can choice another unless 'slot:2'.

So I think eyebrowse must be get rid of this problem for enhanced user's experience.

The last:

Thanks to eyebrowse because this is more excellent among emacs's window manager packages, So I hope eyebrowse's author to fix (or called upgrading) this issue.

If I understand you correctly, you suggest to not list the current window config in the possible candidates. I'm not sold on the idea at all. What would you do if there's just one slot in use, display nothing? Tmux for instance does not do such a thing and honestly, it isn't needed because the current slot is already displayed in the indicator. If it bugs you, redefine eyebrowse--read-slot to filter the current candidate:

(with-eval-after-load 'eyebrowse
  (defun eyebrowse--read-slot ()
    "Read in a window config SLOT to switch to.
  A formatted list of window configs is presented as candidates.
  If no match was found, the user input is interpreted as a new
  slot to switch to."
    (let* ((current-slot (eyebrowse--get 'current-slot))
           (candidates (--keep (and (/= (car it) current-slot)
                                    (cons (eyebrowse-format-slot it)
                                          (car it)))
                               (eyebrowse--get 'window-configs)))
           (candidate (completing-read "Enter slot: " candidates))
           (choice (cdr (assoc candidate candidates))))
      (or choice (eyebrowse--string-to-number candidate)
          (user-error "Invalid slot number")))))

Thanks a lot for giving me the personal experience improving method.

And you said that you've no longer sold on this idea,was this about eyebrowse?

If what I thought was correctly, I still think eyebrowse was great idea for light manager method of emacs window config , hoping for improving it for a while.

Regard for you.