From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mohammed Sadiq Newsgroups: gmane.emacs.bugs Subject: bug#28258: 26.0.50; [PATCH] Let file-name-base succeed when buffer-file-name is nil Date: Tue, 29 Aug 2017 21:40:31 +0530 (IST) Message-ID: <1188947996.68721.1504023031457@webmail.mailhostbox.com> References: <87k21o8m8x.fsf@rose> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504023331 5956 195.159.176.226 (29 Aug 2017 16:15:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2017 16:15:31 +0000 (UTC) Cc: 28258@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 29 18:15:24 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 1dmjAX-0000oK-DX for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Aug 2017 18:15:13 +0200 Original-Received: from localhost ([::1]:45907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmjAe-00085L-CF for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Aug 2017 12:15:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmj6X-0004Zw-Tt for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 12:11:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmj6U-0005dz-MK for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 12:11:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52219) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmj6U-0005dr-GU for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmj6U-0003Kv-Ap for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 12:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mohammed Sadiq Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2017 16:11:02 +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.150402303412791 (code B ref 28258); Tue, 29 Aug 2017 16:11:02 +0000 Original-Received: (at 28258) by debbugs.gnu.org; 29 Aug 2017 16:10:34 +0000 Original-Received: from localhost ([127.0.0.1]:60900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmj62-0003KE-F0 for submit@debbugs.gnu.org; Tue, 29 Aug 2017 12:10:34 -0400 Original-Received: from us2-ob1-4.mailhostbox.com ([162.210.70.57]:47745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmj60-0003K6-B6 for 28258@debbugs.gnu.org; Tue, 29 Aug 2017 12:10:33 -0400 Original-Received: from 172.16.214.65 (unknown [172.16.214.65]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sadiq@sadiqpk.org) by us2.outbound.mailhostbox.com (Postfix) with ESMTPSA id 759F1180975; Tue, 29 Aug 2017 16:10:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sadiqpk.org; s=20160628; t=1504023031; bh=9MTvBTPOQFuRrwh+YoDXYkU2wTdcI2NWp40GP6N7mxA=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=XGgchC3MuaPyvwHPrHruK4iTXHfUaqDB9B0MsuPrdPSdCJxO4JtsevGUSOpCthkUt r17ghGTs8Y8LhF+mquCXG8KNKwtWuIEWDlPvvKS9///1ZKuFvh0WlWHABDQXXfj6/s J6w+SzzFT57KpGQ8HoGJgKK4nGck4miiIcHSgMP8= In-Reply-To: X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.3-Rev22 X-Originating-Client: open-xchange-appsuite X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=Z6GcJDZA c=1 sm=1 tr=0 a=nf9kGWJ/Yk0yo5ZsUxXxOw==:117 a=IkcTkHD0fZMA:10 a=f7P9GQdqspX4-Ohf0dcA:9 a=QEXdDO2ut3YA:10 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:136330 Archived-At: > On August 29, 2017 at 9:24 PM Glenn Morris wrote: > Hi, and thanks for the patch. > IIUC: file-name-base currently errors when called with no applicable > file name, and you want it to instead return nil? This seems rather > unusual for an Emacs file-related function. I would have thought this > unlikely to be applied, but maybe you could explain why you want it? The signature of `file-name-base' is (file-name-base &optional FILENAME). That is, the FILENAME argument is optional. So I believe it shouldn't be an error to not give the optional argument. And so calling the function in a buffer with no file associated shouldn't be an error. I'm not sure if my assertion is right. Feel free to do what it is felt to be right. :)