all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Wolfgang Jenkner <wjenkner@inode.at>
Cc: 16722@debbugs.gnu.org
Subject: bug#16722: 24.3.50; `M-x man' does not handle case appropriately
Date: Sat, 15 Feb 2014 11:55:15 -0800 (PST)	[thread overview]
Message-ID: <512c4f71-4f67-4f36-8e1d-d756ad446d2e@default> (raw)
In-Reply-To: <85fvnkwarc.fsf@iznogoud.viz>

> > M-x man RET
> > Hitting TAB (with no minibuffer input) completes the empty input
> > to the two chars `^:'.
> 
> This is a consequence of (1) and (2) below; the OP could confirm
> (1),

Not sure how to check that.  In a bash shell (outside Emacs), if I
do `man -k' I get the question "What manual page do you want?".
If I then type `ls' then it is as if I typed `ls' from the outset:
the files in the current dir are listed.

If I do `man -k ls' or `man -k "ls"' or `man -k ^l' or `man -k "^l"
then I get only the message "ls: nothing appropriate" (or the same
with ^l instead of ls).

However, if (in bash, outside Emacs) I type `man ls' or `man "ls"'
then I get the normal `man' page output/behavior for `ls'.

> while anybody can easily check (2) by looking at the code in man.el.
> 
> (1) `man -k' can't find any whatis database or all those files are
> empty.
> 
> (2) This particular `man -k' sends "^: nothing appropriate" to
> stdout and not to stderr (if the distinction is meaningful on
> cygwin), which is supposed to mean that it's a line "from the
> summary database", see
> http://pubs.opengroup.org/onlinepubs/009696799/utilities/man.html
> 
> > Thereafter I can do nothing with that.  Whether I type
> > anything after the `^:' or not, TAB just completes to `^:'.
> 
> I think that has been fixed as a by-product of a 2013-01-10 change:
> 
> 	(man): Flush the completion cache between uses.

Not sure what you mean, but the behavior is not fixed for me.
I still get exactly the same behavior I reported, even with Emacs
builds from only a few days ago.

> I.e., the behaviour is now described by
> 
> > If I instead first type `l' (as in `ls') and then hit TAB, I get
> > [No match].  It doesn't seem to matter what I type in the minibuffer:
> > TAB always says [No match].
> 
> which seems to be irreproachable in the light of (1) above.

Dunno what that means, but that is still the behavior I see: there
is no completion for `M-x man'.

> The behaviour is different in the latter case because `man -k ^l'
> sends a message "^l: nothing appropriate" to stdout, so "^l" is
> collected as a possible man page name, but since this string is
> not a completion of the "l" prefix it is discarded, after all.
> 
> The description above holds true for Gnu or Gnu/* but it is a lie on
> other systems, where the output of `man -k l' is collected instead,
> so you would still presented with "l:" as a possible completion.
> 
> Now, this can happen on correctly installed systems as well (if you
> happen to search for a prefix which doesn't match any substring in
> the summary database), so by setting `Man-man-k-use-anchor' to nil
> on some of those systems which are likely to use the man-1.* package
> without correcting the bug described in (2) above I introduced a
> regression.
> 
> It seems (http://cygwin.com/packages/) that man-1.* is the man
> package provided by default in cygwin, but I suppose cygwin
> packages could also be used with a non-cygwin emacs?  Would it
> be reasonable to set the default for `Man-man-k-use-anchor' to
> non-nil if the system type is `cygwin' or `windows-nt' or
> `ms-dos'?

I am using MS Windows 7, and I have Cygwin installed.  FWIW, I
tried setting `Man-man-k-use-anchor' to `t', but that changed
nothing, AFAICT.  `M-x man' works normally, except that there is
no completion - completion is broken.





  reply	other threads:[~2014-02-15 19:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:45 bug#16722: 24.3.50; `M-x man' does not handle case appropriately Drew Adams
2014-02-15 17:17 ` Wolfgang Jenkner
2014-02-15 19:55   ` Drew Adams [this message]
2014-02-16  0:28     ` Wolfgang Jenkner
2014-02-16  3:04       ` Drew Adams
2014-02-15 20:54   ` Eli Zaretskii
2014-02-16  1:08     ` Wolfgang Jenkner
2014-02-16  3:50       ` Eli Zaretskii
2014-02-16 14:17         ` Wolfgang Jenkner
2017-02-01 19:25           ` Drew Adams
2017-02-01 19:50             ` Eli Zaretskii
2017-02-02  1:08             ` npostavs
2020-09-25 10:21         ` Lars Ingebrigtsen
2020-09-25 11:29           ` Eli Zaretskii
2020-09-25 11:36             ` Lars Ingebrigtsen
     [not found] <<bc83b9db-228c-4eb1-893a-9672bb376a4f@default>
     [not found] ` <<85fvnkwarc.fsf@iznogoud.viz>
     [not found]   ` <<834n40ayg4.fsf@gnu.org>
     [not found]     ` <<858utbkgof.fsf@iznogoud.viz>
     [not found]       ` <<831tz3btr8.fsf@gnu.org>
     [not found]         ` <<85ob27ywed.fsf@iznogoud.viz>
     [not found]           ` <<c7667a78-58ba-4e9a-8eb9-c86727395b79@default>
     [not found]             ` <<831svhwv0z.fsf@gnu.org>
2017-02-01 22:36               ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512c4f71-4f67-4f36-8e1d-d756ad446d2e@default \
    --to=drew.adams@oracle.com \
    --cc=16722@debbugs.gnu.org \
    --cc=wjenkner@inode.at \
    /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.