From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?B?Tm9yZGz2dw==?= Newsgroups: gmane.emacs.help Subject: Path Operations: Concatenation (concat), Extraction of sub-paths, etc. Date: 26 Apr 2007 08:53:15 -0700 Organization: http://groups.google.com Message-ID: <1177602795.646518.293300@o40g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1177605275 13141 80.91.229.12 (26 Apr 2007 16:34:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2007 16:34:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 26 18:34:33 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hh6vO-00004u-0H for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Apr 2007 18:34:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh718-0001yi-Ca for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Apr 2007 12:40:26 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!o40g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: 150.227.15.253 Original-X-Trace: posting.google.com 1177602804 20741 127.0.0.1 (26 Apr 2007 15:53:24 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 26 Apr 2007 15:53:24 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8.1.3) Gecko/20060601 Firefox/2.0.0.3 (Ubuntu-edgy),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 netcache (NetCache NetApp/6.1.1RC1) Complaints-To: groups-abuse@google.com Injection-Info: o40g2000prh.googlegroups.com; posting-host=150.227.15.253; posting-account=T25tbw0AAADoaalO12jRFAyM2dkqq2mX Original-Xref: shelby.stanford.edu gnu.emacs.help:147628 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43231 Archived-At: Hey again, Emacs Powerusers! I am looking for convenience functions for path operations, typically - concatenation of paths: (path-concat "/usr/" "/lib") =3D> "/usr/lib/" - extraction of sub-paths: (path-before "/usr/lib/" "/lib/") =3D> "usr/" - extraction of sub-paths: (path-after "/usr/lib/X11" "lib") =3D> "X11/" - full path to local file name: (path-local "/etc/passwd") =3D> "passwd" - full path to containing directory path: (path-dir "/etc/passwd") =3D> "/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=F6w