all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#51935: 29.0.50; tab-switch hides identically named tabs
@ 2021-11-18  6:10 Carlos Pita
  2021-11-18 17:32 ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Carlos Pita @ 2021-11-18  6:10 UTC (permalink / raw)
  To: 51935

Hi all,

when one creates a new tab with C-x t 2 or C-x t n it gets the same name
than the current tab. One can rename it but sometimes it's just a quick
tab that isn't worth renaming, or perhaps it's just a different view to
the original content and one is happy with it having the same name than
the original tab, last but not least one might simply forget to rename
it. All these scenarios aren't properly supported by tab-switch (C-x t
RET) since it doesn't disambiguate entries before calling
completing-read, for example by appending a numeric suffix to dups, so
just a single representative of the homonyms set appears in the
list. OTOH tab-switcher offers to choose between identically named tabs,
but IMO it's not a very convenient UI (somewhat invasive and doesn't
integrate with ordinary minibuffer completion), it's not assigned to a
standard shortcut and it doesn't seem a good idea to me that functions
named tab-switch and tab-switcher offer different sets of tabs to pick
from.  Disambiguation may happen at the moment of tab creation or at the
moment of tab selection, but I think it must happen one way or another

Best regards,
Carlos

---

In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165))
 of 2021-11-14 built on Carloss-MacBook-Pro.local
Repository revision: 370d4038c5a671d3b9e3a4d28d849948c1a96f53
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6

Configured using:
 'configure --with-native-compilation'

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS WEBP
XIM ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  display-line-numbers-mode: t
  display-fill-column-indicator-mode: t
  electric-pair-mode: t
  outline-minor-mode: t
  windmove-mode: t
  corfu-global-mode: t
  corfu-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  winner-mode: t
  recentf-mode: t
  ns-auto-titlebar-mode: t
  minions-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/carlos/.emacs.d/elpa/transient-20211105.100/transient hides /Applications/Emacs.app/Contents/Resources/lisp/transient
