[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9961: Subject: 24.0.91; shell prompt doubled
From: |
Lars Ingebrigtsen |
Subject: |
bug#9961: Subject: 24.0.91; shell prompt doubled |
Date: |
Tue, 25 Aug 2020 15:31:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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