unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New Package: sticky-shell
@ 2022-12-12  0:05 Andrew De Angelis
  2022-12-12 18:33 ` Philip Kaludercic
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Andrew De Angelis @ 2022-12-12  0:05 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 850 bytes --]

Hello everyone and thanks for all your work.
I've made a new package that I would like to add to Elpa.

The package provides a minor mode that creates a header in a shell buffer.
The header shows the prompt above the top-visible line, allowing users to
keep track of what prompt generated which output, even with very large
multiple-line outputs.
The package also has some customization features that can be used to
determine which prompt to show in the header (it can be the latest-executed
prompt, etc), and the look of the header.

This is the git repo: https://github.com/andyjda/sticky-shell, with
additional info in the README and in the code's documentation.

Let me know if you have any questions and if there are any issues with
adding this to the Package Archive. (I do not have push-access to the git
repository)

Thank you!

Best,
Andrew

[-- Attachment #2: Type: text/html, Size: 1099 bytes --]

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

* Re: New Package: sticky-shell
  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-13  3:27 ` Jean Louis
  2 siblings, 0 replies; 14+ messages in thread
From: Philip Kaludercic @ 2022-12-12 18:33 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Andrew De Angelis <bobodeangelis@gmail.com> writes:

> Hello everyone and thanks for all your work.
> I've made a new package that I would like to add to Elpa.

I assume you are referring to GNU ELPA (the only where contributors have
to sign the FSF CA?)

> The package provides a minor mode that creates a header in a shell buffer.
> The header shows the prompt above the top-visible line, allowing users to
> keep track of what prompt generated which output, even with very large
> multiple-line outputs.
> The package also has some customization features that can be used to
> determine which prompt to show in the header (it can be the latest-executed
> prompt, etc), and the look of the header.

Sounds interesting!

> This is the git repo: https://github.com/andyjda/sticky-shell, with
> additional info in the README and in the code's documentation.

Here are a few commends:


