[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: way to get the file name except the extension

From: Kiwon Um
Subject: Re: way to get the file name except the extension
Date: Wed, 4 Feb 2009 22:45:09 -0800 (PST)
User-agent: G2/1.0

On 2월5일, 오후3시03분, Xah Lee <address@hidden> wrote:
> On Feb 4, 9:09 pm, Kiwon Um <address@hidden> wrote:
> > Hello. I'm a newbie to elisp.
> > I'm wondering a built-in function or lisp codes to get the file name
> > except the extension from (buffer-name):
> > TestCode.cpp -> TestCode
> > Any advise? :)
> easy.
> you want file-name-sans-extension and file-name-nondirectory.
> of langs i know that i've used extensively for processing file and dir
> names, namely Python and Perl, none comes as easy to use as the funcs
> provided in elisp.
> you can get file dir name, file name, file suffix, strip suffix,
> create dir including non existing parent dir, convert from full path
> to relative path, etc, all built in in elisp with a simple function.
> • File Names - GNU Emacs Lisp Reference Manual
>   Xah

Thanks. It really works well. :
(file-name-sans-extension (buffer-name))

P.s. Is there any good reference point of the manual to manipulate the
time related strings, time, date, month, year, etc, like file name?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]