From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.help Subject: parent directories of directories Date: Mon, 23 Aug 2010 21:48:51 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1282606429 30403 80.91.229.12 (23 Aug 2010 23:33:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Aug 2010 23:33:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 24 01:33:48 2010 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.69) (envelope-from ) id 1OngWP-0005l9-UI for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Aug 2010 01:33:46 +0200 Original-Received: from localhost ([127.0.0.1]:58674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OngWP-00026G-5s for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 19:33:45 -0400 Original-Received: from [140.186.70.92] (port=37313 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ond13-00051i-OX for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 15:49:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ond12-0000U3-P1 for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 15:49:09 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:52477) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ond12-0000Tw-Mw for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 15:49:08 -0400 Original-Received: by qwk4 with SMTP id 4so6040082qwk.0 for ; Mon, 23 Aug 2010 12:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=lokpaLHPsPT/bXyRneNAUI2F6m0hX4H2dNoRt5YsMr0=; b=otwDpRwaJuQeIQiPUhUKl/n7eQsyLLzPS/lkA67HahuIfRMXuFJODDjKqqRz6wgLnR 0AQ8KrTvjeXtqae8C9eBPsvJoRT162vD8FjE2LNU9pgZ5kQUVKOJtGVTwa1hykClJtg0 kxLQRegFOAKzdJ3HfRsVrcJm53sEmWkfK9p7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=uFl9BJhtldjq/xVkOCH52KYwMs1ogaw1eJYChtvvwZHfN3ee7C7i/M95hJQPhKhN6n s6XhAkBEN5l6KTslEnpf1HiC4xaXfd1X76/w2vBOj2QlmWl4p5WwKbODLdh71EwQsDsG bXcNiUDVR+CXJvfKAQg6psSF+EQLvUOctl36I= Original-Received: by 10.220.60.204 with SMTP id q12mr3558728vch.183.1282592946984; Mon, 23 Aug 2010 12:49:06 -0700 (PDT) Original-Received: by 10.220.100.77 with HTTP; Mon, 23 Aug 2010 12:48:51 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 23 Aug 2010 19:32:16 -0400 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:74783 Archived-At: How does one get the parent directory of a directory in a way that works on all supported platforms? For regular files `file-name-directory` can be used but for directories this just returns the given argument. One could use `(file-name-directory (substring 0 -1 directory))` but I have no idea wether this works on all platforms. Thanks Jonas