GNU bug report logs - #53590
28.0.91; icompletion-vertical-mode gets stuck on 'M-x man RET awk'

Previous Next

Package: emacs;

Reported by: Van Ly <van.ly <at> sdf.org>

Date: Thu, 27 Jan 2022 22:37:01 UTC

Severity: normal

Found in version 28.0.91

To reply to this bug, email your comments to 53590 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Thu, 27 Jan 2022 22:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Van Ly <van.ly <at> sdf.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Jan 2022 22:37:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x man RET awk'
Date: Thu, 27 Jan 2022 22:36:39 +0000 (UTC)
[Message part 1 (text/plain, inline)]
When the icompletion-vertical-mode setting is on, looking up a manpage
feels unresponsive, for example, looking up 'awk' echoes 'a' in the
minibuffer at the 'Manual entry:' prompt, then finds
'awk [No matches]' but shows the manpage on RET.

When completion-styles is

> (basic partial-completion emacs22)

# steps to reproduce behavior
* start by 'emacs -Q'
* customize 'icompletion-vertical-mode' to enable for session
* type 'M-x man RET awk'

# observed behavior
# minibuffer at 'Manual entry:' prompt
* shows 'a' of awk and is unresponsive, then 'awk [No matches]' shows
* awk RET shows *Man awk* AWK(1) page

# expected behavior
# minibuffer at 'Manual entry:' prompt
* progressively shows 'a' 'aw' 'awk' while typing
* progressively shows icompletion-vertical-mode suggestions
* awk RET shows *Man awk* AWK(1) page

-- 
vl
[bug-gnu-emacs-28.0.91--netbsd-amd64.text (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 08:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91;
 icompletion-vertical-mode gets stuck on 'M-x man RET awk'
Date: Fri, 28 Jan 2022 10:05:14 +0200
> Date: Thu, 27 Jan 2022 22:36:39 +0000 (UTC)
> From: Van Ly <van.ly <at> sdf.org>
> 
> When the icompletion-vertical-mode setting is on, looking up a manpage
> feels unresponsive, for example, looking up 'awk' echoes 'a' in the
> minibuffer at the 'Manual entry:' prompt, then finds
> 'awk [No matches]' but shows the manpage on RET.
> 
> When completion-styles is
> 
> > (basic partial-completion emacs22)
> 
> # steps to reproduce behavior
> * start by 'emacs -Q'
> * customize 'icompletion-vertical-mode' to enable for session
> * type 'M-x man RET awk'
> 
> # observed behavior
> # minibuffer at 'Manual entry:' prompt
> * shows 'a' of awk and is unresponsive, then 'awk [No matches]' shows
> * awk RET shows *Man awk* AWK(1) page
> 
> # expected behavior
> # minibuffer at 'Manual entry:' prompt
> * progressively shows 'a' 'aw' 'awk' while typing
> * progressively shows icompletion-vertical-mode suggestions
> * awk RET shows *Man awk* AWK(1) page

I cannot reproduce this: it works for me as expected.  Are you sure
"M-x man" on your system is capable of completion in the default
completion mode in "emacs -Q"?  If not, maybe your man-db database is
missing or outdated?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 14:54:01 GMT) Full text and rfc822 format available.

Message #11 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 14:53:16 +0000 (UTC)
[Message part 1 (text/plain, inline)]
On Fri, 28 Jan 2022, Eli Zaretskii wrote:

>> Date: Thu, 27 Jan 2022 22:36:39 +0000 (UTC)
>> From: Van Ly <van.ly <at> sdf.org>
>>
>> When completion-styles is
>>
>>> (basic partial-completion emacs22)
>>
>> # steps to reproduce behavior
>> * start by 'emacs -Q'
>> * customize 'icompletion-vertical-mode' to enable for session
>> * type 'M-x man RET awk'
>>
>> # observed behavior
>> # minibuffer at 'Manual entry:' prompt
>> * shows 'a' of awk and is unresponsive, then 'awk [No matches]' shows
>> * awk RET shows *Man awk* AWK(1) page
>>

>
> I cannot reproduce this: it works for me as expected.  Are you sure
> "M-x man" on your system is capable of completion in the default
> completion mode in "emacs -Q"?  If not, maybe your man-db database is
> missing or outdated?
>

On NetBSD the output from apropos is different in format to the one 
on GNU/Linux.  Could that be why the behavior is stuck?

My system runs "emacs -Q" and the following "M-x man RET a TAB" also 
gets stuck, and this is without attempting to set 
icomplete-vertical-mode.

On GNU/Linux, I observe the expected behavior you see.

On NetBSD, the system release is 9.2 and up to date to pkgsrc-2021Q4.

-- 
vl

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 15:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 17:15:42 +0200
> Date: Fri, 28 Jan 2022 14:53:16 +0000 (UTC)
> From: Van Ly <van.ly <at> sdf.org>
> cc: 53590 <at> debbugs.gnu.org
> 
> > I cannot reproduce this: it works for me as expected.  Are you sure
> > "M-x man" on your system is capable of completion in the default
> > completion mode in "emacs -Q"?  If not, maybe your man-db database is
> > missing or outdated?
> >
> 
> On NetBSD the output from apropos is different in format to the one 
> on GNU/Linux.  Could that be why the behavior is stuck?

Could be, but why are you looking at "apropos"?  AFAIU, man.el uses
"man -k", and there are various attempts to adapt to some systems, see
Man-man-k-use-anchor.  Maybe NetBSD needs to be handled like kfreebsd?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 19:24:02 GMT) Full text and rfc822 format available.

