all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org, Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: Re: how having the basename of a file or directory
Date: Tue, 01 Feb 2011 11:52:46 -0500	[thread overview]
Message-ID: <874o8nvgrl.fsf@red-bean.com> (raw)
In-Reply-To: <87sjw73elr.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Wed, 02 Feb 2011 01:26:56 +0900")

"Stephen J. Turnbull" <stephen@xemacs.org> writes:
>Karl Fogel writes:
> > "Stephen J. Turnbull" <stephen@xemacs.org> writes:
> > > > or creating a basename function
> > >
> > >Un-Pythonic.  But then, this isn't Python, so I guess it's OK. ;-)
> > 
> >   $ python
> >   Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) 
> >   >>> import os.path
> >   >>> os.path.basename("/home/kfogel/README")
> >   'README'
> >   >>> quit()
> >   $ 
>
>You know what I mean.  "Not every three-line function needs to be a
>built-in."  AFAIK Python doesn't have an equivalent to
>file-name-directory; you need to write that yourself.

Oh, sorry -- I didn't actually know that's what you meant.

(Sometimes people use "Pythonic" to mean "whatever matches my taste";
you were being more careful than that, but unfortunately it was lost on
me because I've been too degraded by other conversations.)

FWIW, for me the compelling argument for a `basename' function is that
then M-x apropos will find it (and programmers often need it).  Given
that "basename" seems to have become the standard term for this
functionality, we should take the simplest step that makes it findable
via that term.  If there's some other method that will accomplish the
same thing, that's fine.

-Karl



  reply	other threads:[~2011-02-01 16:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31  7:25 how having the basename of a file or directory Thierry Volpiatto
2011-01-31  8:30 ` Stephen J. Turnbull
2011-01-31  8:59   ` Thierry Volpiatto
2011-01-31 10:28     ` Andreas Schwab
2011-01-31 11:03       ` Thierry Volpiatto
2011-01-31 12:07         ` Andreas Schwab
2011-01-31 12:19           ` Thierry Volpiatto
2011-01-31 12:53             ` Andreas Schwab
2011-01-31 15:29     ` Stefan Monnier
2011-01-31 16:30       ` Thierry Volpiatto
2011-01-31 16:43         ` Karl Fogel
2011-01-31 19:53         ` Stefan Monnier
2011-01-31 20:39           ` Thierry Volpiatto
2011-02-01 11:55     ` Stephen J. Turnbull
2011-02-01 15:37       ` Karl Fogel
2011-02-01 16:26         ` Stephen J. Turnbull
2011-02-01 16:52           ` Karl Fogel [this message]
2011-02-02 12:27             ` Stephen J. Turnbull

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o8nvgrl.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.org \
    --cc=thierry.volpiatto@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.