unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* reveal-filename
@ 2013-05-17 21:28 Stefan Monnier
  2013-05-18  8:11 ` reveal-filename Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2013-05-17 21:28 UTC (permalink / raw)
  To: emacs-devel

Could we find some other name for this function?

Either we treat it as some "internal auxiliary" function used to build
Emacs, in which case it should have a more discreet name, maybe starting
with "internal-" or some such thingy that makes it clear noone else will
want to use it.

Or we treat it as a "full blown citizen", but then we should more
clearly explain what it is supposed to do, since "Produce the real file
name for FILE" isn't sufficiently descriptive to decide when it's buggy
and when it's not.


        Stefan



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

* Re: reveal-filename
  2013-05-17 21:28 reveal-filename Stefan Monnier
@ 2013-05-18  8:11 ` Eli Zaretskii
  2013-05-21  2:02   ` reveal-filename Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-18  8:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Fri, 17 May 2013 17:28:30 -0400
> 
> Could we find some other name for this function?

You are welcome to suggest any name you like.  The only semi-important
consideration I had in mind was not to have too long a name, so as not
to require reformatting of too many lines in Makefile.in files.

> Either we treat it as some "internal auxiliary" function used to build
> Emacs, in which case it should have a more discreet name, maybe starting
> with "internal-" or some such thingy that makes it clear noone else will
> want to use it.

Experience shows that calling a function 'internal-something' tends to
attract a certain kind of Emacs users to that function, where a more
"innocent" name would normally leave it under the radar...

> "Produce the real file name for FILE" isn't sufficiently descriptive
> to decide when it's buggy and when it's not.

That's unfair: the doc string does explain what this function does.
You quoted only the first line of the doc string.



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

* Re: reveal-filename
  2013-05-18  8:11 ` reveal-filename Eli Zaretskii
@ 2013-05-21  2:02   ` Stefan Monnier
  2013-05-21  2:52     ` reveal-filename Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2013-05-21  2:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> Could we find some other name for this function?
> You are welcome to suggest any name you like.  The only semi-important
> consideration I had in mind was not to have too long a name, so as not
> to require reformatting of too many lines in Makefile.in files.

How 'bout `unmsys--filename'?

>> "Produce the real file name for FILE" isn't sufficiently descriptive
>> to decide when it's buggy and when it's not.
> That's unfair: the doc string does explain what this function does.
> You quoted only the first line of the doc string.

I didn't mean to criticize, sorry.  I just mean that a function with
such a "clean" name should have a "clean" specification of what it
should do, at a higher level than describing its current behavior under
various OSes.  I don't think coming up with such a description is easy,
but I suspect it's not needed either and a less clean name (such as the
one O suggested above) would work just fine.


        Stefan



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

* Re: reveal-filename
  2013-05-21  2:02   ` reveal-filename Stefan Monnier
@ 2013-05-21  2:52     ` Eli Zaretskii
  2013-05-21  5:26       ` reveal-filename Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-21  2:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Mon, 20 May 2013 22:02:31 -0400
> 
> >> Could we find some other name for this function?
> > You are welcome to suggest any name you like.  The only semi-important
> > consideration I had in mind was not to have too long a name, so as not
> > to require reformatting of too many lines in Makefile.in files.
> 
> How 'bout `unmsys--filename'?

Fine with me.

> >> "Produce the real file name for FILE" isn't sufficiently descriptive
> >> to decide when it's buggy and when it's not.
> > That's unfair: the doc string does explain what this function does.
> > You quoted only the first line of the doc string.
> 
> I didn't mean to criticize, sorry.  I just mean that a function with
> such a "clean" name should have a "clean" specification of what it
> should do, at a higher level than describing its current behavior under
> various OSes.  I don't think coming up with such a description is easy,
> but I suspect it's not needed either and a less clean name (such as the
> one O suggested above) would work just fine.

The description that's already there is all there is to tell:

    "Produce the real file name for FILE.

  On systems other than MS-Windows, just returns FILE.
  On MS-Windows, converts /d/foo/bar form of file names
  passed by MSYS Make into d:/foo/bar that Emacs can grok.

  This function is called from lisp/Makefile."

