From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id ED1BE3858D38 for ; Sat, 13 Apr 2024 09:46:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED1BE3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ED1BE3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713001567; cv=none; b=LMGGAd6iG3jfAJ2Fue3U2bJWXvVN6kfHCtdNR92lPzaud2+9jv7hwZ7/tW0s2rcpExtwRqbzmYE+Tvpg405Z0YmXR8tjA63QaAxDnBWWo8TXrXOapC8RQgZdJhR5YIzSgOiB83AXpW09vWmshl6Om2caxidK8c8wSnqdWmv9tog= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713001567; c=relaxed/simple; bh=6Iec5OCH3fhDUzQvJUrr1JjcG+CLtjEdDpTv/qUDaQ4=; h=DKIM-Signature:Date:Message-Id:From:To:Subject:MIME-version; b=JaGOf0sqfq/AVr+FofEsrm9iGPzbwtd+nRrYZwx2akdYsfLdeTHNkTKuKbJoACd81cL/Xie2cAN3gyWI7OAj270IxaVDA88sYX0Fvd45mp9k+2AHb/vV2A4dEqFX+SZmEKvJuaSRhzWTsBLO+DevdAmUgvpQBNMRwUlJWjNxA/c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvZxU-0002KY-FN; Sat, 13 Apr 2024 05:46:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IXHCXPxeMVZwLyal127cqstmU8wvYfJEODlGLyK/wDo=; b=b7VzNXzEtdlqkyJF9Vqk X+btxc6MsMsKWu38ZrXMtRV2DZl8wdPyGZgfXgEcaClqvbdEE4VI+Y2TSJ7l0W4GsVZtZV5f1drN4 Li+lkBqhiJ66GjrVTtdei361ggkcXav/yNJNOxNSJDsepA8DeP65AfcA3h3+v7hBL8LjDczla2GJO ithRumI4TFsPfuOT9Lki0YJtsqpXAA4lf/G7qMn4UvqEw4N1GaIyCA8Ze0T8dugDt0+uRPnp3jSb2 zAFDVHwk8/w65UoliMuDXLix1E5VvDrAYxKLq3kpCxIBNj2jkcnsstbtFNtP7D3+F9HcOJb0YKOQ7 j2slVSMkSRD5rw==; Date: Sat, 13 Apr 2024 12:46:01 +0300 Message-Id: <86le5hppd2.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: lsix@lancelotsix.com, gdb-patches@sourceware.org In-Reply-To: <87cyqt4oin.fsf@redhat.com> (message from Andrew Burgess on Sat, 13 Apr 2024 10:09:52 +0100) Subject: Re: [PATCH 2/6] gdb: move display of completion results into completion_result class References: <86v855dyls.fsf@gnu.org> <20240330233038.sol5j3cp7vsym4uz@octopus> <86v853ar3c.fsf@gnu.org> <87v84m4hps.fsf@redhat.com> <867ch2s9rw.fsf@gnu.org> <87le5i440e.fsf@redhat.com> <86zftxrcpx.fsf@gnu.org> <87cyqt4oin.fsf@redhat.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Andrew Burgess > Cc: lsix@lancelotsix.com, gdb-patches@sourceware.org > Date: Sat, 13 Apr 2024 10:09:52 +0100 > > > Yes. Would you mind submitting a bug report about that, using the > > command "M-x report-emacs-bug"? > > I absolutely will file the bug report once this series (or whatever this > series becomes) is merged. However, I wanted to see if there were > additional bugs hiding in the emacs code, these might indicate changes > that need to be made (or not made) on the GDB side. > > So the good news is, that with a little hacking I managed to get emacs > working! > > Disclaimer: My emacs lisp knowledge is pretty weak, so please consider > this a proof of concept rather than code I'm actually suggesting should > be merged into emacs. When I file the bug I'll include this code again, > but by adding it here we can hopefully see what needs to change. > > The new and updated emacs code is at the end of this email if anyone > wants to play with emacs and this new completion. Drop this new code > into a file, load the emacs 'gdb' mode, then eval the new code. This > adds some new functions, and replaces one existing function. > > With this in place I now get completion for filenames containing > whitespace. Given this directory tree: > > /tmp/eee/ > ├── aa bb > │ ├── f1 > │ └── f2 > └── aa cc > ├── g1 > └── g2 > > (gdb) file /tmp/eee/aa > => file /tmp/eee/aa\ > Possible completions are: <--- These are offered in a new buffer. > /tmp/eee/aa\ bb/ <--- I select this entry. > /tmp/eee/aa\ cc/ > => file /tmp/eee/aa\ bb/ > => file /tmp/eee/aa\ bb/f > Possible completions are: <--- These are offered in a new buffer. > /tmp/eee/aa\ bb/f1 > /tmp/eee/aa\ bb/f2 <--- I select this entry. > => file /tmp/eee/aa\ bb/f2 > ... gdb tries to load the file ... > > And if also works with quoting: > > (gdb) file "/tmp/eee/a > => file "/tmp/eee/aa > Possible completions are: <--- These are offered in a new buffer. > "/tmp/eee/aa bb/ > "/tmp/eee/aa cc/ <--- I select this entry. > => file "/tmp/eee/aa cc/ > => file "/tmp/eee/aa cc/g > Possible completions are: <--- These are offered in a new buffer. > "/tmp/eee/aa cc/g1" <--- I select this entry. > "/tmp/eee/aa cc/g2" > => file "/tmp/eee/aa cc/g1" > ... gdb tries to load the file ... > > As I said, I'm not claiming that emacs is "fixed", but I think I've > shown what needs to be done to get this working, and also I've > satisfied myself that everything can be made to work. Thanks, please include these patches with your bug report, so that our completion experts could review them.