all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [RFC] MIME attachments for comint
@ 2021-09-27 19:00 Augusto Stoffel
  2021-09-27 20:37 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Augusto Stoffel @ 2021-09-27 19:00 UTC (permalink / raw)
  To: emacs-devel

In due time, I would like to submit the following as an ELPA package.
For now, I'm writing to see if anyone would like to test or give
feedback.

    https://github.com/astoff/comint-mime

The main purpose of the package, for me at least, is to display graphics
directly in the Python shell.  But it can be extended to other comints
and other kinds of “MIME attachments”.

For instance, in Python it can pretty-print objects that define an HTML
representation.

In the regular shell, it provides a `mimecat' command, similar to the
`imgcat' of other terminals, but mimetic.

Here are some more assorted observations:

- Although the feature seems rather desirable to have even built into
  Emacs, I can't see how a sufficiently canonical implementation would
  be possible.  This package invents a little communication protocol
  between the inferior process and Emacs, which will obviously never be
  implemented by anyone else.

- To add support for a new comint, one just needs to supply some setup
  code to teach the inferior process to print the appropriate escape
  sequences.  Moreover, one needs a little bit of ELisp stuff to send
  the setup code to the inferior process (slightly tricky as usual).

- Concerning packaging, the idea at the moment would be to just have
  this one package adding mimetics to as many comints as possible.  (For
  now, I'm even including all ELisp code in one single file.)  But this
  would mean that the package has many soft (non-mandatory)
  dependencies.  Does that sound like a bad idea?

- The package depends on Emacs 28 (it uses OSC escape sequences).  I
  guess it would have to wait until Emacs 28 is released to be on ELPA?

- It seems shr doesn't support right-aligned text in tables.  Would this
  be hard to add?  This is kind of important to display numeric tables
  sensibly.



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

end of thread, other threads:[~2021-10-20 12:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-27 19:00 [RFC] MIME attachments for comint Augusto Stoffel
2021-09-27 20:37 ` Stefan Monnier
2021-09-28 16:05   ` Augusto Stoffel
2021-09-28 19:26     ` Stefan Monnier
2021-09-30  6:02     ` Richard Stallman
2021-09-30  7:09       ` Augusto Stoffel
2021-10-02 23:17         ` Richard Stallman
2021-10-03  7:48           ` Augusto Stoffel
2021-10-04 22:23             ` Richard Stallman
2021-09-30  8:49       ` Gregory Heytings
2021-10-04 22:25         ` Richard Stallman
2021-09-30  7:34     ` Colin Baxter
2021-09-28  5:36 ` Lars Ingebrigtsen
2021-09-28 16:09   ` Augusto Stoffel
2021-09-28 16:29     ` Robin Tarsiger
2021-09-28 18:22       ` Augusto Stoffel
2021-09-29  5:35     ` Lars Ingebrigtsen
2021-10-17 16:20 ` Stefan Monnier
2021-10-17 16:32   ` Stefan Monnier
2021-10-18  8:22   ` Augusto Stoffel
2021-10-18 16:44     ` comint-mime and loccur update (was: [RFC] MIME attachments for comint) Stefan Monnier
2021-10-20 12:17       ` Alexey Veretennikov

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.