What did you find missing from this description?



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

* Re: reveal-filename
  2013-05-21  2:52     ` reveal-filename Eli Zaretskii
@ 2013-05-21  5:26       ` Stefan Monnier
  2013-05-21  6:28         ` reveal-filename Stephen J. Turnbull
                           ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Stefan Monnier @ 2013-05-21  5:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> How 'bout `unmsys--filename'?
> Fine with me.

Could you make the change?

> The description that's already there is all there is to tell:
>     "Produce the real file name for FILE.
>   On systems other than MS-Windows, just returns FILE.
>   On MS-Windows, converts /d/foo/bar form of file names
>   passed by MSYS Make into d:/foo/bar that Emacs can grok.
>   This function is called from lisp/Makefile."
> What did you find missing from this description?

Looks very ad-hoc to me.  My guess is that the "cleaner" description that
could correspond to it might be something along the lines of "accepts
a file name in the format commonly used by other programs on the system,
and turns it into an equivalent form that works within Emacs".


        Stefan



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

* Re: reveal-filename
  2013-05-21  5:26       ` reveal-filename Stefan Monnier
@ 2013-05-21  6:28         ` Stephen J. Turnbull
  2013-05-21 16:22           ` reveal-filename Eli Zaretskii
  2013-05-21 16:19         ` reveal-filename Eli Zaretskii
  2013-05-21 16:20         ` reveal-filename Eli Zaretskii
  2 siblings, 1 reply; 13+ messages in thread
From: Stephen J. Turnbull @ 2013-05-21  6:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel

Stefan Monnier writes:
 > >> How 'bout `unmsys--filename'?
 > > Fine with me.
 > 
 > Could you make the change?
 > 
 > > The description that's already there is all there is to tell:
 > >     "Produce the real file name for FILE.

How about "Produce a canonical ..." or "Produce a normalized ..."?

"real" has too strong a connation of realpath() to me.

 > Looks very ad-hoc to me.  My guess is that the "cleaner" description that
 > could correspond to it might be something along the lines of "accepts
 > a file name in the format commonly used by other programs on the system,
 > and turns it into an equivalent form that works within Emacs".

You have that backwards, unless you think Emacs users generally live
inside MSYS. :-)




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

* Re: reveal-filename
  2013-05-21  5:26       ` reveal-filename Stefan Monnier
  2013-05-21  6:28         ` reveal-filename Stephen J. Turnbull
@ 2013-05-21 16:19         ` Eli Zaretskii
  2013-05-21 16:20         ` reveal-filename Eli Zaretskii
  2 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-21 16:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Tue, 21 May 2013 01:26:27 -0400
> 
> > The description that's already there is all there is to tell:
> >     "Produce the real file name for FILE.
> >   On systems other than MS-Windows, just returns FILE.
> >   On MS-Windows, converts /d/foo/bar form of file names
> >   passed by MSYS Make into d:/foo/bar that Emacs can grok.
> >   This function is called from lisp/Makefile."
> > What did you find missing from this description?
> 
> Looks very ad-hoc to me.

But that's what the function does, no less, no more.  And yes, it's
ad-hoc, because it simply works around an MSYS bug (I tried to find
other solutions, but failed).

> My guess is that the "cleaner" description that
> could correspond to it might be something along the lines of "accepts
> a file name in the format commonly used by other programs on the system,
> and turns it into an equivalent form that works within Emacs".

When the function is extended to do that, it would make sense to
change the doc string along these lines.  For now, saying that would
be simply incorrect.



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

* Re: reveal-filename
  2013-05-21  5:26       ` reveal-filename Stefan Monnier
  2013-05-21  6:28         ` reveal-filename Stephen J. Turnbull
  2013-05-21 16:19         ` reveal-filename Eli Zaretskii
@ 2013-05-21 16:20         ` Eli Zaretskii
  2013-05-21 19:37           ` reveal-filename Stefan Monnier
  2013-05-25  7:21           ` reveal-filename Eli Zaretskii
  2 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-21 16:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Tue, 21 May 2013 01:26:27 -0400
> 
> >> How 'bout `unmsys--filename'?
> > Fine with me.
> 
> Could you make the change?