~/Install/Source/org-mode/lisp/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp
~/Install/Source/org-mode/lisp/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp
~/Install/Source/org-mode/lisp/oc hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc
~/Install/Source/org-mode/lisp/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css
~/Install/Source/org-mode/lisp/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob
~/Install/Source/org-mode/lisp/ol-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-irc
~/Install/Source/org-mode/lisp/ob-forth hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-forth
~/Install/Source/org-mode/lisp/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs
~/Install/Source/org-mode/lisp/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob
~/Install/Source/org-mode/lisp/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version
~/Install/Source/org-mode/lisp/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme
~/Install/Source/org-mode/lisp/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox
~/Install/Source/org-mode/lisp/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C
~/Install/Source/org-mode/lisp/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture
~/Install/Source/org-mode/lisp/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref
~/Install/Source/org-mode/lisp/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure
~/Install/Source/org-mode/lisp/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse
~/Install/Source/org-mode/lisp/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags
~/Install/Source/org-mode/lisp/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities
~/Install/Source/org-mode/lisp/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive
~/Install/Source/org-mode/lisp/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen
~/Install/Source/org-mode/lisp/ol-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bibtex
~/Install/Source/org-mode/lisp/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell
~/Install/Source/org-mode/lisp/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table
~/Install/Source/org-mode/lisp/ol-eww hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eww
~/Install/Source/org-mode/lisp/ol-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-man
~/Install/Source/org-mode/lisp/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org
~/Install/Source/org-mode/lisp/org-num hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-num
~/Install/Source/org-mode/lisp/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot
~/Install/Source/org-mode/lisp/ol-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-rmail
~/Install/Source/org-mode/lisp/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk
~/Install/Source/org-mode/lisp/ob-groovy hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-groovy
~/Install/Source/org-mode/lisp/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave
~/Install/Source/org-mode/lisp/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces
~/Install/Source/org-mode/lisp/oc-biblatex hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-biblatex
~/Install/Source/org-mode/lisp/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview
~/Install/Source/org-mode/lisp/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R
~/Install/Source/org-mode/lisp/org-refile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-refile
~/Install/Source/org-mode/lisp/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer
~/Install/Source/org-mode/lisp/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile
~/Install/Source/org-mode/lisp/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran
~/Install/Source/org-mode/lisp/ob-shell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shell
~/Install/Source/org-mode/lisp/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl
~/Install/Source/org-mode/lisp/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite
~/Install/Source/org-mode/lisp/oc-basic hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-basic
~/Install/Source/org-mode/lisp/ob-sed hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sed
~/Install/Source/org-mode/lisp/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list
~/Install/Source/org-mode/lisp/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby
~/Install/Source/org-mode/lisp/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval
~/Install/Source/org-mode/lisp/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit
~/Install/Source/org-mode/lisp/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock
~/Install/Source/org-mode/lisp/org-goto hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-goto
~/Install/Source/org-mode/lisp/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html
~/Install/Source/org-mode/lisp/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src
~/Install/Source/org-mode/lisp/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp
~/Install/Source/org-mode/lisp/ol-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eshell
~/Install/Source/org-mode/lisp/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa
~/Install/Source/org-mode/lisp/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete
~/Install/Source/org-mode/lisp/org-lint hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-lint
~/Install/Source/org-mode/lisp/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex
~/Install/Source/org-mode/lisp/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass
~/Install/Source/org-mode/lisp/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle
~/Install/Source/org-mode/lisp/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc
~/Install/Source/org-mode/lisp/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java
~/Install/Source/org-mode/lisp/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar
~/Install/Source/org-mode/lisp/ol-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-mhe
~/Install/Source/org-mode/lisp/org-attach-git hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach-git
~/Install/Source/org-mode/lisp/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md
~/Install/Source/org-mode/lisp/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer
~/Install/Source/org-mode/lisp/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element
~/Install/Source/org-mode/lisp/oc-natbib hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-natbib
~/Install/Source/org-mode/lisp/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol
~/Install/Source/org-mode/lisp/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot
~/Install/Source/org-mode/lisp/org-tempo hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-tempo
~/Install/Source/org-mode/lisp/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex
~/Install/Source/org-mode/lisp/ol-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-w3m
~/Install/Source/org-mode/lisp/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id
~/Install/Source/org-mode/lisp/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man
~/Install/Source/org-mode/lisp/ol-doi hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-doi
~/Install/Source/org-mode/lisp/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed
~/Install/Source/org-mode/lisp/ob-julia hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-julia
~/Install/Source/org-mode/lisp/ob-lua hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lua
~/Install/Source/org-mode/lisp/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table
~/Install/Source/org-mode/lisp/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml
~/Install/Source/org-mode/lisp/oc-csl hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-csl
~/Install/Source/org-mode/lisp/ol-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-gnus
~/Install/Source/org-mode/lisp/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent
~/Install/Source/org-mode/lisp/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond
~/Install/Source/org-mode/lisp/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab
~/Install/Source/org-mode/lisp/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree
~/Install/Source/org-mode/lisp/ol-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-docview
~/Install/Source/org-mode/lisp/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python
~/Install/Source/org-mode/lisp/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile
~/Install/Source/org-mode/lisp/org-duration hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-duration
~/Install/Source/org-mode/lisp/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda
~/Install/Source/org-mode/lisp/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot
~/Install/Source/org-mode/lisp/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js
~/Install/Source/org-mode/lisp/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish
~/Install/Source/org-mode/lisp/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask
~/Install/Source/org-mode/lisp/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org
~/Install/Source/org-mode/lisp/org-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-keys
~/Install/Source/org-mode/lisp/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core
~/Install/Source/org-mode/lisp/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat
~/Install/Source/org-mode/lisp/ol hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol
~/Install/Source/org-mode/lisp/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt
~/Install/Source/org-mode/lisp/ol-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-info
~/Install/Source/org-mode/lisp/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml
~/Install/Source/org-mode/lisp/ob-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eshell
~/Install/Source/org-mode/lisp/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii
~/Install/Source/org-mode/lisp/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs
~/Install/Source/org-mode/lisp/ox-koma-letter hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-koma-letter
~/Install/Source/org-mode/lisp/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima
~/Install/Source/org-mode/lisp/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org
~/Install/Source/org-mode/lisp/ol-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bbdb
~/Install/Source/org-mode/lisp/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro
~/Install/Source/org-mode/lisp/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql
~/Install/Source/org-mode/lisp/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach
~/Install/Source/org-mode/lisp/ob-processing hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-processing
~/Install/Source/org-mode/lisp/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo
~/Install/Source/org-mode/lisp/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt
~/Install/Source/org-mode/lisp/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote
~/Install/Source/org-mode/lisp/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install
~/Install/Source/org-mode/lisp/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint

