[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eshell tutorial
From: |
Eduardo Ochs |
Subject: |
Re: Eshell tutorial |
Date: |
Sun, 18 Sep 2022 00:23:15 -0300 |
On Sat, 17 Sept 2022 at 22:10, Quiliro Ordóñez <quiliro@riseup.net> wrote:
> (...)
Hi Quiliro!
These are very good questions. Let me try to answer them...
> Please also explain why they are exposed to the user for "the user to
> (sort of) understand how they work" if "the definitions are too weird
> and imperfect to become 'real' defaults". I do not intend to bug you or
> criticize you. I just want to understand your point.
On my machine find-angg and find-es are just front-ends for
find-fline/find-anchor - they open local files, and they let me edit
those files and save the modified versions. I have always felt that
"good" replacements for find-angg and find-es would have to:
1) let people download files from angg.twu.net to create local
(modifiable!) copies, and would
2) let people compare their local versions with the versions at
angg.twu.net.
I was never able to write code that did that in a way that I liked.
The functions in
;; From: (find-angg-es-links)
(defun find-angg (fname &rest rest)
(apply 'find-wgeta (format "http://angg.twu.net/%s" fname) rest))
(defun find-es (fname &rest rest)
(apply 'find-wgeta (format "http://angg.twu.net/e/%s.e" fname) rest))
are simple, minimalistic replacements whose shortcomings are very easy
to understand... for example: 1) they create temporary buffers that
are not associated to any local files, 2) they do not process the
"Local Variables:" section at the end of each file correctly, 3) they
ignore file extensions and this thing:
(find-elnode "Auto Major Mode" "Variable: auto-mode-alist")
(find-evardescr 'auto-mode-alist)
(find-evariable 'auto-mode-alist)
and 4) a few of my files are still unibyte instead of utf-8, and on
these files searching for anchors with find-wgeta doesn't work...
Another advantage of using the minimalistic definitions above is that
_some_ people will see that they can define functions that point to
their webpages and git repositories in a similar way. Try the two
definitions of find-emlua below, and the tests:
(defun find-emlua (fname &rest rest)
(let ((fmt "http://angg.twu.net/emlua/%s"))
(apply 'find-wgeta (format fmt fname) rest)))
(defun find-emlua (fname &rest rest)
(let ((fmt "https://raw.githubusercontent.com/edrx/emlua/main/%s"))
(apply 'find-wgeta (format fmt fname) rest)))
;; Tests:
;; (find-emlua "emlua-repl.el")
;; (find-emlua "emlua-repl.el" "emlua-insert")
> I am discovering the beauty of your scripts. I would like to have a
> Debian server to store files for several local network users based on
> their permisions and have automatic versioned backups on another
> machine. Do you have an executable log to create that sort of server?
> Do you have an executable log to install and configure everything needed
> for a mail server, including certificates, spam and virus control, etc.?
> It would be great to use!
I hate sysadminning, so nowadays my machine - a laptop - is a "server"
in very few senses. I only use Debian, and when I install Debian on
another partition the main things that I do are:
1) I install emacs and zsh with apt-get install,
2) I download http://angg.twu.net/edrx.tgz and unpack it in ~edrx,
3) I run some e-scripts that run lots of "apt-get install"s - see:
(find-es "bullseye" "2021aug16")
4) I run e-scripts that clone the emacs repo and compile an
emacs from upstream,
5) I configure /etc/sudoers, /etc/fstab, and /etc/apt/sources.list
by editing them with sexps equivalent to these ones,
(find-fline "/sudo:root@localhost:/etc/sudoers")
(find-fline "/sudo:root@localhost:/etc/fstab")
(find-fline "/sudo:root@localhost:/etc/apt/sources.liat")
and I put in them some blocks of lines that are in my notes in
<http://angg.twu.net/e/>. These blocks usually start with a line
like
# From: (find-es "sudo" "sudo")
that points to my notes about that configuration.
The main thing that I use that needs to be configured via menus is
texlive - from upstream, not from Debian. My usual answers to its
installer are the ones recorded here, after the "sudo ./install-tl":
(find-es "arxiv" "texlive-2019")
Eepitch treats lines that start with two red stars as a comment. I
should have use that to add comments explaining what is each answer...
but I haven't done that.
There's more, but these are the main ideas.
Hope that helps,
[[]], E.