From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29395 invoked by alias); 21 Aug 2012 17:50:58 -0000 Received: (qmail 29384 invoked by uid 22791); 21 Aug 2012 17:50:56 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Aug 2012 17:50:23 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M9400I009IFC300@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Tue, 21 Aug 2012 20:50:21 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M9400IC69JW1I80@a-mtaout22.012.net.il>; Tue, 21 Aug 2012 20:50:21 +0300 (IDT) Date: Tue, 21 Aug 2012 17:50:00 -0000 From: Eli Zaretskii Subject: Re: [patch+7.5] auto-load: User conveniences suggested by Doug Evans In-reply-to: <20120821144355.GA28426@host2.jankratochvil.net> To: Jan Kratochvil Cc: gdb-patches@sourceware.org, dje@google.com Reply-to: Eli Zaretskii Message-id: <83k3wsb0da.fsf@gnu.org> References: <20120821144355.GA28426@host2.jankratochvil.net> 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: 2012-08/txt/msg00579.txt.bz2 > Date: Tue, 21 Aug 2012 16:43:55 +0200 > From: Jan Kratochvil > Cc: Doug Evans > > according to user feedback after gdb-7.5 with the auto-load feature considered > by users as pain I have implemented various backward compatible extensions > suggested by Doug. Thanks! > + if (!advice_printed) > + { > + const char *homedir = getenv ("HOME"); > + char *homeinit; > + > + if (homedir == NULL) > + homedir = "$HOME"; This should fall back on $USERPROFILE or on $APPDATA on MS-Windows if $HOME is not defined. $USERPROFILE/$APPDATA are Windows equivalents of $HOME, but some Windows users (including yours truly) set $HOME to another directory (e.g., I don't like having my precious files on a system disk, because disasters strike there more frequently). > + printf_filtered (_("\ > +To enable execution of this file add \"add-auto-load-safe-path %s\" \ > +line to \"%s\".\n\ Suggest to move the "add-auto-load-safe-path" part to a new line, because the file name displayed after that will probably overflow the terminal line. > + scripts_directory_help = xstrprintf (_("\ > +Automatically loaded %s%s%sGDB scripts\n\ > +(named OBJFILE%s) are located in one of the directories listed by this\n\ > +option.\n\ > +This option is ignored for the kinds of scripts \ > +having 'set auto-load ... off'.\n\ > +Directories listed here need to be present also \ > +in the 'set auto-load safe-path'\n\ > +option."), Here, the lines are unnecessarily too short, IMO. > -Set the list of directories from which it is safe to auto-load files."), _("\ > -Show the list of directories from which it is safe to auto-load files."), _("\ > +Set the list of paths from which it is safe to auto-load files."), _("\ > +Show the list of paths from which it is safe to auto-load files."), _("\ Why "paths" instead of directories? GNU Coding Standards frown on using "paths" with this semantics. If the problem is that these can be both files and directories, let's say "list of files and directories that are safe for auto-loading". Thanks.