Features:
(shadow emacsbug sendmail cl-print debug backtrace sort gnus-cite smiley
mm-archive mail-extr gnus-async gnus-bcklg qp gnus-ml nndraft nnmh utf-7
epa-file gnutls network-stream nsm gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-msg nntp gnus-cache project magit-extras
face-remap magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
magit-diff smerge-mode diff git-commit log-edit pcvs-util add-log
magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process with-editor magit-mode transient edmacro
magit-git magit-section benchmark magit-utils which-func imenu ido crm
dash misearch multi-isearch kmacro facemenu two-column shortdoc help-fns
radix-tree vc-git diff-mode vc-dispatcher python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat comp
comp-cstr warnings ls-lisp term disp-table shell ehelp
modus-vivendi-theme sql view flyspell ispell org-element org-persist
org-id org-refile avl-tree generator ol-eww eww xdg url-queue thingatpt
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view
mml-smime smime dig ol-docview doc-view jka-compr image-mode exif
ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color org-list org-faces
org-entities org-version ob-emacs-lisp ob-core ob-eval org-table
cl-extra oc-basic bibtex ol org-keys oc rx org-compat advice org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus
dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time
iso8601 gnus-spec gnus-int gnus-range message yank-media rmc puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win
gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date mail-utils mm-util mail-prsvr help-mode
display-line-numbers display-fill-column-indicator elec-pair noutline
outline server dired-x dired dired-loaddefs exec-path-from-shell eshell
esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups
esh-util windmove corfu icomplete winner ring recentf tree-widget
wid-edit ns-auto-titlebar minions pcase easy-mmode modus-operandi-theme
modus-themes finder-inf info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 1074409 103986)
 (symbols 48 46059 2)
 (strings 32 178365 3047)
 (string-bytes 1 5987405)
 (vectors 16 63607)
 (vector-slots 8 1352073 103018)
 (floats 8 987 3735)
 (intervals 56 8376 105)
 (buffers 992 33))





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-18  6:10 bug#51935: 29.0.50; tab-switch hides identically named tabs Carlos Pita
@ 2021-11-18 17:32 ` Juri Linkov
  2021-11-19  0:31   ` Carlos Pita
  0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2021-11-18 17:32 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 51935

> when one creates a new tab with C-x t 2 or C-x t n it gets the same name
> than the current tab. One can rename it but sometimes it's just a quick
> tab that isn't worth renaming, or perhaps it's just a different view to
> the original content and one is happy with it having the same name than
> the original tab, last but not least one might simply forget to rename
> it. All these scenarios aren't properly supported by tab-switch (C-x t
> RET) since it doesn't disambiguate entries before calling
> completing-read, for example by appending a numeric suffix to dups, so
> just a single representative of the homonyms set appears in the list.

How adding a numeric suffix in completions of tab-switch (C-x t RET)
could help to disambiguate the tabs?  If there will be such automatically
generated completions as "same-buffer<1>", "same-buffer<2>", "same-buffer<3>",
there is no way for users to distinguish these tabs.

Only manually renaming the tabs to names meaningful to the user
will help to disambiguate them, for example, renaming them to
"same-buffer<first-part>", "same-buffer<unfinished-reading>",
"same-buffer<will-read-later>", etc.

The package uniquify.el tries to solve this problem with some low degree
of success by trying to provide hints for disambiguating buffer names
by adding some parts of their directory names, for example:
"same-buffer<dir-name-1>", "same-buffer<dir-name-2>".  But no such thing
is possible for tab names.

