From: Jens Schmidt <Jens.Schmidt27@epost.de>
Subject: Strange `file-name-sans-extension' behavior
Date: 26 Jul 2002 11:15:05 +0000 [thread overview]
Message-ID: <uptxa211i.fsf@oracle.com> (raw)
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
In GNU Emacs 21.1.1 (i386-msvc-nt4.0.1381)
of 2001-10-22 on buffy
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
(file-name-sans-extension "sys/types.h")
-> "c:/home/jschmidt/sys/types"
I would have expected the result "sys/types".
What about the following version of `file-name-sans-extension':
(defun file-name-sans-extension (filename)
"Return FILENAME sans final \"extension\".
The extension, in a file name, is the part that follows the last `.'."
(let ((file (file-name-sans-versions (file-name-nondirectory filename)))
directory)
(if (string-match "\\.[^.]*\\'" file)
(if (setq directory (file-name-directory filename))
(concat (file-name-as-directory directory)
(substring file 0 (match-beginning 0)))
(substring file 0 (match-beginning 0)))
filename)))
Regards
Jens
reply other threads:[~2002-07-26 11:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uptxa211i.fsf@oracle.com \
--to=jens.schmidt27@epost.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).