all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* "Final" version of tty child frames
@ 2024-10-22  4:46 Gerd Möllmann
  2024-10-22  5:29 ` Eli Zaretskii
                   ` (4 more replies)
  0 siblings, 5 replies; 80+ messages in thread
From: Gerd Möllmann @ 2024-10-22  4:46 UTC (permalink / raw)
  To: Emacs Devel

I have (re-)created the scratch/tty-child-frames branch today, which
contains the code for child frames on ttys, based on a recent master.

I'm a happy user of this for a while now with corfu, vertico +
vertico-posframe + consult, transient + transient-posframe,
which-key + which-key-posframe. And my current todo list is now empty,
so here it is.

To use it, redefine these two functions:

#+begin_src emacs-lisp
(defun posframe-workable-p ()
  "Test posframe workable status."
  (and (>= emacs-major-version 26)
       (not (or noninteractive
                emacs-basic-display
                (or (featurep 'tty-child-frames)
                    (not (display-graphic-p)))
                (eq (frame-parameter (selected-frame) 'minibuffer) 'only)))))))

(cl-defgeneric corfu--popup-support-p ()
  "Return non-nil if child frames are supported."
  (or (display-graphic-p)
      (featurep 'tty-child-frames)))
#+end_src

To make things look nicer you might also want to

#+begin_src emacs-lisp
(push '(tty-non-selected-cursor . t) vertico-posframe-parameters)
(push '(undecorated . nil) vertico-posframe-parameters))
(push '(undecorated . nil) transient-posframe-parameters))
#+end_src

The 'undecorated' frame parameter lets Emacs draw a border around the
child frame (default is no border). The tty-non-selected-cursor
parameter makes redisplay put the terminal cursor in a non-selected
frame which I find nice for things like consult-buffer. Which is why I
added it :-).

What's there fits my personal needs entirely. I am not interested in
full support of child frames as they exist on window systems because I
don't see child frames being used except for things like posframe and
corfu and similar. And, TBH, I don't find the tty frame code fun to
work with.

Other things not contained:

- Support for anything but termcap frames. I bet I broke MSDOS.
- Mouse support except with xterm-mouse-mode (no GPM).
- Drawing borders like it is normally done (internal border and so
  on). Tried that once, git reset --hard, won't happen.
- Tooltips. I think tooltips could relatively easily be implemented
  with child frames by copying or extracting the non-native tooltip
  code from x-show-tip or some such. From my POV, that would be best
  done by refactoring the tooltip code across window systems which I
  can't do.
- Documentation. Would only make sense to write if this goes into GNU,
  which might or might not happen, depending on, from my side, how
  much work that is.

Disclaimer: As I mentioned already in other contexts, I don't want to
be the maintainer of anything, for personal reasons.

Have fun!



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

end of thread, other threads:[~2024-12-19 10:40 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22  4:46 "Final" version of tty child frames Gerd Möllmann
2024-10-22  5:29 ` Eli Zaretskii
2024-10-22  9:58   ` martin rudalics
2024-10-22 10:20     ` Eli Zaretskii
2024-10-22 14:01       ` martin rudalics
2024-10-22 14:23         ` Eli Zaretskii
2024-10-22 10:40     ` Gerd Möllmann
2024-10-22 11:43       ` Po Lu
2024-10-22 13:44       ` Eli Zaretskii
2024-10-22 14:01         ` Gerd Möllmann
2024-10-22 14:02       ` martin rudalics
2024-10-28  4:35   ` Jared Finder
2024-10-28  5:57     ` Gerd Möllmann
2024-11-30 11:25     ` Eli Zaretskii
2024-12-05  3:49       ` Jared Finder
2024-12-11  7:31         ` Jared Finder
2024-12-11  7:59           ` Gerd Möllmann
2024-12-12  5:11             ` Jared Finder
2024-12-12  6:20               ` Gerd Möllmann
2024-12-12  6:48                 ` Gerd Möllmann
2024-12-12  6:30               ` Eli Zaretskii
2024-12-12  7:04                 ` Gerd Möllmann
2024-12-18  5:35                   ` Jared Finder
2024-12-18  6:25                     ` Gerd Möllmann
2024-12-18 13:54                     ` Eli Zaretskii
2024-12-18 16:01                       ` Gerd Möllmann
2024-12-18 16:29                         ` Eli Zaretskii
2024-12-18 16:39                           ` Gerd Möllmann
2024-12-18 17:02                             ` Eli Zaretskii
2024-12-18 17:22                               ` Gerd Möllmann
2024-12-19  5:17                                 ` Jared Finder
2024-12-19  5:30                                   ` Gerd Möllmann
2024-12-19  7:44                                     ` Gerd Möllmann
2024-12-19  8:36                                     ` Eli Zaretskii
2024-12-19  9:04                                       ` Gerd Möllmann
2024-12-19  9:17                                         ` Gerd Möllmann
2024-12-19 10:34                                           ` Robert Pluim
2024-12-19 10:40                                             ` Gerd Möllmann
2024-12-18 21:06                       ` Stefan Kangas
2024-12-19  8:00                       ` Andrea Corallo
2024-12-11  9:39           ` martin rudalics
2024-10-22  7:34 ` Dr. Arne Babenhauserheide
2024-10-22  7:49   ` Gerd Möllmann
2024-10-22  7:49   ` Eli Zaretskii
2024-10-22  8:01 ` Eli Zaretskii
2024-10-22  8:21   ` Gerd Möllmann
2024-10-22  8:57     ` Eli Zaretskii
2024-10-22  9:42     ` Eli Zaretskii
2024-10-22 10:23       ` Gerd Möllmann
2024-10-22 13:35         ` Eli Zaretskii
2024-10-22 13:43           ` Gerd Möllmann
2024-10-22 13:55             ` Eli Zaretskii
2024-10-22 14:02               ` Gerd Möllmann
2024-10-22 14:40                 ` Eli Zaretskii
2024-10-22 19:19                   ` Paul Eggert
2024-10-23  3:18                     ` Gerd Möllmann
2024-10-22 10:43       ` Gerd Möllmann
2024-10-23  3:05 ` Feng Shu
2024-10-23  3:13   ` Gerd Möllmann
2024-10-23  3:25     ` Feng Shu
2024-10-23  3:36       ` Gerd Möllmann
2024-10-23  3:44         ` Feng Shu
2024-10-23  4:09           ` Gerd Möllmann
2024-10-23  4:40             ` Gerd Möllmann
2024-10-23  5:00               ` Gerd Möllmann
2024-10-23  7:49                 ` Eli Zaretskii
2024-10-23  8:12                   ` Gerd Möllmann
2024-10-23 11:04                   ` Gerd Möllmann
2024-10-23 17:23                     ` Eli Zaretskii
2024-10-23 17:52                       ` Gerd Möllmann
2024-10-23  6:54               ` Feng Shu
2024-10-23  7:25                 ` Gerd Möllmann
2024-10-23  7:28               ` Eli Zaretskii
2024-10-23  7:37                 ` Gerd Möllmann
2024-10-23  7:52                   ` Feng Shu
2024-10-23  8:07                     ` Gerd Möllmann
2024-10-23  9:07                       ` Feng Shu
2024-10-23  9:58                         ` Gerd Möllmann
2024-10-23  7:11   ` Eli Zaretskii
2024-10-26  8:15 ` Gerd Möllmann

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.