> OTOH tab-switcher offers to choose between identically named tabs,
> but IMO it's not a very convenient UI (somewhat invasive and doesn't
> integrate with ordinary minibuffer completion), it's not assigned to a
> standard shortcut and it doesn't seem a good idea to me that functions

`tab-list' with new mode more like list-buffers is developed
in bug#38680 and bug#38624.

> named tab-switch and tab-switcher offer different sets of tabs to pick
> from.  Disambiguation may happen at the moment of tab creation or at the
> moment of tab selection, but I think it must happen one way or another

As you said this is a temporary situation before the user decides what
to do with the tab: either to visit another buffer that will automatically
rename the tab, or rename the tab manually, etc.  So it's a non-problem.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-18 17:32 ` Juri Linkov
@ 2021-11-19  0:31   ` Carlos Pita
  2021-11-19  8:36     ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Carlos Pita @ 2021-11-19  0:31 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 51935

Hi Juri,

> How adding a numeric suffix in completions of tab-switch (C-x t RET)
> could help to disambiguate the tabs?  If there will be such automatically
> generated completions as "same-buffer<1>", "same-buffer<2>", "same-buffer<3>",
> there is no way for users to distinguish these tabs.

Tabs are positional so the position can be used to disambiguate
choices. I would use it as a suffix but only where it helps
disambiguate options.

That said, I believe even "same-buffer<1>", "same-buffer<2>",
"same-buffer<3>" is preferable to nothing, first because it's the same
in tab-switcher, tabs are all named equal and it's only the position
that distinguishes them, adding a sequential number conveys the same
information than the position in the tab-switcher menu, so if that's
good for one case it's likely good for the other one as well, at least
as long as it doesn't make completion cumbersome, which is the case
when it's a suffix sparingly added; second, because as it is today one
gets the impression that tabs are missing, it can get pretty
confusing, more confusing than arbitrary suffixes I would say. Notice that I
don't use the tabbar (and I believe I'm not alone in that respect) so I rely
on the tab list to get an overall picture every now and then, sometimes to
figure out what tabs need renaming.

Best regards,
Carlos





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-19  0:31   ` Carlos Pita
@ 2021-11-19  8:36     ` Juri Linkov
  2021-11-20  3:17       ` Carlos Pita
  0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2021-11-19  8:36 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 51935

> Tabs are positional so the position can be used to disambiguate
> choices. I would use it as a suffix but only where it helps
> disambiguate options.

Tabs are positional only when the tab-bar is enabled and visible,
especially after customizing tab-bar-tab-hints to non-nil.

But the problem is that 'C-x t RET' is used mostly when the tab-bar
is disabled and not visible, so tabs are not positional in this case.

> That said, I believe even "same-buffer<1>", "same-buffer<2>",
> "same-buffer<3>" is preferable to nothing, first because it's the same
> in tab-switcher, tabs are all named equal and it's only the position
> that distinguishes them, adding a sequential number conveys the same
> information than the position in the tab-switcher menu, so if that's
> good for one case it's likely good for the other one as well, at least
> as long as it doesn't make completion cumbersome, which is the case
> when it's a suffix sparingly added; second, because as it is today one
> gets the impression that tabs are missing, it can get pretty
> confusing, more confusing than arbitrary suffixes I would say. Notice that I
> don't use the tabbar (and I believe I'm not alone in that respect) so I rely
> on the tab list to get an overall picture every now and then, sometimes to
> figure out what tabs need renaming.

If this problem exists for completions candidates of 'C-x t RET',
then we could add the suffix <N> to non-unique completion strings
with tab names here.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-19  8:36     ` Juri Linkov
@ 2021-11-20  3:17       ` Carlos Pita
  2021-11-20 19:42         ` Juri Linkov
  2021-11-22 18:16         ` Juri Linkov
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Pita @ 2021-11-20  3:17 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 51935

Hi Juri,

> But the problem is that 'C-x t RET' is used mostly when the tab-bar
> is disabled and not visible, so tabs are not positional in this case.

But there still is the underlying order used by C-TAB/S-C-TAB, isn't it?

Depending on the configured completion framework C-x t RET will show
candidates in order or not, but the interpretation of the suffix as a
position seems relatively clear to me even in the unordered case, if
not anything else at least it's an indication that there are
additional tabs with the same name.