Message #17 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 19:23:43 +0000 (UTC)
[Message part 1 (text/plain, inline)]
On Fri, 28 Jan 2022, Eli Zaretskii wrote:

>> Date: Fri, 28 Jan 2022 14:53:16 +0000 (UTC)
>> From: Van Ly <van.ly <at> sdf.org>
>> cc: 53590 <at> debbugs.gnu.org
>>
>>>                                                        Are you sure
>>> "M-x man" on your system is capable of completion in the default
>>> completion mode in "emacs -Q"?  If not, maybe your man-db database is
>>> missing or outdated?
>>>
>>
>> On NetBSD the output from apropos is different in format to the one
>> on GNU/Linux.  Could that be why the behavior is stuck?
>
> Could be, but why are you looking at "apropos"?

I used "apropos" in the environment outside of GNU Emacs as a test
that man-db database is working.

>                                                  AFAIU, man.el uses
> "man -k", and there are various attempts to adapt to some systems, see
> Man-man-k-use-anchor.  Maybe NetBSD needs to be handled like kfreebsd?
>

Looking at /etc/man.conf (attached see), I have two lines as follows:

> plan9 /usr/local/plan9/man/
> heirloom /usr/pkg/heirloom-doctools/man

Maybe that missing final forward slash is a problem.

Thanks, I will look up:

* man.el
* Man-man-k-use-anchor

Maybe NetBSD wants to be handled like kfreebsd, as you say.

