From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Path Operations: Concatenation (concat), Extraction of sub-paths, etc.
Date: 26 Apr 2007 08:53:15 -0700 [thread overview]
Message-ID: <1177602795.646518.293300@o40g2000prh.googlegroups.com> (raw)
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
next reply other threads:[~2007-04-26 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 15:53 Nordlöw [this message]
2007-04-27 6:47 ` Path Operations: Concatenation (concat), Extraction of sub-paths, etc Kai Grossjohann
[not found] ` <mailman.2578.1177656828.7795.help-gnu-emacs@gnu.org>
2007-04-30 5:10 ` Stefan Monnier
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=1177602795.646518.293300@o40g2000prh.googlegroups.com \
--to=per.nordlow@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).