From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17293 invoked by alias); 16 Jan 2009 23:38:09 -0000 Received: (qmail 17279 invoked by uid 22791); 16 Jan 2009 23:38:08 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jan 2009 23:37:26 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D732810630; Fri, 16 Jan 2009 23:37:23 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id B4653105BD; Fri, 16 Jan 2009 23:37:23 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LNyFf-0005z0-5E; Fri, 16 Jan 2009 18:37:23 -0500 Date: Fri, 16 Jan 2009 23:38:00 -0000 From: Daniel Jacobowitz To: Alfredo Ortega Cc: gdb-patches@sourceware.org Subject: Re: Use external editor in 'commands' command Message-ID: <20090116233723.GA22964@caradoc.them.org> Mail-Followup-To: Alfredo Ortega , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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/msg00391.txt.bz2 On Fri, Jan 16, 2009 at 08:08:06PM -0200, Alfredo Ortega wrote: > About the "/bin/ex" issue, to maintain consistency I did it the same > way that the EDIT command, here: > > gdb/cli/cli-cmds.c:695 > > if ((editor = (char *) getenv ("EDITOR")) == NULL) > editor = "/bin/ex"; If possible, please put this logic in just one place in the source. It looked like your patch changed the behavior of the "commands" command. I don't think that's a good idea; it'll break things all over the place. Can this be a new command instead? I'd suggest "edit commands" except that already has a meaning; it'll try to edit a source file containing a function named "commands". Anyone got a better idea than edit-commands? -- Daniel Jacobowitz CodeSourcery