Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: worley@alum.mit.edu (Dale R. Worley) Newsgroups: gnu.bash.bug Subject: Re: bashbug's default editor Date: Sat, 01 Aug 2020 02:17:27 -0400 Lines: 31 Approved: bug-bash@gnu.org Message-ID: References: <63cea231-0134-0c79-fa10-ec2b49a395e5@case.edu> (chet.ramey@case.edu) <87wo2iyjns.fsf@hobgoblin.ariadne.com> NNTP-Posting-Host: lists.gnu.org X-Trace: usenet.stanford.edu 1596248290 5283 209.51.188.17 (1 Aug 2020 02:18:10 GMT) X-Complaints-To: action@cs.stanford.edu Cc: eschwartz@archlinux.org, bug-bash@gnu.org, chet.ramey@case.edu To: chet.ramey@case.edu Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1596248280; bh=1MsUazBW994snm5gliiupakWktSODvVtwv7PktohUEw=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID; b=qVM63CO2xDg9Fi+WnirpRdZTTnUqhOoQubfGYXvjBRVZYIwQiqDPzKrzGEmm3Y8My d9I9VcSsOeyvBfaMNeCOs6YIHhKHm+IDyd5xnG5xTwsRw0bhLOOq0l3GRD/pcRDHwA j+DKZ/PZMrRHavoaGgCYg3zmcvTZ+i64hygcaa4oGBjqwVNpM9cox6c78+js0RuUba XKIxbm2hLvWKP+oKjGe+w5RmVlNKdXGyYu6E7jkZ6q/CsR/ZHLtYcxHEFuRErGLCHY Tajzt9F5dUFhdjWBORjVQQhp1qIPnoXPKtEkV9L/rd1kZcd7SHT0/taJOrGsxEloIi Qhboz4TrEX+QQ== X-Xfinity-VMeta: sc=0.00;st=legit X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f In-Reply-To: <63cea231-0134-0c79-fa10-ec2b49a395e5@case.edu> (chet.ramey@case.edu) Received-SPF: softfail client-ip=2001:558:fe21:29:69:252:207:43; envelope-from=worley@alum.mit.edu; helo=resqmta-ch2-11v.sys.comcast.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/31 22:18:00 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <87wo2iyjns.fsf@hobgoblin.ariadne.com> Xref: csiph.com gnu.bash.bug:16669 Chet Ramey writes: >> "If EDITOR is not set, bashbug attempts to locate a number of >> alternative editors, including emacs, and defaults to vi." >> >> The word "defaults" there implies that vi is the preferred autolocated >> editor, but the intention is to have it the least preferred. > > I don't think it implies that. It's the default choice if there are no > other alternatives. It needs work. It states "attempts to locate a number of alternative editors", which makes perfect sense. But it doesn't make sense to say that it "defaults to vi" in either possible interpretation: 1) The not-intended interpretation is that "it defaults to vi" in the sense that it runs vi if it can. But the preceding text suggests that Emacs is searched for first. 2) The intended interpretation is that if bashbug can't find an editor it somehow attempts to run vi as the default or final fall-back. But that doesn't make sense either, since attempting to do so is ipso facto an attempt to locate vi (presumably through an exec() variant that searches the path), in which case the action is part of the "attempts to locate a number of alternative editors" (in this case "vi"), and thus the first clause would have succeeded. It would make more sense to say something like "attempts to locate a number of alternative editors, including emacs and vi." Dale