[-- Attachment #2: Type: text/plain, Size: 3411 bytes --]

diff --git a/sticky-shell.el b/sticky-shell.el
index 0fdc108..4d8aaa9 100644
--- a/sticky-shell.el
+++ b/sticky-shell.el
@@ -36,6 +36,8 @@
 
 ;;; Code:
 (eval-when-compile
+  ;; Why are these only required during compilation?  You appear to be
+  ;; using actual functions from these modules, not just macros.
   (require 'eshell)
   (require 'comint))
 
@@ -46,7 +48,6 @@
   "Display a sticky header with latest shell-prompt."
   :group 'terminals)
 
-
 (defcustom sticky-shell-get-prompt
   #'sticky-shell-prompt-above-visible
   "Function used by sticky-shell-mode to pick the prompt to show in the header.
@@ -55,21 +56,23 @@ Available values are: `sticky-shell-latest-prompt',
 `sticky-shell-prompt-above-cursor',
 `sticky-shell-prompt-before-cursor'
 or you can write your own function and assign it to this variable."
-  :group 'sticky-shell
-  :type 'function)
+  :type '(choice (function-item :tag "Prompt above visible" sticky-shell-prompt-above-visible)
+		 (function-item :tag "Latest prompt" sticky-shell-latest-prompt)
+		 (function-item :tag "Prompt above cursor" sticky-shell-prompt-above-cursor)
+		 (function-item :tag "Prompt before cursor" sticky-shell-prompt-before-cursor)
+		 other))
 
 (defcustom sticky-shell-prompt-modifiers
-  ()
+  '()
   "List of functions modifying the prompt before it is displayed in the header.
 See `sticky-shell-modified-prompt' for an explanation
 on how the functions are applied."
-  :group 'sticky-shell
   :type 'list)
 
 (defun sticky-shell-prompt-current-line ()
   "Return the current line and remove the trailing newline char."
   (let ((prompt (thing-at-point 'line)))
-    (aset prompt (- (length prompt) 1) 0) ; remove the newline ending char
+    (aset prompt (1- (length prompt)) 0) ; remove the newline ending char
     prompt))
 
 (defun sticky-shell-latest-prompt ()
@@ -78,6 +81,8 @@ on how the functions are applied."
   (save-excursion
     (goto-char (point-max))
     (forward-line -1)
+    ;; 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
     (if (derived-mode-p 'eshell-mode)
         (eshell-previous-prompt 1)
       (comint-previous-prompt 1))
@@ -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)))
 
 ;;;###autoload
 (define-minor-mode sticky-shell-mode
   "Minor mode to show the previous prompt as a sticky header."
-  :group 'comint
   :global nil
-  :lighter nil
-  (if sticky-shell-mode
-      (setq-local header-line-format
-                  (list '(:eval
-                          (sticky-shell-modified-prompt))))
-    (setq-local header-line-format nil)))
+  (setq-local header-line-format
+	      (and sticky-shell-mode
+		   '((:eval (sticky-shell-modified-prompt))))))
 
 (provide 'sticky-shell)
 ;;; sticky-shell.el ends here

[-- Attachment #3: Type: text/plain, Size: 369 bytes --]


> Let me know if you have any questions and if there are any issues with
> adding this to the Package Archive. (I do not have push-access to the git
> repository)

I don't think there should be any issue.  The only thing I would
recommend would be to consider adding an .elpaignore file to avoid
adding the screenshots to the tarball.

> Thank you!
>
> Best,
> Andrew

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

* Re: New Package: sticky-shell
  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
  2 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2022-12-12 18:45 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel

> The package provides a minor mode that creates a header in a shell buffer.

Any chance we could simply add it to `shell.el`?


        Stefan




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

* Re: New Package: sticky-shell
  2022-12-12 18:45 ` Stefan Monnier
@ 2022-12-12 18:55   ` Akib Azmain Turja
  0 siblings, 0 replies; 14+ messages in thread
From: Akib Azmain Turja @ 2022-12-12 18:55 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Andrew De Angelis, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The package provides a minor mode that creates a header in a shell buffer.
>
> Any chance we could simply add it to `shell.el`?

Maybe yes if CLA is done, but it should probably be left disabled by
default.  (I have no problem if it's enabled by disabled, but be
prepared for the mailing list to be flooded!  ;) )

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: New Package: sticky-shell
  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-13  3:27 ` Jean Louis
  2022-12-13  4:07   ` Andrew De Angelis
  2 siblings, 1 reply; 14+ messages in thread
From: Jean Louis @ 2022-12-13  3:27 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel

* 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/



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

* Re: New Package: sticky-shell
  2022-12-13  3:27 ` Jean Louis
@ 2022-12-13  4:07   ` Andrew De Angelis
  2022-12-13 14:22     ` Stefan Monnier
  2022-12-13 18:24     ` Jean Louis
  0 siblings, 2 replies; 14+ messages in thread
From: Andrew De Angelis @ 2022-12-13  4:07 UTC (permalink / raw)
  To: Andrew De Angelis, emacs-devel

[-- 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 --]

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

* Re: New Package: sticky-shell
  2022-12-13  4:07   ` Andrew De Angelis
@ 2022-12-13 14:22     ` Stefan Monnier
  2022-12-13 18:24     ` Jean Louis
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2022-12-13 14:22 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel

>> 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.

Step 1 (same as for GNU ELPA): get the copyright paperwork in order.
       I don't see your name in the FSF's copyright assigners list, so
       either it's still in process or you haven't started yet.
       Let me know if you need help with that.

Step 2: Turn your file into a patch to `shell.el`.
      [ Feel free to also make changes in `shell.el` and/or `eshell.el` to
        make the result cleaner.  ]

> @@ -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'.

I can see the upside, yes, but the downside is that the format of
`sticky-shell-prompt-modifiers` is "new" in the sense that it's
different from existing customization variables used for similar
purposes (which are either `<foo>-function` (modified with
`add-function`) or `<foo>-functions` (modified with `add-hook`)).

Another downside of that code is that `sticky-shell-modified-prompt` is
a macro that's expanded every time we refresh the header line, which can
be very frequent in some cases, thus generating excess garbage.

[ Oh, BTW, I suspect your code needs a (require 'subr-x) to be sure
  `thread-first` is actually available.  ]


        Stefan




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

* Re: New Package: sticky-shell
  2022-12-13  4:07   ` Andrew De Angelis
  2022-12-13 14:22     ` Stefan Monnier
@ 2022-12-13 18:24     ` Jean Louis
  2022-12-14  5:23       ` Andrew De Angelis
  1 sibling, 1 reply; 14+ messages in thread
From: Jean Louis @ 2022-12-13 18:24 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel

* Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-13 14:48]:
> @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.

I use development version, it did not work well, I have explained what.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: New Package: sticky-shell
  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
  0 siblings, 2 replies; 14+ messages in thread
From: Andrew De Angelis @ 2022-12-14  5:23 UTC (permalink / raw)
  To: Andrew De Angelis, emacs-devel, bugs, monnier

[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]

@Stefan Monnier

> Step 1 (same as for GNU ELPA): get the copyright paperwork in order.
>        I don't see your name in the FSF's copyright assigners list, so
>        either it's still in process or you haven't started yet.
>        Let me know if you need help with that.

I have not started this. This would be my first contribution to free
software, so I'm not very familiar with the process. Would greatly
appreciate it if you could give me a rundown of what to do or just point me
to the right documentation.

About `sticky-shell-prompt-modifiers`, I welcome any feedback on this
current approach. My idea was to try to make it simpler for the end user,
since:

(add-to-list 'sticky-shell-prompt-modifiers '(propertize 'face
'minibuffer-prompt))

would be less verbose then:
(advice-add 'sticky-shell-modified-prompt :filter-return (lambda (arg)
(propertize arg 'face 'minibuffer-prompt)))

Even though they accomplish the same thing. But I'm having second thoughts,
as I see how the latter is probably more familiar to Emas users.
And I'm also worried about the issue of the macro getting expanded every
time we refresh the header line: I was thinking a possible solution would
be to create a different macro that defines the function
`sticky-shell-modified-prompt', using the user's custom modifying
functions, only once when the mode is activated.

Honestly, especially if we 're planning on including this as part of
`shell.el`, I think the way to go might just be to remove the
`sticky-shell-prompt-modifiers` mechanism. If users want to propertize the
header or customize it in any way, they can use the `advice-add` function
they should already be somewhat used to.

@Jean Louis
I'm sorry but I am unable to reproduce your issue. Is anyone else
experiencing problems with sticky-shell?

On Tue, Dec 13, 2022 at 2:20 PM Jean Louis <bugs@gnu.support> wrote:

> * Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-13 14:48]:
> > @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.
>
> I use development version, it did not work well, I have explained what.
>
>
> --
> 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: 3691 bytes --]

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

* Re: New Package: sticky-shell
  2022-12-14  5:23       ` Andrew De Angelis
@ 2022-12-14 13:41         ` Stefan Monnier
  2022-12-16 10:20         ` Jean Louis
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2022-12-14 13:41 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel, bugs

>> Step 1 (same as for GNU ELPA): get the copyright paperwork in order.
>>        I don't see your name in the FSF's copyright assigners list, so
>>        either it's still in process or you haven't started yet.
>>        Let me know if you need help with that.
>
> I have not started this. This would be my first contribution to free
> software, so I'm not very familiar with the process. Would greatly
> appreciate it if you could give me a rundown of what to do or just point me
> to the right documentation.

Sure thing.  Just fill the form below and email it to the FSF as
instructed so they can send you the relevant paperwork to sign,

> About `sticky-shell-prompt-modifiers`, I welcome any feedback on this
> current approach.  My idea was to try to make it simpler for the end
> user, since:

I understand.


        Stefan


Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]


[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]


[For the copyright registration, what country are you a citizen of?]


[What year were you born?]


[Please write your email address here.]


[Please write your postal address here.]





[Which files have you changed so far, and which new files have you written
so far?]




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

* Re: New Package: sticky-shell
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Jean Louis @ 2022-12-16 10:20 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel, bugs, monnier

* Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-14 08:24]:
> @Jean Louis
> I'm sorry but I am unable to reproduce your issue. Is anyone else
> experiencing problems with sticky-shell?

https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-18-24-954470180.png
https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-17-56-871503898.png
https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-17-47-904410786.png

See screenshots and observe. Instead of "git pull" I see "git pul"
and instead of "make" I see "mak" and that happens regularly.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: New Package: sticky-shell
  2022-12-16 10:20         ` Jean Louis
@ 2022-12-28 15:34           ` Andrew De Angelis
  2022-12-30 14:45             ` Jean Louis
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew De Angelis @ 2022-12-28 15:34 UTC (permalink / raw)
  To: Andrew De Angelis, emacs-devel, monnier; +Cc: bugs

[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]

@Jean Louis
Thank you. I still can't reproduce the error, but I understand its causes.
Line 72:
`(aset prompt (- (length prompt) 1) 0) ; remove the newline ending char`
was intended to remove the newline char that showed up in my header as
'^J'. There must be something different in your configuration that already
removes it from the header/prompt, so deleting it again caused the issue.
I've replaced this line with the more explicit:
`(string-trim-right prompt "[ \t\n\r]+"))) ; remove the newline ending char`
Please try out the latest code <https://github.com/andyjda/sticky-shell>and
let me know your experience.


@Stefan Monnier
Thanks a lot for the detailed explanation. I have sent the information to
assign@gnu.org, and I will send my patch to bug-gnu-emacs@gnu.org


On Fri, Dec 16, 2022 at 5:21 AM Jean Louis <bugs@gnu.support> wrote:

> * Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-14 08:24]:
> > @Jean Louis
> > I'm sorry but I am unable to reproduce your issue. Is anyone else
> > experiencing problems with sticky-shell?
>
>
> https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-18-24-954470180.png
>
> https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-17-56-871503898.png
>
> https://gnu.support/images/tmp/2022-12-16/Screenshot-2022-12-16-13-17-47-904410786.png
>
> See screenshots and observe. Instead of "git pull" I see "git pul"
> and instead of "make" I see "mak" and that happens regularly.
>
>
> --
> 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: 3262 bytes --]

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

* Re: New Package: sticky-shell
  2022-12-28 15:34           ` Andrew De Angelis
@ 2022-12-30 14:45             ` Jean Louis
  2023-02-19 20:56               ` Andrew De Angelis
  0 siblings, 1 reply; 14+ messages in thread
From: Jean Louis @ 2022-12-30 14:45 UTC (permalink / raw)
  To: Andrew De Angelis; +Cc: emacs-devel, monnier

* Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-28 18:35]:
> @Jean Louis
> Thank you. I still can't reproduce the error, but I understand its causes.
> Line 72:
> `(aset prompt (- (length prompt) 1) 0) ; remove the newline ending char`
> was intended to remove the newline char that showed up in my header as
> '^J'. There must be something different in your configuration that already
> removes it from the header/prompt, so deleting it again caused the issue.
> I've replaced this line with the more explicit:
> `(string-trim-right prompt "[ \t\n\r]+"))) ; remove the newline ending char`
> Please try out the latest code <https://github.com/andyjda/sticky-shell>and
> let me know your experience.

Thank you.  I do not see that problem anymore, though I tested it for
only short time.

Here are matches for `shell''of my custom.el if you wish to test if
that fiddles with your package. 

7 matches for "shell" in buffer: custom.el
     78: '(async-shell-command-buffer 'new-buffer)
    524: '(shell-command-prompt-show-cwd t)
    525: '(shell-completion-execonly nil)


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: New Package: sticky-shell
  2022-12-30 14:45             ` Jean Louis
@ 2023-02-19 20:56               ` Andrew De Angelis
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew De Angelis @ 2023-02-19 20:56 UTC (permalink / raw)
  To: Andrew De Angelis, emacs-devel, monnier

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Just wanted to let anyone interested in this package know: I've added it to
MELPA. It can be installed as "sticky-shell".
I've also improved its support of terminal modes and shell modes. You can
find more info at the repo <https://github.com/andyjda/sticky-shell>

On Fri, Dec 30, 2022 at 9:58 AM Jean Louis <bugs@gnu.support> wrote:

> * Andrew De Angelis <bobodeangelis@gmail.com> [2022-12-28 18:35]:
> > @Jean Louis
> > Thank you. I still can't reproduce the error, but I understand its
> causes.
> > Line 72:
> > `(aset prompt (- (length prompt) 1) 0) ; remove the newline ending char`
> > was intended to remove the newline char that showed up in my header as
> > '^J'. There must be something different in your configuration that
> already
> > removes it from the header/prompt, so deleting it again caused the issue.
> > I've replaced this line with the more explicit:
> > `(string-trim-right prompt "[ \t\n\r]+"))) ; remove the newline ending
> char`
> > Please try out the latest code <https://github.com/andyjda/sticky-shell
> >and
> > let me know your experience.
>
> Thank you.  I do not see that problem anymore, though I tested it for
> only short time.
>
> Here are matches for `shell''of my custom.el if you wish to test if
> that fiddles with your package.
>
> 7 matches for "shell" in buffer: custom.el
>      78: '(async-shell-command-buffer 'new-buffer)
>     524: '(shell-command-prompt-show-cwd t)
>     525: '(shell-completion-execonly nil)
>
>
> --
> 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: 2443 bytes --]

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

end of thread, other threads:[~2023-02-19 20:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).