all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rgm@gnu.org, 9961@debbugs.gnu.org
Subject: bug#9961: Subject: 24.0.91; shell prompt doubled
Date: Tue, 25 Aug 2020 15:31:39 +0200	[thread overview]
Message-ID: <87eenu97ic.fsf@gnus.org> (raw)
In-Reply-To: <83zh6i50an.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Aug 2020 16:21:04 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Tue, 25 Aug 2020 15:13:37 +0200
>> Cc: 9961@debbugs.gnu.org
>> 
>> I poked around to see whether there's any easy way to fix this: Like a
>> way to say to comint "send this to the process, but discard the output",
>> but there doesn't seem to be?
>
> Would it work to arrange for a temporary filter function, which would
> discard the shell's output while .emacs_bash is being processed?

The (somewhat strangely coded function) today just does:

      ;; Feed it the startfile.
      (cond (startfile
	     ;;This is guaranteed to wait long enough
	     ;;but has bad results if the comint does not prompt at all
	     ;;	     (while (= size (buffer-size))
	     ;;	       (sleep-for 1))
	     ;;I hope 1 second is enough!
	     (sleep-for 1)
	     (goto-char (point-max))
	     (insert-file-contents startfile)
	     (setq startfile (buffer-substring (point) (point-max)))
	     (delete-region (point) (point-max))
	     (comint-send-string proc startfile)))

So it sends off the entire init file to bash (or whatever), and doesn't
wait for any response, or know how many commands there are in that file.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-08-25 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-05 15:46 bug#9961: Subject: 24.0.91; shell prompt doubled Andreas Röhler
2011-11-07 21:58 ` Glenn Morris
2020-08-25 13:04   ` Lars Ingebrigtsen
2020-08-25 13:13   ` Lars Ingebrigtsen
2020-08-25 13:21     ` Eli Zaretskii
2020-08-25 13:31       ` Lars Ingebrigtsen [this message]
2020-08-25 13:26     ` Colin Baxter

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=87eenu97ic.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=9961@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rgm@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.