Will do.



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

* Re: reveal-filename
  2013-05-21  6:28         ` reveal-filename Stephen J. Turnbull
@ 2013-05-21 16:22           ` Eli Zaretskii
  2013-05-22  2:46             ` reveal-filename Stephen J. Turnbull
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-21 16:22 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: monnier, emacs-devel

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Date: Tue, 21 May 2013 15:28:12 +0900
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> Stefan Monnier writes:
>  > >> How 'bout `unmsys--filename'?
>  > > Fine with me.
>  > 
>  > Could you make the change?
>  > 
>  > > The description that's already there is all there is to tell:
>  > >     "Produce the real file name for FILE.
> 
> How about "Produce a canonical ..." or "Produce a normalized ..."?

The problem is, it can be neither.  If the argument is just "foo", it
will be returned unchanged.

> "real" has too strong a connation of realpath() to me.

Well, that will be changed when the function is renamed.



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

* Re: reveal-filename
  2013-05-21 16:20         ` reveal-filename Eli Zaretskii
@ 2013-05-21 19:37           ` Stefan Monnier
  2013-05-25  7:21           ` reveal-filename Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2013-05-21 19:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> >> How 'bout `unmsys--filename'?
>> > Fine with me.
>> Could you make the change?
> Will do.

Thanks, no hurry,


        Stefan



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

* Re: reveal-filename
  2013-05-21 16:22           ` reveal-filename Eli Zaretskii
@ 2013-05-22  2:46             ` Stephen J. Turnbull
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen J. Turnbull @ 2013-05-22  2:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii writes:

 > > How about "Produce a canonical ..." or "Produce a normalized ..."?
 > 
 > The problem is, it can be neither.  If the argument is just "foo", it
 > will be returned unchanged.

Well, yes, that's what "normalize" and "canonicalize" mean.  If you
hand one of those operations an object already in normal form, it
won't be changed.  If calling doing nothing "Produce" bothers you,
s/Produce/Return/.



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

* Re: reveal-filename
  2013-05-21 16:20         ` reveal-filename Eli Zaretskii
  2013-05-21 19:37           ` reveal-filename Stefan Monnier
@ 2013-05-25  7:21           ` Eli Zaretskii
  2013-05-26  4:49             ` reveal-filename Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2013-05-25  7:21 UTC (permalink / raw)
  To: monnier; +Cc: emacs-devel

> Date: Tue, 21 May 2013 19:20:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Cc: emacs-devel@gnu.org
> > Date: Tue, 21 May 2013 01:26:27 -0400
> > 
> > >> How 'bout `unmsys--filename'?
> > > Fine with me.
> > 
> > Could you make the change?
> 
> Will do.

Done.



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

* Re: reveal-filename
  2013-05-25  7:21           ` reveal-filename Eli Zaretskii
@ 2013-05-26  4:49             ` Richard Stallman
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2013-05-26  4:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

    > > >> How 'bout `unmsys--filename'?
    > > > Fine with me.
    > > 
    > > Could you make the change?
    > 
    > Will do.

    Done.

Please call it `file-name' for consistency with the rest of Emacs.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




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

end of thread, other threads:[~2013-05-26  4:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 21:28 reveal-filename Stefan Monnier
2013-05-18  8:11 ` reveal-filename Eli Zaretskii
2013-05-21  2:02   ` reveal-filename Stefan Monnier
2013-05-21  2:52     ` reveal-filename Eli Zaretskii
2013-05-21  5:26       ` reveal-filename Stefan Monnier
2013-05-21  6:28         ` reveal-filename Stephen J. Turnbull
2013-05-21 16:22           ` reveal-filename Eli Zaretskii
2013-05-22  2:46             ` reveal-filename Stephen J. Turnbull
2013-05-21 16:19         ` reveal-filename Eli Zaretskii
2013-05-21 16:20         ` reveal-filename Eli Zaretskii
2013-05-21 19:37           ` reveal-filename Stefan Monnier
2013-05-25  7:21           ` reveal-filename Eli Zaretskii
2013-05-26  4:49             ` reveal-filename Richard Stallman

Code repositories for project(s) associated with this public inbox

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

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