Best regards,
Carlos





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-20  3:17       ` Carlos Pita
@ 2021-11-20 19:42         ` Juri Linkov
  2021-11-22 18:16         ` Juri Linkov
  1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2021-11-20 19:42 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 51935

>> But the problem is that 'C-x t RET' is used mostly when the tab-bar
>> is disabled and not visible, so tabs are not positional in this case.
>
> But there still is the underlying order used by C-TAB/S-C-TAB, isn't it?

C-TAB/S-C-TAB keys are enabled only when tab-bar-mode is enabled.

> Depending on the configured completion framework C-x t RET will show
> candidates in order or not, but the interpretation of the suffix as a
> position seems relatively clear to me even in the unordered case, if
> not anything else at least it's an indication that there are
> additional tabs with the same name.

This could be implemented like below.  But it still messes the
text properties of the selected completion candidate,
even with using minibuffer-allow-text-properties,
so something is broken in the default completion framework.

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 1a1d0b1ea5..0590b5fe7c 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1198,13 +1198,24 @@ tab-bar-switch-to-tab
 to get the name of the most recently visited tab, the second
 most recent, and so on."
   (interactive
-   (let* ((recent-tabs (mapcar (lambda (tab)
-                                 (alist-get 'name tab))
-                               (tab-bar--tabs-recent))))
+   (let* ((names '()) (i 1)
+          (recent-tabs
+           (mapcar (lambda (tab)
+                     (let ((name (alist-get 'name tab)))
+                       (if (member name names)
+                           (setq name (format "%s<%s>" name i))
+                         (setq name (copy-sequence name))
+                         (push name names))
+                       (setq i (1+ i))
+                       (propertize name 'tab tab)))
+                   (tab-bar--tabs-recent)))
+          (minibuffer-allow-text-properties t))
      (list (completing-read (format-prompt "Switch to tab by name"
                                            (car recent-tabs))
                             recent-tabs nil nil nil nil recent-tabs))))
-  (tab-bar-select-tab (1+ (or (tab-bar--tab-index-by-name name) 0))))
+  (let ((tab (get-text-property 0 'tab name)))
+    (tab-bar-select-tab (1+ (or (and tab (tab-bar--tab-index tab))
+                                (tab-bar--tab-index-by-name name) 0)))))
 
 (defalias 'tab-bar-select-tab-by-name 'tab-bar-switch-to-tab)
 
-- 





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#51935: 29.0.50; tab-switch hides identically named tabs
  2021-11-20  3:17       ` Carlos Pita
  2021-11-20 19:42         ` Juri Linkov
@ 2021-11-22 18:16         ` Juri Linkov
  1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2021-11-22 18:16 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 51935

close 51935 29.0.50
thanks

> Depending on the configured completion framework C-x t RET will show
> candidates in order or not, but the interpretation of the suffix as a
> position seems relatively clear to me even in the unordered case, if
> not anything else at least it's an indication that there are
> additional tabs with the same name.

Actually, not only tab-bar-switch-to-tab has such function signature
that uses the argument NAME, but also other functions such as
tab-bar-close-tab-by-name and tab-bar-rename-tab-by-name.
All they expect a unique name of the tab.  There is no way
to distinguish tabs with the same name.  In practice,
this problem doesn't exist because in this case
the users just rename the tab to a unique name.

To make is more easy to rename the tab, I improved 'C-x t RET' in master
that now it creates a new tab when the provided tab name doesn't exist.
So instead of using 'C-x t 2' to create a new tab, you can use
'C-x t RET new-tab-name RET', exactly in the same way as
'C-x b new-buffer RET' can be used to create a new buffer.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-22 18:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-18  6:10 bug#51935: 29.0.50; tab-switch hides identically named tabs Carlos Pita
2021-11-18 17:32 ` Juri Linkov
2021-11-19  0:31   ` Carlos Pita
2021-11-19  8:36     ` Juri Linkov
2021-11-20  3:17       ` Carlos Pita
2021-11-20 19:42         ` Juri Linkov
2021-11-22 18:16         ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.