Bug 290546 - [NEW PORT] comms/emacs-eat: Emulate A Terminal
Summary: [NEW PORT] comms/emacs-eat: Emulate A Terminal
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-26 17:44 UTC by Pat Maddox
Modified: 2025-11-18 02:12 UTC (History)
1 user (show)

See Also:


Attachments
patch (4.64 KB, patch)
2025-10-26 17:45 UTC, Pat Maddox
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Maddox 2025-10-26 17:44:30 UTC

    
Comment 1 Pat Maddox 2025-10-26 17:45:30 UTC
Created attachment 264915 [details]
patch
Comment 2 Joseph Mingrone freebsd_committer freebsd_triage 2025-11-15 18:21:27 UTC
This looks like a pretty cool project.  Thanks for porting it.

I have one concern.  With USES=emacs:build, the byte-compiled elisp (.elc) will always be generated with editors/emacs, but there will be no run-time dependencies.  This means a user is free to install emacs-eat and run it under editors/emacs-devel.  However, byte-compiled elisp is not stable across Emacs versions, so compiling with one Emacs and loading with another can lead to subtle breakage.  The workaround is to change USES=emacs:build to USES=emacs, which I can do on commit.

## An aside about our elisp ports/packages

I appreciate the motivation to simplify things.  It would be nice to have simple elisp ports like this without a package for each flavor of editors/emacs and each flavor of editors/emacs-devel.  However, if we want users to be able to `pkg install <elisp-package>` and include byte-compiled code, I think this is the only way to go until our package system supports something like provide/requires.  Once that happens, we will only need two packages for each elisp port, one for editors/emacs and one for editors/emacs-devel.

Given native-compiled elisp is becoming more popular, and the .eln cache is usually stored under the user's home directory, we could consider not installing the byte-compiled .elc files, as, for example, you do in devel/rust-mode.  Another possibility, floated by ashish@, is to investigate generating the byte-compiled files on the target host during installation of elisp packages and Emacs itself.
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-11-17 05:04:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b57c1bd6453e1713a6b5809087a57c7b5f4fd5de

commit b57c1bd6453e1713a6b5809087a57c7b5f4fd5de
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2025-11-16 22:17:01 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2025-11-17 04:38:27 +0000

    comms/emacs-eat: Ensure Emacs version matches byte-compiled elisp

    Change USES=emacs:build to USES=emacs.  This creates separate flavors
    with a run-time dependency on the corresponding version of editors/emacs
    or editors/emacs-devel.  As a result, elisp is compiled and run under
    the same Emacs version, avoiding potential subtle breakage caused by
    version mismatches in byte-compiled files.

    While here, fix a typo in pkg-descr.

    PR:             290546
    Sponsored by:   The FreeBSD Foundation

 comms/emacs-eat/Makefile  | 4 +++-
 comms/emacs-eat/pkg-descr | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-11-17 05:05:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c16273eec20ad7512742e36a53752ba0102e7236

commit c16273eec20ad7512742e36a53752ba0102e7236
Author:     Pat Maddox <pat@patmaddox.com>
AuthorDate: 2025-10-24 09:09:39 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2025-11-17 04:38:27 +0000

    comms/emacs-eat: Emulate A Terminal

    Eat's name is self-explanatory, it stands for "Emulate A Terminal". Eat
    is a terminal emulator. It can run most (if not all) full-screen
    terminal programs, including Emacs.

    It is pretty fast, more than three times faster than Term, despite
    being implemented entirely in Emacs Lisp. So fast that you can
    comfortably run Emacs inside Eat, or even use your Emacs as a terminal
    multiplexer.

    It has many features that other Emacs terminal emulator still don't
    have, for example Sixel support, complete mouse support, shell
    integration, etc.

    WWW:    https://codeberg.org/akib/emacs-eat
    PR:     290546

 comms/Makefile                  |  1 +
 comms/emacs-eat/Makefile (new)  | 38 ++++++++++++++++++++++++++++++++++++++
 comms/emacs-eat/distinfo (new)  |  3 +++
 comms/emacs-eat/pkg-descr (new) | 17 +++++++++++++++++
 comms/emacs-eat/pkg-plist (new) | 11 +++++++++++
 5 files changed, 70 insertions(+)
Comment 5 Joseph Mingrone freebsd_committer freebsd_triage 2025-11-17 05:10:16 UTC
Pushed.  If you notice any issues, please open a new bug report.

Thanks again for contributing these elisp ports.
Comment 6 Pat Maddox 2025-11-18 00:08:09 UTC
(In reply to Joseph Mingrone from comment #2)

> Given native-compiled elisp is becoming more popular, and the .eln cache is usually stored under the user's home directory, we could consider not installing the byte-compiled .elc files, as, for example, you do in devel/rust-mode.

Yeah that's the main reason I opted not to compile .elc files as part of the install. My understanding is that all of the versions in emacs ports will natively compile anything on load anyway.
Comment 7 Joseph Mingrone freebsd_committer freebsd_triage 2025-11-18 02:12:54 UTC
(In reply to Pat Maddox from comment #6)

Not all Emacs packages enable native compilation.  The nox flavor/package does not, due to strong objections about introducing a GCC runtime dependency chain. Also, native compilation is not supported on all architectures.