unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Path Operations: Concatenation (concat), Extraction of sub-paths, etc.
@ 2007-04-26 15:53 Nordlöw
  2007-04-27  6:47 ` Kai Grossjohann
       [not found] ` <mailman.2578.1177656828.7795.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Nordlöw @ 2007-04-26 15:53 UTC (permalink / raw)
  To: help-gnu-emacs

Hey again, Emacs Powerusers!

I am looking for convenience functions for path operations, typically

- concatenation of paths: (path-concat "/usr/" "/lib") => "/usr/lib/"
- extraction of sub-paths: (path-before "/usr/lib/" "/lib/") => "usr/"
- extraction of sub-paths: (path-after "/usr/lib/X11" "lib") => "X11/"
- full path to local file name: (path-local "/etc/passwd") => "passwd"
- full path to containing directory path: (path-dir "/etc/passwd") =>
"/etc/"

If possible results should be standardized/canonicalized, that is
- directories always end with "/"
- non-absolute paths always begin directly with the top-most directory
name without the "/"


/Nordlöw

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

end of thread, other threads:[~2007-04-30  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 15:53 Path Operations: Concatenation (concat), Extraction of sub-paths, etc Nordlöw
2007-04-27  6:47 ` Kai Grossjohann
     [not found] ` <mailman.2578.1177656828.7795.help-gnu-emacs@gnu.org>
2007-04-30  5:10   ` Stefan Monnier

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).