-- 
vl
[man.conf (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 19:53:01 GMT) Full text and rfc822 format available.

Message #20 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 19:52:29 +0000 (UTC)
[Message part 1 (text/plain, inline)]
On Fri, 28 Jan 2022, Eli Zaretskii wrote:

>> Date: Fri, 28 Jan 2022 14:53:16 +0000 (UTC)
>> From: Van Ly <van.ly <at> sdf.org>
>> cc: 53590 <at> debbugs.gnu.org
>>
>>>                                 If not, maybe your man-db database is
>>> missing or outdated?
>>>

I tried rebuilding the man-db and there were errors.  Attached see. 
The fault could be outside of GNU Emacs as you suggest.

I used "makemandb -f" after updating /etc/man.conf to use final 
forward slash in lines like:

> plan9 /usr/local/plan9/man/
> heirloom /usr/pkg/heirloom-doctools/man/

-- 
vl
[makemandb-out.text (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 20:05:02 GMT) Full text and rfc822 format available.

Message #23 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 22:03:46 +0200
> Date: Fri, 28 Jan 2022 19:52:29 +0000 (UTC)
> From: Van Ly <van.ly <at> sdf.org>
> cc: 53590 <at> debbugs.gnu.org
> 
> I tried rebuilding the man-db and there were errors.  Attached see. 
> The fault could be outside of GNU Emacs as you suggest.
> 
> I used "makemandb -f" after updating /etc/man.conf to use final 
> forward slash in lines like:
> 
> > plan9 /usr/local/plan9/man/
> > heirloom /usr/pkg/heirloom-doctools/man/

I'm not sure this is relevant.  I suggest to step through the code in
Man-parse-man-k and see what happens there.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Fri, 28 Jan 2022 21:23:01 GMT) Full text and rfc822 format available.

Message #26 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Fri, 28 Jan 2022 21:22:13 +0000 (UTC)
[Message part 1 (text/plain, inline)]
On Fri, 28 Jan 2022, Eli Zaretskii wrote:

>
>                                 I suggest to step through the code in
> Man-parse-man-k and see what happens there.
>

I will do that.

Some more observations:

# outside GNU Emacs on the NetBSD command prompt
'''
% man -k awk
awk (1)   pattern-directed scanning and processing language
awk is the Bell Labs' implementation of the AWK programming language as described in the The AWK Programming Language by A. V. Aho, B. W. Kernighan, and P. J. Weinberger. awk scans each input file for lines that match any...

awk (1)   pattern-directed scanning and processing language
...are global. Thus local variables may be created by providing excess parameters in the function definition. /src/cmd/awk A. V. Aho, B. W. Kernighan, P. J. Weinberger, The AWK Programming Language, Addison-Wesley, 1988.  ISBN 0-201-07981-X

English (3)       use nice English (or awk) names for ugly punctuation variables
use nice English (or awk) names for ugly punctuation variables

'''

# inside GNU Emacs on NetBSD
# M-x man RET -k awk RET
# *Man -k awk* buffer shows
'''
[1]   Segmentation fault      man -k awk 2>/dev/null |
      Done                    sed -e "/^[^A-^Z][^A-^Z]*\$/d" -e "//s///g" ... |
      Done                    awk "
 BEGIN { blankline=0; anonblank=0; }
 /^... 
'''

# inside GNU Emacs on GNU/Linux
# you can only type the following
# M-x man RET -k-awk
# that dash between "k" and "a" is forced in

-- 
vl

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Sat, 29 Jan 2022 06:48:01 GMT) Full text and rfc822 format available.

Message #29 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Sat, 29 Jan 2022 08:46:53 +0200
> Date: Fri, 28 Jan 2022 21:22:13 +0000 (UTC)
> From: Van Ly <van.ly <at> sdf.org>
> cc: 53590 <at> debbugs.gnu.org
> 
> # inside GNU Emacs on NetBSD
> # M-x man RET -k awk RET
> # *Man -k awk* buffer shows
> '''
> [1]   Segmentation fault      man -k awk 2>/dev/null |
>        Done                    sed -e "/^[^A-^Z][^A-^Z]*\$/d" -e "//s///g" ... |
>        Done                    awk "
>   BEGIN { blankline=0; anonblank=0; }
>   /^... 
> '''
> 
> # inside GNU Emacs on GNU/Linux
> # you can only type the following
> # M-x man RET -k-awk
> # that dash between "k" and "a" is forced in

Does the following command segfault when invoked from the shell outside
Emacs?

  man -k awk 2>/dev/null

If that command doesn't segfault, then what about the following one?

  man -k awk 2>/dev/null | cat




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Sat, 29 Jan 2022 19:11:02 GMT) Full text and rfc822 format available.

Message #32 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Sat, 29 Jan 2022 19:10:14 +0000 (UTC)
On Sat, 29 Jan 2022, Eli Zaretskii wrote:

>
> Does the following command segfault when invoked from the shell outside
> Emacs?
>
>  man -k awk 2>/dev/null
>

