From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25342 invoked by alias); 16 Jan 2009 23:56:39 -0000 Received: (qmail 25334 invoked by uid 22791); 16 Jan 2009 23:56:39 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jan 2009 23:56:03 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0GNu04q024964; Fri, 16 Jan 2009 18:56:00 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n0GNu0Qo006704; Fri, 16 Jan 2009 18:56:00 -0500 Received: from opsy.redhat.com (vpn-12-146.rdu.redhat.com [10.11.12.146]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n0GNtxfS011544; Fri, 16 Jan 2009 18:56:00 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 905885082E2; Fri, 16 Jan 2009 16:55:57 -0700 (MST) To: Alfredo Ortega Cc: gdb-patches@sourceware.org Subject: Re: Use external editor in 'commands' command References: From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 16 Jan 2009 23:56:00 -0000 In-Reply-To: (Alfredo Ortega's message of "Fri\, 16 Jan 2009 20\:08\:06 -0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00392.txt.bz2 >>>>> "Alfredo" == Alfredo Ortega writes: Alfredo> It would be difficult to choose a portable editor...maybe Alfredo> with some #defines If you are interested in solving this problem, a user-settable "editor" parameter would seem to be a reasonable thing to add. There's also the option of simply not providing a default -- if EDITOR is not set in the environment, we could make these commands call error. IMO you aren't required to do any better than already existing code in gdb -- it would just be nice to have. I do agree with Daniel that the code in question should be pulled out into a utility function. Tom