From: Jim Porter <jporterbugs@gmail.com>
To: Christopher Howard <christopher@librehacker.com>
Cc: 70847@debbugs.gnu.org
Subject: bug#70847: 29.3; eshell scripts "from anywhere"
Date: Tue, 28 May 2024 17:31:02 -0700 [thread overview]
Message-ID: <b33eb1b0-2525-c9ab-5de9-ed62424c5f64@gmail.com> (raw)
In-Reply-To: <87a5k9v9fv.fsf@librehacker.com>
On 5/28/2024 3:49 PM, Christopher Howard wrote:
> (1) Regarding eshell-execute-file:
> (a) command executes as expected when called as a normal function
> (b) it would seem highly desireable for this to be an interactive function as well. Though of course you'd have to think through exactly how you wanted to handle ARGS and DESTINATION during an interactive call.
Thanks for trying out the patches.
I've gone back and forth on whether to make this function interactive.
On the one hand, it could be convenient, but on the other hand, calling
'eshell-command' interactively should also work: if you type "source
my-file.esh arg1 arg2..." at the 'eshell-command' prompt, that would do
more-or-less the same thing as calling 'eshell-execute-file'. You could
even add "> destination" to the end to redirect the output somewhere,
e.g. to a buffer.
> (2) I'm having trouble testing the eshell-batch-file functionality. I created a script like so:
>
> ```
> #!/home/christopher/local/bin/emacs --batch -f eshell-batch-file
> echo bleep
> ```
>
> When I try to run this, the correct emacs gets launched (the patched one) but emacs also tries to load my local init.el file - the one written for my 29.3 install - which leads to a backtrace as certain things don't load correctly. My understanding was that --batch is supposed to prevent local init files from being loaded.
>
> I tried adding -Q to the shebang line but that doesn't seem to have an effect.
You'll probably need to use "env -S" in the shebang to split the args.
Shebangs treat everything after the first word as a single argument, so
Emacs sees "--batch -f eshell-batch-file" all together.
Something like this should work (I hope):
#!/usr/bin/env -S /home/christopher/local/bin/emacs --batch -f
eshell-batch-file
next prev parent reply other threads:[~2024-05-29 0:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 17:57 bug#70847: 29.3; eshell scripts "from anywhere" Christopher Howard
2024-05-23 20:30 ` Jim Porter
2024-05-24 14:27 ` Christopher Howard
2024-05-25 2:17 ` Jim Porter
2024-05-28 19:42 ` Christopher Howard
2024-05-28 21:51 ` Jim Porter
2024-05-28 19:46 ` Christopher Howard
2024-05-28 22:49 ` Christopher Howard
2024-05-29 0:31 ` Jim Porter [this message]
2024-05-29 14:16 ` Christopher Howard
2024-05-29 19:22 ` Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b33eb1b0-2525-c9ab-5de9-ed62424c5f64@gmail.com \
--to=jporterbugs@gmail.com \
--cc=70847@debbugs.gnu.org \
--cc=christopher@librehacker.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).