From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#52922: 27.2.50; gud-gdb should use "server complete" Date: Fri, 31 Dec 2021 14:41:16 -0700 Message-ID: <87czlc8nb7.fsf@tromey.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39191"; mail-complaints-to="usenet@ciao.gmane.io" To: 52922@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 31 22:42:12 2021 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 1n3Pf9-000A2b-FD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Dec 2021 22:42:11 +0100 Original-Received: from localhost ([::1]:37294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3Pf7-0006aI-W1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Dec 2021 16:42:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3Pf0-0006aA-QB for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 16:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3Pf0-0004kq-Fe for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 16:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3Pf0-0001Vq-BT for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 16:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Dec 2021 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52922 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.16409868985772 (code B ref -1); Fri, 31 Dec 2021 21:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Dec 2021 21:41:38 +0000 Original-Received: from localhost ([127.0.0.1]:57549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3Pec-0001V2-3V for submit@debbugs.gnu.org; Fri, 31 Dec 2021 16:41:38 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3Pea-0001Up-0T for submit@debbugs.gnu.org; Fri, 31 Dec 2021 16:41:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3PeZ-0006Zw-PU for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 16:41:35 -0500 Original-Received: from outbound-ss-761.bluehost.com ([74.220.211.250]:53347 helo=progateway8-pub.mail.pro1.eigbox.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3PeU-0004gt-JG for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2021 16:41:34 -0500 Original-Received: from cmgw14.mail.unifiedlayer.com (unknown [10.0.90.129]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 396A4100612B5 for ; Fri, 31 Dec 2021 21:41:18 +0000 (UTC) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id 3PeHnBKFL2s5d3PeHnoDYm; Fri, 31 Dec 2021 21:41:18 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=GKvNrsBK c=1 sm=1 tr=0 ts=61cf78fe a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IOMw9HtfNCkA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=aR16PxjQAAAA:8 a=-SPHnaPZ3PJeNfnGpLoA:9 a=zbFvvTOBjyH4ze5LlUjX:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender :Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6dADSbGrXccE5Gp+1XFF8ezaaraAU3KPEGaLRSotBYg=; b=nTr15x1JRFKdUQ6182yh4nc2Kg CcXBRWmwZhLbgwl1O3dyf/2F3z+JqmXdn69t/9gnaG4+MEeSiwfYvJOHTltkEKf3dJkEQ+kxSvml+ +GNyIJoKgqIlx2ZkMOo1susSA; Original-Received: from 75-166-134-30.hlrn.qwest.net ([75.166.134.30]:52046 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n3PeH-002h2H-CA; Fri, 31 Dec 2021 14:41:17 -0700 X-Attribution: Tom X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.134.30 X-Source-L: No X-Exim-ID: 1n3PeH-002h2H-CA X-Source-Sender: 75-166-134-30.hlrn.qwest.net (localhost.localdomain) [75.166.134.30]:52046 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Received-SPF: pass client-ip=74.220.211.250; envelope-from=tom@tromey.com; helo=progateway8-pub.mail.pro1.eigbox.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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" Xref: news.gmane.io gmane.emacs.bugs:223486 Archived-At: gud-gdb sends a "complete" command to gdb to implement command line completion. It would be better to send "server complete". This is what Emacs does for other behind-the-scenes commands it sends. First, this would prevent the "complete" command from showing up in gdb's history (not normally visible in Emacs but some people arrange to have it auto-saved by gdb). Second, I'd like to change how "complete" is implemented in gdb, for some internal reasons. With this future code, the "server" command will also help prevent unwanted pagination by gdb's output stream. Here's a patch. Normally I'd install it, but I haven't been very active in Emacs lately. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d5bd265517..113da24749 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -869,7 +869,8 @@ gud-gdb-completions COMMAND is the prefix for which we seek completion. CONTEXT is the text before COMMAND on the line." (let* ((complete-list - (gud-gdb-run-command-fetch-lines (concat "complete " context command) + (gud-gdb-run-command-fetch-lines (concat "server complete " + context command) (current-buffer) ;; From string-match above. (length context)))) In GNU Emacs 27.2.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2021-04-08 built on localhost.localdomain Repository revision: 2f5f30671a122aeed0a78dbee8f541dda5a6d4c2 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12101002 System Description: Fedora 34 (Workstation Edition) Recent messages: Saving file /home/tromey/gdb/binutils-gdb/.git/rebase-merge/git-rebase-todo... Wrote /home/tromey/gdb/binutils-gdb/.git/rebase-merge/git-rebase-todo When done with a buffer, type C-x # Auto-saving...done Save file /home/tromey/gdb/binutils-gdb/.git/COMMIT_EDITMSG? (y, n, !, ., q, C-r, C-f, d or C-h) Save file /home/tromey/gdb/binutils-gdb/.git/COMMIT_EDITMSG? (y, n, !, ., q, C-r, C-f, d or C-h) y Saving file /home/tromey/gdb/binutils-gdb/.git/COMMIT_EDITMSG... Delete excess backup versions of /home/tromey/gdb/binutils-gdb/.git/COMMIT_EDITMSG? (y or n) y Wrote /home/tromey/gdb/binutils-gdb/.git/COMMIT_EDITMSG C-x C-g is undefined Configured using: 'configure --prefix=/home/tromey/Emacs/install' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Git-Log-View Minor modes in effect: shell-dirtrack-mode: t which-function-mode: t erc-services-mode: t erc-networks-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/27.2.50/lisp/play/bubbles Features: (shadow sort mail-hist mail-extr emacsbug sendmail copyright ggtags hippie-exp etags fileloop xref project bug-reference misearch multi-isearch term/xterm xterm texinfo smerge-mode diff cc-mode cc-fonts cc-guess cc-menus cc-cmds log-view pcvs-util add-log vc-mtn vc-hg org-bullets org-element avl-tree generator ol-eww eww mm-url url-queue ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search mail-utils mm-util mail-prsvr ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs find-func cl-extra help-mode vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs flyspell ispell diminish projectile ibuf-macs pcase edmacro kmacro grep compile ibuf-ext ibuffer ibuffer-loaddefs dash appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp which-func imenu minimap autorevert filenotify cus-start cus-load erc-track erc-match erc-services erc-networks erc-hl-nicks easy-mmode color erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec thingatpt pp erc-loaddefs warnings advice vc-dir ewoc vc vc-dispatcher cc-styles cc-align cc-engine cc-vars cc-defs ange-ftp comint ansi-color ring server savehist finder-inf gdb-shell-autoloads lisppaste-autoloads pydoc-info-autoloads info-look info cl weblogger-autoloads package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 450482 34933) (symbols 48 35785 2) (strings 32 131183 6643) (string-bytes 1 4402636) (vectors 16 54088) (vector-slots 8 1008411 142466) (floats 8 416 530) (intervals 56 9666 25) (buffers 1000 36))