From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N3RGA-00019f-UG for mharc-grub-devel@gnu.org; Thu, 29 Oct 2009 05:25:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3RG8-00018H-ID for grub-devel@gnu.org; Thu, 29 Oct 2009 05:25:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3RG3-00015M-TF for grub-devel@gnu.org; Thu, 29 Oct 2009 05:25:31 -0400 Received: from [199.232.76.173] (port=33145 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3RG2-00015G-KI for grub-devel@gnu.org; Thu, 29 Oct 2009 05:25:26 -0400 Received: from mail-px0-f189.google.com ([209.85.216.189]:53939) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3RG2-00015U-0C for grub-devel@gnu.org; Thu, 29 Oct 2009 05:25:26 -0400 Received: by pxi27 with SMTP id 27so1113816pxi.25 for ; Thu, 29 Oct 2009 02:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=qcPlg2oshxGM9TanwF0KYTCjzvcSRWkvr8KO/4/90Ms=; b=ssQtpzZxEsp7Dqt3q/l0Nu9O1/kZseBnjBlF0iYRdf/RNcygjcTRSUmPhxDd/LtZvt 2sZHbLedDHaVHzn12haH20mnHWFzXRFv53xe9vgCernSaaRkfXTDRAJi1GaA0DWcrVAH NMqzAbmic4RqMRKtx6+RaoQ58qpvqqq1bqNcU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=iwfzAy3ziTxCTXioMrpSB6nL3lEt6nonq/JeWVxeqii5X8j0kMYhxrPwVMJ+xpRndy LA4a/1OzZMTPl/c5/yAPQzaBLYKjAE/CB/1GiXptraRBmbhXSRqkvInhQMN/yjznM0ZZ FZ53ikRgbt5DzH7bavRK/j00brO5CVl0faBUI= MIME-Version: 1.0 Received: by 10.140.162.8 with SMTP id k8mr2295674rve.82.1256808325298; Thu, 29 Oct 2009 02:25:25 -0700 (PDT) In-Reply-To: <4AE95BEC.4040102@gmail.com> References: <48f46e890910240104o47421525o2cb7013a12696dc3@mail.gmail.com> <48f46e890910250727g6bb5b762oeb8ca94f684b1cca@mail.gmail.com> <4AE8B3B3.7090103@gmail.com> <4AE95BEC.4040102@gmail.com> Date: Thu, 29 Oct 2009 17:25:25 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 09:25:33 -0000 On Thu, Oct 29, 2009 at 5:10 PM, Vladimir 'phcoder' Serbinenko wrote: > Bean wrote: >> On Thu, Oct 29, 2009 at 5:12 AM, Vladimir 'phcoder' Serbinenko >> wrote: >> >>> Bean wrote: >>> >>>> Hi, >>>> >>>> Update: >>>> >>>> Add timeout, progressbar and savedefault. >>>> >>>> savedefault: >>>> >>>> Variable savedefault set the system default value. If savedefault=1, >>>> save the current boot item. >>>> >>>> You can also overwrite the default value for individual items, in >>>> menuentry statement --save option always save this item, and --nosave >>>> never save the item. If neither --save nor --nosave is specified, the >>>> system default in savedefault variable is checked. >>>> >>>> >>>> >>> Why do you need this over having a normal save_env? I don't see any >>> reason to prefer an ad-hoc here over general solution >>> >> >> Hi, >> >> This is more convenient than adding a save_env command to every entry. >> Users can just set savedefault=1 and all items are saved by default, >> remove it and it's not saved anymore. They can also config each item >> individually with --save and --nosave option, which is similar to >> adding a save_env command at the beginning, but easier to edit. >> >> > It may be more convinient in this case but when you start adding ad-hoc > structures to any programming languages you end up only clobbering it. > This is why a simple language C became more widespread than clobbered > Ada. If you want to execute code on running entries you will need signals Hi, But menuentry statement is already changed for similar reason. Colin adds --class option, you add --users option, why would add another option --save and --nosave be any difference ? BTW, the save_env method doesn't works menu items generated dynamically. For example, the menu items added by osdetect.lua or sub menu items by menu_create. -- Bean My repository: https://launchpad.net/burg