The above command runs and completes as is expected.  Each manpage 
keyword entry produces a multiple line output in brief.

> If that command doesn't segfault, then what about the following one?
>
>  man -k awk 2>/dev/null | cat
>

The above fails as follows:

'''
% man -k awk 2>/dev/null | cat
zsh: segmentation fault  man -k awk 2> /dev/null |
zsh: done                cat
% echo $SHELL
/usr/pkg/bin/zsh
'''

Maybe the output redirect pipeline syntax for zsh is causing trouble.

Further to the original description of the problem, typing "awk" 
after M-x man RET produces

> M-x man RET a

There is a low wait of less than 2min more than 30sec, then the 
minibuffer shows

> M-x man RET a [No matches]

The text cursor is behind the "a" and typing "wk" for the second time 
immediately echoes in the minibuffer and shows

> M-x man RET awk [No matches]

And, as I described initially, the text cursor is positioned between 
"k" and "[No matches]", I type RET and then the manpage for awk 
quickly displays.

-- 
vl





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Sat, 29 Jan 2022 19:32:02 GMT) Full text and rfc822 format available.

Message #35 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Sat, 29 Jan 2022 21:31:36 +0200
> Date: Sat, 29 Jan 2022 19:10:14 +0000 (UTC)
> From: Van Ly <van.ly <at> sdf.org>
> cc: 53590 <at> debbugs.gnu.org
> 
> >  man -k awk 2>/dev/null | cat
> >
> 
> The above fails as follows:
> 
> '''
> % man -k awk 2>/dev/null | cat
> zsh: segmentation fault  man -k awk 2> /dev/null |
> zsh: done                cat
> % echo $SHELL
> /usr/pkg/bin/zsh
> '''
> 
> Maybe the output redirect pipeline syntax for zsh is causing trouble.

Maybe.  Time for Unix shell gurus to chime in.  (And shouldn't
shell-file-name point to 'sh', not to your interactive shell?)  In any
case, this segfault seems to be a large part of the problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53590; Package emacs. (Sat, 29 Jan 2022 20:21:02 GMT) Full text and rfc822 format available.

Message #38 received at 53590 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53590 <at> debbugs.gnu.org
Subject: Re: bug#53590: 28.0.91; icompletion-vertical-mode gets stuck on 'M-x
 man RET awk'
Date: Sat, 29 Jan 2022 20:20:24 +0000 (UTC)
On Sat, 29 Jan 2022, Eli Zaretskii wrote:

>> Date: Sat, 29 Jan 2022 19:10:14 +0000 (UTC)
>> From: Van Ly <van.ly <at> sdf.org>
>> cc: 53590 <at> debbugs.gnu.org
>>
>> '''
>> % man -k awk 2>/dev/null | cat
>> zsh: segmentation fault  man -k awk 2> /dev/null |
>> zsh: done                cat
>> % echo $SHELL
>> /usr/pkg/bin/zsh
>> '''
>>
>> Maybe the output redirect pipeline syntax for zsh is causing trouble.
>
> Maybe.  Time for Unix shell gurus to chime in.  (And shouldn't
> shell-file-name point to 'sh', not to your interactive shell?)  In any
> case, this segfault seems to be a large part of the problem.
>

Setting shell-file-name to '/bin/sh' does not fix the M-x man delay 
before the [No matches] text appears in the minibuffer.

I should add to close this bug if it cannot be reproduced by someone 
on NetBSD 9.2 stable in data center grade environment on good 
hardware.

My hardware is a laptop, my SSD is 20% filled of 500Gb capacity and 
is older than two years.  The laptop is a 2006 Thinkpad x60.  I 
sometimes know how to configure the fan to keep it from reaching 
critical temperature and force shutting down.  At the moment I have 
forgotten how to.

'''
*** FINAL System shutdown message from root <at> charlie ***
System going down IMMEDIATELY

/etc/powerd/scripts/sensor_temperature: CRITICAL TEMPERATURE! 
SHUTTING DOWN.
'''

-- 
vl





This bug report was last modified 3 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.