unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 13033@debbugs.gnu.org
Subject: bug#13033: 24.3.50; regression: read-file-name-internal handles "~" wrong
Date: Fri, 30 Nov 2012 14:12:14 +0100	[thread overview]
Message-ID: <87d2yvute9.fsf@web.de> (raw)
In-Reply-To: <CAAeL0SQ1cUzeO1Vvr_mP+vRs5F8cJzRc6NtGWQ8TnYOUKN018Q@mail.gmail.com> (Juanma Barranquero's message of "Fri, 30 Nov 2012 00:58:29 +0100")

Juanma Barranquero <lekktu@gmail.com> writes:

> On Thu, Nov 29, 2012 at 10:44 PM, Drew Adams <drew.adams@oracle.com> wrote:
>
> > In this Emacs version,
> > (read-file-name-internal "~" 'file-exists-p nil) returns "~/dradams/".
>
> read-file-name-internal's docstring clearly says:  "Internal
> subroutine for `read-file-name'.  Do not call this."

I'm not sure if I understand the implications.  I thought something like
"Do not call this." is meant for the end users, but also for developers?

Emacs is the "extensible ... editor".  It is quite difficult for any
developer to extend Emacs and contribute packages if we only allow the
use of high-level public interface functions.

I'm helping Drew to fix problems in Icicles.  It was already hard to
understand the not very lengthy documented new completion code.  But if
we are disallowed to use it, we had to stop to develop something like
Icicles.

If we start to change our habits and write Emacs in a way that essential
primitives aren't allowed to be called by developers, this is the
beginning of the end of extensibility.  It is a bug if something like
`read-file-name-internal' is not allowed to be called in third-party
packages.

At university I learned that writing software happens in a way that
every function should have a clear specification for what it
does/returns, and a documentation of this.  Ok, I'm not that much a
software developer that I would know if this is always necessary in that
strong sense.  But it would be helpful if the sources of Emacs (which is
free software that may be used and modified by anyone) would be a bit
more readable and reusable than the compiled byte-code.


Michael.





  reply	other threads:[~2012-11-30 13:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 21:44 bug#13033: 24.3.50; regression: read-file-name-internal handles "~" wrong Drew Adams
2012-11-29 23:58 ` Juanma Barranquero
2012-11-30 13:12   ` Michael Heerdegen [this message]
2012-11-30 13:55     ` Eli Zaretskii
2012-12-01 10:13       ` Michael Heerdegen
2012-11-30  3:56 ` Stefan Monnier
2012-11-30  4:08   ` Drew Adams
2012-11-30 17:00     ` Stefan Monnier
2012-11-30 17:24       ` Drew Adams
2012-11-30 18:44         ` Stefan Monnier
2012-11-30 19:50           ` Drew Adams
2012-11-30 20:07             ` Eli Zaretskii
2012-11-30 21:09               ` Drew Adams
2012-12-01  7:46                 ` Eli Zaretskii
2012-12-01 16:34                   ` Drew Adams
2012-11-30 20:08             ` Stefan Monnier
2012-11-30 20:42               ` Eli Zaretskii
2012-11-30 21:14               ` Drew Adams
2014-02-09  2:51                 ` Lars Ingebrigtsen
2012-11-30 19:01       ` Eli Zaretskii

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=87d2yvute9.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=13033@debbugs.gnu.org \
    --cc=lekktu@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 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).