all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: <emacs-devel@gnu.org>
Subject: Re: (fn ...) - please fill it at the point of generation
Date: Sun, 30 Dec 2007 00:05:18 +0100	[thread overview]
Message-ID: <87y7bdp0ep.fsf@ambire.localdomain> (raw)
In-Reply-To: <BNELLINCGFJLDJIKDGACGEBECGAA.drew.adams@oracle.com> (Drew Adams's message of "Sat, 29 Dec 2007 10:14:57 -0800")

() "Drew Adams" <drew.adams@oracle.com>
() Sat, 29 Dec 2007 10:14:57 -0800

   If that is the intention, then, yes, it should be not only
   semantically but also practically distinguished from the rest
   of the string (which is presentation-ready). IOW, we should
   have separate retrieval functions for the doc string per se and
   the interface spec (signature).

what you seek has been done, just not where you seek it.  the
function `documentation' is called by others that make this
distinction.  why don't you look at using those, instead?  are
they deficient in some way?  if they are not, will changing
`documentation' behavior make them so?  will you fix those bugs
then?

i think if you let go of the desire to have `documentation' work
like these other functions, you may find the other functions
readily suitable for your needs.

   The only way currently to recuperate the doc string gives you
   all of it, including the part you consider not to be part of
   the doc string but "markup".

i don't see that as a problem.  the required treatment of that
string, to separate the parts, is not onerous.  if it feels
onerous, no worries, see my point above.

   If that last line (interface spec) is not part of the doc
   string, and you want to keep it unfilled because filling is
   presentation, then `documentation' (or some other function)
   should return only the doc string per se, not the whole kit and
   caboodle. Especially since `documentation' is written in C, so
   it can't be hacked without rebuilding Emacs.

you seek to change code, but what is better is to change your view
of the data that the code returns.  since the data is regular, any
wrangling required to fit it to your requirements can be purely
additive.  isn't that tantalizing enough for you?

   IOW, either the "interface spec" is part of the doc string or
   it is not. If it is, then it too should be presentation-ready,
   like the rest of the string. If it is not, then we should have
   a separate function that gives us only the doc string (without
   interface spec).

i see many SHOULD in your argument, but i don't understand why.
here are two perlis quotes that are relevant:

 If a program manipulates a large amount of data,
 it does so in a small number of ways.
 			-- Alan Perlis
 
 It is better to have 100 functions operate on one data
 structure than 10 functions on 10 data structures.
 			-- Alan Perlis

i'm afraid i cannot communicate the elegance of the current
system, but only my fear that you are proposing to wreak it.

thi

  reply	other threads:[~2007-12-29 23:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-28 21:38 (fn ...) - please fill it at the point of generation Drew Adams
2007-12-29  2:37 ` Miles Bader
2007-12-29  3:23   ` Drew Adams
2007-12-29 13:32     ` Miles Bader
2007-12-29 15:53       ` Drew Adams
2007-12-29 17:26         ` Miles Bader
2007-12-29 18:15           ` Drew Adams
2007-12-29 13:51 ` Richard Stallman
2007-12-29 15:53   ` Drew Adams
2007-12-29 17:08     ` Thien-Thi Nguyen
2007-12-29 18:14       ` Drew Adams
2007-12-29 23:05         ` Thien-Thi Nguyen [this message]
2007-12-30  0:04           ` Drew Adams
2007-12-30  1:59             ` Thien-Thi Nguyen
2007-12-30  1:36     ` Richard Stallman

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=87y7bdp0ep.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=emacs-devel@gnu.org \
    /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.