all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wolfgang Jenkner <wjenkner@inode.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 13160@debbugs.gnu.org, Kevin Ryde <user42@zip.com.au>
Subject: bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db
Date: Sat, 22 Dec 2012 18:58:43 +0100	[thread overview]
Message-ID: <85txrermss.fsf@iznogoud.viz> (raw)
In-Reply-To: <jwvpq22kopn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 22 Dec 2012 12:11:44 -0500")

On Sat, Dec 22 2012, Stefan Monnier wrote:

> I don't consciously avoid it, but I just never hit TAB to complete
> a manpage name without first typing a few chars.  I doubt I'm the
> only one.
>
> On  my system "make -k ^" returns about 9K commands of average length
> 14chars, so that's about 9K * (16B (chars) + 16B (string object) + 2*8B
> (cons cells)) or more than 400KB (on a 32bit system) or 700KB (on
> a 64bit system) for that cache.  I'm not sure it's such a good idea.

Worrying about this is the main reason why I posted this, but:

On an old system with not much memory you probably won't have much room
for man pages either (unless you mount a NFS share).  I actually tested
this with a slax image under qemu emulating a i486 system with 64M
(without hardware supported virtualization) and I saw no problem with
it.  Of course, qemu can't really emulate processor or memory-access
speed, I think, and there were only 1000 man entries or so.  I'd love to
test this on my old thinkpad 350 with 20M, but it's difficult to install
a recent emacs on a 120M hard disk ;-)

That said, my main system is reasonable 2009 vintage, has

man -k ^ | wc -l
    8702

(with the actual entries being roughly the double of that)
and the delay is not noticeably longer when caching all entries at the
first completion attempt instead of just part of them.

> Does it fix an actual bug? [ Sorry if it does fix a real bug and this
> was mentioned somewhere in this thread, but I haven't found the time to
> read all threads as thoroughly as I'd like.  ]

My proposed change log entry indicates that the cache handling is rather
bogus (complete for "foo" then for "bar" and then for "foo" again and
"man -k ^foo" will be run again and the result prepended to the cache).

The main reason, however, is that it eliminates any dependency on the
particular flavour of `man -k' output, so everything can be done in
elisp by the new Man-parse-apropos (I indicated that in the change log
entry, too).

Wolfgang





  reply	other threads:[~2012-12-22 17:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 19:16 bug#13160: 24.3.50; [PATCH] man page completion support beyond man-db Wolfgang Jenkner
2012-12-12 19:31 ` Glenn Morris
2012-12-12 20:30   ` Stefan Monnier
2012-12-14 21:19 ` Kevin Ryde
2012-12-14 21:35   ` Wolfgang Jenkner
2012-12-15  0:59     ` Kevin Ryde
2012-12-16 18:07       ` Wolfgang Jenkner
2012-12-22 15:27         ` Wolfgang Jenkner
2012-12-22 17:11           ` Stefan Monnier
2012-12-22 17:58             ` Wolfgang Jenkner [this message]
2012-12-23 13:46               ` Stefan Monnier
2012-12-23 19:49                 ` Wolfgang Jenkner
2012-12-23 20:59                   ` Wolfgang Jenkner
2012-12-24  0:00                   ` Stefan Monnier
2013-01-06 19:27                     ` Wolfgang Jenkner
2012-12-24  1:20                   ` Stefan Monnier
2012-12-24  2:23                     ` Wolfgang Jenkner
2012-12-24  4:34                       ` Stefan Monnier
2013-01-06 19:48                         ` Wolfgang Jenkner
2013-01-10 15:01                           ` Stefan Monnier
2012-12-30  0:10                     ` Kevin Ryde
2012-12-23  0:16           ` Kevin Ryde

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=85txrermss.fsf@iznogoud.viz \
    --to=wjenkner@inode.at \
    --cc=13160@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=user42@zip.com.au \
    /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.