From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rah Guzar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61602: 29.0.60; comint-mode redirection Date: Sat, 18 Feb 2023 12:26:19 +0100 Message-ID: <873573ryft.fsf@zohomail.eu> Reply-To: Rah Guzar Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19791"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.13; emacs 29.0.60 To: 61602@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 18 12:44:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTLdc-00050H-8J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Feb 2023 12:44:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTLdT-0003H6-6U; Sat, 18 Feb 2023 06:44:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTLdL-0003Gt-N4 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 06:44:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTLdK-0001qa-Lx for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 06:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTLdK-0001BP-85 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 06:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rah Guzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61602 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16767206274516 (code B ref -1); Sat, 18 Feb 2023 11:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Feb 2023 11:43:47 +0000 Original-Received: from localhost ([127.0.0.1]:42665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLd4-0001Al-W2 for submit@debbugs.gnu.org; Sat, 18 Feb 2023 06:43:47 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLd3-0001Ad-2m for submit@debbugs.gnu.org; Sat, 18 Feb 2023 06:43:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTLd2-0003C4-Tb for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 06:43:44 -0500 Original-Received: from sender11-pp-o93.zoho.eu ([31.186.226.251]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTLd0-0001jK-PJ for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 06:43:44 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1676720618; cv=none; d=zohomail.eu; s=zohoarc; b=BUXGyxLbX4ovldCYyRTNiIo/PO41m/tY76frk07wwLpOnXqrghy0K4FuurqkCVE6qeVY8TSKfKhY1eDVV3I8RO69Blvikg8lh/0+7G2DK16bf/1OTKOXS3jGdLMT4xdrJmWud1vCPqb7VUEZSXDyuWQcM0pEch53mrmijHubRKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1676720618; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=6Cx4OdBoy7EhYJx8mp7Q84yghlWcJWyTGDWzrctYRaA=; b=j0b1xFI2Sk7KoUUJhjRcy0+agct/PjQhVKLregARu7iZs9QMqKGbJCK4vSkUg0ELh4KwXnWBlQgfVajRW59nQD0itCJpeNFn1E8u2aCKrA/WDmJl+Hd+g9mbdCdb9wrDF21OuxpiQO+tJhmALzbnQu1aN3DtpquSS1FX+/vsv5A= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1676720618; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=6Cx4OdBoy7EhYJx8mp7Q84yghlWcJWyTGDWzrctYRaA=; b=gyFXeycg4X8AxJRsrIhkWaEpSzPqn8IifjCwPbD77JoKUSv2Mj26AfIavggQmg2F yJXjLio3sIQYcXYPUHw7pkRisfJ+ZhD6gZCK4V27RvRCPvCQn4zec7l9C02ZPF+SC6a pBAIzWP2Yrh0Q6YzusYem3+IzkFGweGIriVo0f3s= Original-Received: from localhost (81-231-79-170-no600.tbcn.telia.com [81.231.79.170]) by mx.zoho.eu with SMTPS id 1676720616735105.06684938896251; Sat, 18 Feb 2023 12:43:36 +0100 (CET) X-ZohoMailClient: External Received-SPF: pass client-ip=31.186.226.251; envelope-from=rahguzar@zohomail.eu; helo=sender11-pp-o93.zoho.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255958 Archived-At: Dear Emacs maintainers, I have been working on a major mode derived from comint-mode. The mode uses redirection to show documentation in a separate buffer. Sometimes, a prompt would appear in the output of the command producing the documentation and this would end the redirection prematurely. Searching among variables in comint-mode I found comint-redirect-finished-regexp and its docstring made me believe that I could set it to change the end of redirection. However setting it had a no effect and looking at the sources I found that this is because it is set by comint-redirect-setup and comint-redirect-send-command-to-process calls comint-redirect-setup so that it is always set to comint-prompt-regexp during redirection. This is confusing behavior because docstring of comint-redirect-finished-regexp gives no clue that setting it will have no effect. Similarly the docstring of comint-prompt-regexp states that its value is only used when comint-use-prompt-regexp is non-nil but that is not true for redirection. Overall I think it would be nice to have an optional argument to comint-redirect-send-command-to-process which allows a user to explicitly pass the regexp to use for ending redirection. Another issue I had was that I wanted to run some commands when redirection ended. There didn't seem to be any hooks that accomplished this but from source of comint-redirect-preoutput-filter I found that comint-redirect-hook is run when redirection finishes. However comint-redirect-hook is not defined as a variable and nothing seems to give any hint of its existence. Thanks, Rahguzar In GNU Emacs 29.0.60 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2023-02-17 built on build79 System Description: openSUSE Tumbleweed Configured using: 'configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-pgtk --with-native-compilation=aot --with-cairo --with-libotf --with-jpeg --with-tiff --with-gif --with-png --with-rsvg --with-xft --with-xml2 --with-dbus --with-sound --with-json --with-mailutils --with-gnutls --with-tree-sitter --enable-locallisppath=/usr/share/emacs/29.0.60/site-lisp:/usr/share/emacs/site-lisp 'CFLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto' LDFLAGS=-Wl,-O2' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: mu4e-headers Minor modes in effect: delete-selection-mode: t projectile-mode: t recentf-mode: t save-place-mode: t global-so-long-mode: t which-key-mode: t savehist-mode: t better-jumper-mode: t better-jumper-local-mode: t global-company-mode: t company-mode: t vertico-mode: t all-the-icons-completion-mode: t marginalia-mode: t evil-goggles-mode: t evil-escape-mode: t evil-snipe-override-mode: t evil-snipe-mode: t gcmh-mode: t winner-mode: t smartparens-global-mode: t ws-butler-global-mode: t global-undo-fu-session-mode: t undo-fu-mode: t workroom-mode: t mu4e-search-minor-mode: t global-hl-line-mode: t hl-line-mode: t mu4e-update-minor-mode: t mu4e-context-minor-mode: t dirvish-override-dired-mode: t server-mode: t solaire-global-mode: t solaire-mode: t shell-dirtrack-mode: t evil-mode: t evil-local-mode: t windmove-mode: t +popup-mode: t +modeline-global-mode: t +modeline-mode: t override-global-mode: t general-override-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t window-divider-mode: t buffer-read-only: t size-indication-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: /home/azeem/.emacs.d/.local/straight/build-29.0.60/citar-embark/citar-embark hides /home/azeem/.emacs.d/.local/straight/build-29.0.60/citar/citar-embark Features: (shadow disp-table whitespace delsel display-line-numbers adaptive-wrap spell-fu ispell auto-minor-mode projectile lisp-mnt evil-collection-grep grep ibuf-ext evil-collection-ibuffer ibuffer ibuffer-loaddefs recentf tree-widget saveplace evil-collection-so-long so-long emacsbug sort gnus-cite smiley shr-color mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check qp cursor-sensor vertico-repeat evil-collection-which-key which-key savehist better-jumper company-capf company evil-collection-vertico vertico orderless all-the-icons-completion marginalia evil-goggles pulse color evil-easymotion evil-escape evil-snipe autorevert filenotify gcmh winner smartparens-config smartparens-text smartparens dash ws-butler undo-fu-session undo-fu workroom compat desktop frameset evil-collection-mu4e mu4e mu4e-org evil-collection-org smartparens-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp org-table ol org-keys oc-natbib oc-csl bibtex oc-biblatex oc org-loaddefs find-func mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win evil-collection-gnus gnus nnheader range evil-collection-calendar cal-menu calendar cal-loaddefs mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file svg xml dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source json map url-vars flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config evil-collection-bookmark bookmark ido message sendmail mailcap yank-media puny dirvish transient eieio eieio-core evil-collection-dired dired dired-loaddefs rfc822 mml mml-sec password-cache evil-collection-epa epa epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader server dtrt-indent doom-themes-ext-org solaire-mode face-remap doom-earl-grey-theme doom-themes doom-themes-base midnight evil-collection-flymake flymake-proc flymake project evil-collection-compile evil-collection-custom cus-edit cus-load wid-edit evil-collection-comint evil-collection annalist compile text-property-search html2text ob-core org-cycle org-fold org-fold-core org-compat ob-eval org-version org-macs format-spec ibuf-macs evil evil-integration evil-maps evil-commands reveal flyspell evil-jumps evil-command-window evil-search shell pcomplete comint ansi-osc ansi-color evil-types evil-macros evil-repeat evil-states evil-core comp comp-cstr warnings icons byte-opt advice evil-common windmove calc calc-loaddefs calc-macs thingatpt rect evil-digraphs evil-vars ring all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons let-alist derived edmacro kmacro use-package-bind-key bind-key rx doom-editor doom-projects doom-ui easy-mmode doom-keybinds pp cl-extra help-mode use-package-core bytecomp byte-compile general tex-site doom-start doom-modules cl-seq doom doom-lib cl-macs cl-loaddefs cl-lib pcase gv jansson dynamic-modules subr-x rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 944541 309286) (symbols 48 41240 1) (strings 32 291783 19116) (string-bytes 1 6577740) (vectors 16 85429) (vector-slots 8 2190100 207157) (floats 8 1276 1590) (intervals 56 12251 9085) (buffers 984 21))