From: Andrew De Angelis <bobodeangelis@gmail.com>
To: Andrew De Angelis <bobodeangelis@gmail.com>, emacs-devel@gnu.org
Subject: Re: New Package: sticky-shell
Date: Mon, 12 Dec 2022 23:07:13 -0500 [thread overview]
Message-ID: <CAP5CrM2RbdR2doHd3boRYyND60JmpPL660iPAUTEkyvb2zrRxg@mail.gmail.com> (raw)
In-Reply-To: <Y5fxCZAZiMYR1ufZ@protected.localdomain>
[-- Attachment #1: Type: text/plain, Size: 4445 bytes --]
@Jean Louis, about
> I have tested it, it does not work reliably.
>
Thanks for flagging this. What version of Emacs are you running, and do you
have any special shell configuration?
I built Emacs from master last week, did "emacs -q" and sticky-shell works
as expected.
@Stefan Monnier
> Any chance we could simply add it to `shell.el`?
>
I wouldn't mind adding it to `shell.el`. Let me know what the process would
be in that case.
@Philip Kaludercic
> I assume you are referring to GNU ELPA (the only where contributors have
> to sign the FSF CA?)
>
Yes.
And thanks for your suggestions/comments on the code. I will apply the
changes and push them soon, including adding the .elpaignore file.
I do have some questions about some of your comments:
+ ;; Perhaps you should pull this into a separate function, as the
+ ;; check appears quite often. Another idea, as the pattern appease
quite similar in general, you could also
I think part of this comment is missing? But yes I do agree a separate
function is probably a good idea here.
@@ -129,23 +134,25 @@ macro-expands to:
(upcase
(funcall sticky-shell-get-prompt))
\\='face \\='minibuffer-prompt)"
+ ;; The case distinction appears unnecessary (thread-first (foo)) is
+ ;; the same as (foo).
(if sticky-shell-prompt-modifiers
`(thread-first
(funcall sticky-shell-get-prompt)
,@sticky-shell-prompt-modifiers)
+ ;; Perhaps it would be better/cleaner if
+ ;; `sticky-shell-prompt-modifiers' were a list of function that
+ ;; all get applied on the result of (funcall
+ ;; sticky-shell-get-prompt) in order?
(funcall sticky-shell-get-prompt)))
Not sure what you mean by the first comment.
Regarding the second comment: this is essentially what thread-first does,
with the added advantage that `sticky-shell-prompt-modifiers' can consist
not only of functions, but also of forms with multiple arguments, and whose
first argument will be the result of (funcall sticky-shell-get-prompt) at
runtime. For example, if users wanted to `propertize' the header with
particular properties, they wouldn't be able to do it if
`sticky-shell-prompt-modifiers' was simply a list of functions operating on
a single argument, because `propertize' requires multiple arguments. The
solution would have to be to create a new function:
(defun propertize-my-way (string)
(propertize string 'face 'minibuffer))
And add propertize-my-way to the list of prompt modifiers.
Using thread-first saves users time by allowing them to simply add
'(propertize 'face 'minibuffer) to `sticky-shell-prompt-modifiers'.
On Mon, Dec 12, 2022 at 10:27 PM Jean Louis <bugs@gnu.support> wrote:
> * Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-12 06:24]:
> > This is the git repo: https://github.com/andyjda/sticky-shell, with
> > additional info in the README and in the code's documentation.
>
> Just that the "sticky shell" does not reflect what it does.
>
> I have tested it, it does not work reliably.
>
> - it does not show which command generated error, I have for example:
>
> $ youtube-dl -f18 "https://www.youtube.com/watch?v=PVsnbalE6Ig"
> C-c C-cTraceback (most recent call last):
> File
> "/usr/lib/python3.10/site-packages/youtube_dl/extractor/__init__.py", line
> 4, in <module>
> from .lazy_extractors import *
> ModuleNotFoundError: No module named 'youtube_dl.extractor.lazy_extractors'
> ...with more lines here below...
>
> and that one is not shown.
>
> - for this below it shows "dcon" instead of "dconf":
>
> $ dconf
> error: no command specified
>
> Usage:
> dconf COMMAND [ARGS...]
>
> Commands:
> help Show this information
> read Read the value of a key
> list List the contents of a dir
> write Change the value of a key
> reset Reset the value of a key or dir
> compile Compile a binary database from keyfiles
> update Update the system databases
> watch Watch a path for changes
> dump Dump an entire subpath to stdout
> load Populate a subpath from stdin
>
> Use 'dconf help COMMAND' to get detailed help.
>
>
> - for ls -lR it shows "ls -l"
>
> I have got feeling that it works unreliably.
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>
[-- Attachment #2: Type: text/html, Size: 6487 bytes --]
next prev parent reply other threads:[~2022-12-13 4:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 0:05 New Package: sticky-shell Andrew De Angelis
2022-12-12 18:33 ` Philip Kaludercic
2022-12-12 18:45 ` Stefan Monnier
2022-12-12 18:55 ` Akib Azmain Turja
2022-12-13 3:27 ` Jean Louis
2022-12-13 4:07 ` Andrew De Angelis [this message]
2022-12-13 14:22 ` Stefan Monnier
2022-12-13 18:24 ` Jean Louis
2022-12-14 5:23 ` Andrew De Angelis
2022-12-14 13:41 ` Stefan Monnier
2022-12-16 10:20 ` Jean Louis
2022-12-28 15:34 ` Andrew De Angelis
2022-12-30 14:45 ` Jean Louis
2023-02-19 20:56 ` Andrew De Angelis
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP5CrM2RbdR2doHd3boRYyND60JmpPL660iPAUTEkyvb2zrRxg@mail.gmail.com \
--to=bobodeangelis@gmail.com \
--cc=emacs-devel@gnu.org \
/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 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.