From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#28258: 26.0.50; [PATCH] Let file-name-base succeed when buffer-file-name is nil Date: Mon, 18 Sep 2017 20:41:52 -0400 Message-ID: References: <87k21o8m8x.fsf@rose> <1188947996.68721.1504023031457@webmail.mailhostbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505781791 27664 195.159.176.226 (19 Sep 2017 00:43:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2017 00:43:11 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 28258@debbugs.gnu.org, Mohammed Sadiq To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 19 02:43:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6cy-0006sw-Fr for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Sep 2017 02:43:04 +0200 Original-Received: from localhost ([::1]:39485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6d5-0002NY-R5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 20:43:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6cx-0002NP-26 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:43:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du6cw-0007fY-27 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:43:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38329) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1du6cv-0007fM-UH for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1du6cv-0001bR-OW for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Sep 2017 00:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28258-submit@debbugs.gnu.org id=B28258.15057817306049 (code B ref 28258); Tue, 19 Sep 2017 00:43:01 +0000 Original-Received: (at 28258) by debbugs.gnu.org; 19 Sep 2017 00:42:10 +0000 Original-Received: from localhost ([127.0.0.1]:47008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6c6-0001ZV-Fm for submit@debbugs.gnu.org; Mon, 18 Sep 2017 20:42:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6c5-0001ZC-0R for 28258@debbugs.gnu.org; Mon, 18 Sep 2017 20:42:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du6bz-0006vN-2I for 28258@debbugs.gnu.org; Mon, 18 Sep 2017 20:42:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6bp-0006p3-1n; Mon, 18 Sep 2017 20:41:53 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1du6bo-0002dB-KB; Mon, 18 Sep 2017 20:41:52 -0400 X-Spook: Bomb threat Contamination Exon Shell CESID Public Health X-Ran: *ke1H!:nh(3<8uY5z$1q`Dk""}Y?SsQ;Vf/2et4T*Nns93JC^c>BAgEfq&h0/? X-Hue: black X-Attribution: GM In-Reply-To: (Philipp Stephani's message of "Mon, 18 Sep 2017 17:12:36 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137092 Archived-At: Philipp Stephani wrote: > Changing from raising an error to returning nil is a breaking change: > callers currently can rely on the return value being never nil, and can > rely on errors being raised. Changing this would break these assumptions. > Even ignoring that, I think raising an error is the right thing to do: > unless given a filename, the function can't fulfil its promise, and raising > an error is the most appropriate reaction to this. (There are already way > too many Elisp functions that silently ignore errorneous situations.) I think you've summarized things very well. > I do agree that the calling convention of `file-name-base' is odd. How > about making the argument mandatory (initially only by changing the > advertised calling convention and the docstring)? Sounds good to me.