all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Strange `file-name-sans-extension' behavior
@ 2002-07-26 11:15 Jens Schmidt
  2002-07-27 18:53 ` Richard Stallman
  0 siblings, 1 reply; 19+ messages in thread
From: Jens Schmidt @ 2002-07-26 11:15 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2002-08-20 11:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-26 11:15 Strange `file-name-sans-extension' behavior Jens Schmidt
2002-07-27 18:53 ` Richard Stallman
2002-08-09  7:38   ` Stefan Monnier
2002-08-10 17:16     ` Richard Stallman
2002-08-12 15:58       ` Stefan Monnier
2002-08-12 17:28         ` Eli Zaretskii
2002-08-12 18:21           ` Andreas Schwab
2002-08-13 22:47           ` Richard Stallman
2002-08-14 11:03             ` Eli Zaretskii
2002-08-14 23:14               ` Richard Stallman
2002-08-15 16:51                 ` Eli Zaretskii
2002-08-16  2:31                   ` Richard Stallman
2002-08-16 17:17                     ` `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ) Stefan Monnier
2002-08-17  4:51                       ` Richard Stallman
2002-08-18 19:25                         ` Eli Zaretskii
2002-08-19 15:32                           ` Stefan Monnier
2002-08-19 18:39                           ` Richard Stallman
2002-08-20 11:33                             ` Eli Zaretskii
2002-08-13  1:48         ` Strange `file-name-sans-extension' behavior Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.