From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#16722: 24.3.50; `M-x man' does not handle case appropriately Date: Wed, 01 Feb 2017 20:08:48 -0500 Message-ID: <87shnxpffj.fsf@users.sourceforge.net> References: <85fvnkwarc.fsf@iznogoud.viz> <834n40ayg4.fsf@gnu.org> <858utbkgof.fsf@iznogoud.viz> <831tz3btr8.fsf@gnu.org> <85ob27ywed.fsf@iznogoud.viz> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485997699 31895 195.159.176.226 (2 Feb 2017 01:08:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 01:08:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Wolfgang Jenkner , 16722@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 02:08:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ5sf-0007wj-R8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 02:08:10 +0100 Original-Received: from localhost ([::1]:53727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ5sl-0004Q8-5z for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 20:08:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ5sc-0004OT-2y for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 20:08:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ5sY-00011Q-UP for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 20:08:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZ5sY-00011E-Qc for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 20:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZ5sY-0000nY-JC for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 20:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Feb 2017 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16722 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16722-submit@debbugs.gnu.org id=B16722.14859976673047 (code B ref 16722); Thu, 02 Feb 2017 01:08:02 +0000 Original-Received: (at 16722) by debbugs.gnu.org; 2 Feb 2017 01:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:53720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ5sI-0000my-O4 for submit@debbugs.gnu.org; Wed, 01 Feb 2017 20:07:46 -0500 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:32944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ5sH-0000mg-93; Wed, 01 Feb 2017 20:07:45 -0500 Original-Received: by mail-it0-f67.google.com with SMTP id e137so4336500itc.0; Wed, 01 Feb 2017 17:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=We1PPePsbaHm6ziFOTGE4DlUQev5FxMrQzTrZvqkG3g=; b=sqnUmhMJzJ3pxnvQZNs73LQd9NC67DF/Ln0VZNP5NheTDNPnib3we0HSH/on9BIwtd LICXkz5B2DBRroTZ4PvJRY75RYBY5ySW/puBFrYI37Zb+K2iH/AgklbCkTN1KjB4Cvio eBsavjcIXhWOcMLnmJqZ4DqTy6eHo+qkZH3G33fVBCRBkAtB59pOhiaVpXwAXTUW8Ws3 gps5Cj2k/x2x2vql1oZ1EUDmUeXYKKUPjA6rIkT1Uqb4MYEdmSQFpNXCsQubjsUX+3vT 1SIBVxmNkL1+x0EWTljfaD8daY0QTa4/Wn6ysZNvb1aEx9B7aafYfGZ0iX/JK3yOebn0 872Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=We1PPePsbaHm6ziFOTGE4DlUQev5FxMrQzTrZvqkG3g=; b=jfGtFsAusREYmm8V/IN+CP8BDQXyH6aw7/Bg+Z6A0PvhuP8cFF9vA8liKybIfNPs3k x0163XMqMekljD+gt9Z6/gwsPivED/xlufaPvdGJcO5f1tazKphbDIQ8yhyrfd3aXOIu /yuBZsYAsATtzqMspUEWRUCo7c1ncisym+LIEHb8FKdQpZEsnwx+Stt4z1C9zu1ACsVX uB7TjX1kPpXcwo1v/yu/xSmRbvVz5HQ3J6FgyPEGa11m4ZXsx2ivkeNym3eMEsSkcanB Ao/scDpEloa+4OR5zgPT0MPS68dDDWYEZF6CUxBp3L/W9jiaVdBDWrOYfimakSH8EUqQ +gmA== X-Gm-Message-State: AIkVDXK2hAcULRpEX6lNTYR/3UMtjghx1IdUTqeWcKCgYZBNto93iSc2MnvBITCOr/etXA== X-Received: by 10.36.2.1 with SMTP id 1mr25965316itu.10.1485997659691; Wed, 01 Feb 2017 17:07:39 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id v197sm156650ita.2.2017.02.01.17.07.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Feb 2017 17:07:38 -0800 (PST) In-Reply-To: (Drew Adams's message of "Wed, 1 Feb 2017 11:25:43 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128878 Archived-At: retitle 16722 [(old?) cygwin] `M-x man' completion doesn't handle broken `man -k' gracefully quit I found this post from 2014 explaining that the man package is replaced by man-db, so the correct incantation is now `mandb' or `mandb -c' for the first time. https://cygwin.com/ml/cygwin/2014-07/msg00015.html https://cygwin.com/faq/faq.html#faq.using.man I can't reproduce the problem here, as my cygwin's man -k prints only to stderr in this case. Does checking exit status help? --- i/lisp/man.el +++ w/lisp/man.el @@ -890,15 +890,18 @@ Man-completion-table ;; run differently in Man-getpage-in-background, an error ;; here may not necessarily mean that we'll also get an ;; error later. - (ignore-errors - (call-process manual-program nil '(t nil) nil - "-k" (concat (when (or Man-man-k-use-anchor - (string-equal prefix "")) - "^") - prefix)))) - (setq table (Man-parse-man-k))) + (when (eq 0 + (ignore-errors + (call-process + manual-program nil '(t nil) nil + "-k" (concat (when (or Man-man-k-use-anchor + (string-equal prefix "")) + "^") + prefix)))) + (setq table (Man-parse-man-k))))) ;; Cache the table for later reuse. - (setq Man-completion-cache (cons prefix table))) + (when table + (setq Man-completion-cache (cons prefix table)))) ;; The table may contain false positives since the match is made ;; by "man -k" not just on the manpage's name. (if section