From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23643: 25.0.50; Documentation of file-name-sans-extension seems wrong Date: Sat, 04 Jun 2016 10:54:22 +0300 Message-ID: <83oa7hwfrl.fsf@gnu.org> References: <1464487146-sup-1981@wolff.csail.mit.edu> <838tysykjl.fsf@gnu.org> <1464629243-sup-9961@wolff.csail.mit.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1465026951 13836 80.91.229.3 (4 Jun 2016 07:55:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2016 07:55:51 +0000 (UTC) Cc: 23643-done@debbugs.gnu.org To: Thomas =?UTF-8?Q?=C3=89mile?= Bourgeat Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 09:55:40 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b96QS-0007IP-UW for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 09:55:21 +0200 Original-Received: from localhost ([::1]:59782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96QN-00038Y-9s for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 03:55:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96QE-00035P-IN for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 03:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b96QA-0005Yr-HR for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 03:55:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96QA-0005Ye-Dq for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 03:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b96QA-00033P-8C for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 03:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jun 2016 07:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23643-done@debbugs.gnu.org id=D23643.146502684611673 (code D ref 23643); Sat, 04 Jun 2016 07:55:02 +0000 Original-Received: (at 23643-done) by debbugs.gnu.org; 4 Jun 2016 07:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b96PF-00032D-TP for submit@debbugs.gnu.org; Sat, 04 Jun 2016 03:54:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b96PE-00031k-Oh for 23643-done@debbugs.gnu.org; Sat, 04 Jun 2016 03:54:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b96P5-0005Au-IW for 23643-done@debbugs.gnu.org; Sat, 04 Jun 2016 03:53:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96P5-0005Aj-Es; Sat, 04 Jun 2016 03:53:55 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2297 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b96P3-0002T4-Ix; Sat, 04 Jun 2016 03:53:54 -0400 In-reply-to: <1464629243-sup-9961@wolff.csail.mit.edu> (message from Thomas =?UTF-8?Q?=C3=89mile?= Bourgeat on Mon, 30 May 2016 13:40:16 -0400) 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:119031 Archived-At: > From: Thomas Émile Bourgeat > Date: Mon, 30 May 2016 13:40:16 -0400 > > Just for information, the "follows" part confused me (I thought that the part > that follows "a" in "abc" is "bc" and not "abc"). Although, even if we assume > that follows is "non-strict", and that the extension contains also the dot, > then the documentation of file-name-extension is incorrect. In the two > documentations functions "extension" is defined the same way The extension is clearly not defined the same way in these two functions. But I've seen a similar issue with file-name-extension, and fixed that as well. The doc strings now say (defun file-name-sans-extension (filename) "Return FILENAME sans final \"extension\". The extension, in a file name, is the part that begins with the last `.', except that a leading `.' of the file name, if there is one, doesn't count." (defun file-name-extension (filename &optional period) "Return FILENAME's final \"extension\". The extension, in a file name, is the part that begins with the last `.', excluding version numbers and backup suffixes, except that a leading `.' of the file name, if there is one, doesn't count. Return nil for extensionless file names such as `foo'. Return the empty string for file names such as `foo.'. By default, the returned value excludes the period that starts the extension, but if the optional argument PERIOD is non-nil, the period is included in the value, and in that case, if FILENAME has no extension, the value is \"\"."