unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 17832@debbugs.gnu.org
Subject: bug#17832: 24.4.50; `apropos-library' behavior for a top-level library file
Date: Sun, 22 Jun 2014 09:15:52 -0700 (PDT)	[thread overview]
Message-ID: <b137d4d2-e543-4527-ab52-4c6c115be49a@default> (raw)

1. I have a library foo.el that just `require's a set of component
libraries (files).  foo.el itself defines no functions or variables.

`M-x apropos-library foo' just shows this message:

  No apropos matches for `'

Granted, the doc string of `apropos-library' says that it lists the
variables and functions defined by library FILE, and there are none
defined in file foo.el.

But the command is called `apropos-library', not `apropos-lisp-file'.
That somewhat justifies a user in thinking that it should return a
list of the vars and functions defined in the _library_ as a whole,
which includes all of those defined in libraries that it requires.

Rather than just saying that the command is misnamed, or the name is
misleading, the first part of this bug report is to request that the
command live up to its name: give you a report of the functions and
variables defined in the _whole library_, recursively including those
of its required component libraries.

2. But before (or even without) fixing #1: The message "No apropos
matches for `'" is inappropriate.  The user did not explicitly
provide an apropos pattern to match, and s?he certainly did not
provide an empty pattern for Emacs to complain about.

Instead of just blindly piggybacking on `apropos-symbols-internal',
`apropos-library' should provide a reasonable message in this case.

3. When `apropos-library' calls `apropos-symbols-internal' it in fact
passes these args:

 SYMBOLS: nil
 KEYS:    t
 TEXT:    "Library `foo' provides: foo
and requires: foo-1 and foo-2 and foo-3 and foo-4 and foo-5 and foo-6
and foo-7 and foo-8"

The TEXT arg provides useful information about library foo.  It
should, I think, be included in the apropos output (whether or not
`apropos-library' is upgraded to show the symbols for the whole
library, as this bug report (#1) requests).

As a first and partial bug fix then, I propose that `apropos-library'
always print TEXT (which it does when there are defined symbols in the
file).  If there are no functions or vars defined in the file, then,
while waiting for a proper fix (#1), show buffer *Apropos* with just
TEXT and a statement that no functions or variables are defined in file
foo.el.  Get rid of the unhelpful message No apropos matches for `'.

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-17 on ODIEONE
Bzr revision: 117359 monnier@iro.umontreal.ca-20140617193358-2t1nl1te9gc2mqrx
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





             reply	other threads:[~2014-06-22 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22 16:15 Drew Adams [this message]
2014-06-23 13:00 ` bug#17832: 24.4.50; `apropos-library' behavior for a top-level library file Stefan Monnier
2014-06-23 14:39   ` Drew Adams
2021-07-14 10:13 ` Lars Ingebrigtsen
2021-07-14 14:31   ` bug#17832: [External] : " Drew Adams

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=b137d4d2-e543-4527-ab52-4c6c115be49a@default \
    --to=drew.adams@oracle.com \
    --cc=17832@debbugs.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 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).