unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6013: [cperl-mode] cperl-perldoc doesn't work anymore with file test operators like -e
@ 2010-04-23 11:16 LanX
  2019-07-05 19:10 ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: LanX @ 2010-04-23 11:16 UTC (permalink / raw)
  To: 6013

[-- Attachment #1: Type: text/plain, Size: 4187 bytes --]

Hi

cperl-mode can't call perldocs for functions with a hyphen anymore like "-e"
or "-X"

(cperl-perldoc "-e") or "M-x cperl-perldoc RET -e" result to
   "error in process sentinel: Man-bgproc-sentinel: Can't find the -e
manpage"

But perldoc -f -e works fine in the shell, and as far as I can see from the
sources of cperl-mode "-e" this case is covered to be mapped on the -f
switch.

Tested on 23 and 22 from two different users on different continents.

Cheers
  Rolf




In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-10-13 on nc10-ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  '--prefix=/home/lanx/lib/emacs-cvs''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: CPerl

Minor modes in effect:
  hideshowvis-minor-mode: t
  show-paren-mode: t
  cua-mode: t
  desktop-save-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Recent input:
y C-x C-b <help-echo> <help-echo> <down-mouse-1> <mouse-2>
M-x c p e r l <tab> p e r <tab> <return> - e <return>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>

Recent messages:
OVERVIEW
Desktop: 4 buffers restored, 1 failed to restore.
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Invoking perldoc -e in the background
Please wait: formatting the -e man page...
-e man page formatted
error in process sentinel: Man-bgproc-sentinel: Can't find the -e manpage
error in process sentinel: Can't find the -e manpage
call-interactively: End of buffer [2 times]

Load-path shadows:
None found.

Features:
(shadow mail-extr message ecomplete rfc822 mml mml-sec password-cache
mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045
qp ietf-drums mailabbrev gmm-utils mailheader canlock sha1 hex-util
hashcash emacsbug sendmail regexp-opt man assoc etags org-wl org-w3m
org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html
org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb
org byte-opt bytecomp byte-compile org-footnote org-src org-list
org-faces org-compat org-macs dabbrev cperl-mode hideshowvis saveplace
uniquify paren gnus gnus-ems nnheader gnus-util netrc time-date
mail-utils mm-util mail-prsvr wid-edit cua-base cus-start cus-load
desktop fold-dwim hideshow noutline outline generic-x advice help-fns
help-mode easymenu view advice-preload regex-tool derived cl cl-19
tabbar easy-mmode edmacro kmacro winner ring server tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process gtk x-toolkit x
multi-tty emacs)

[-- Attachment #2: Type: text/html, Size: 4953 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#6013: [cperl-mode] cperl-perldoc doesn't work anymore with file test operators like -e
  2010-04-23 11:16 bug#6013: [cperl-mode] cperl-perldoc doesn't work anymore with file test operators like -e LanX
@ 2019-07-05 19:10 ` Stefan Kangas
  2019-07-13  7:41   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2019-07-05 19:10 UTC (permalink / raw)
  To: LanX; +Cc: 6013

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

tags 6013 patch
thanks

LanX <lanx.perl@googlemail.com> writes:

> Hi
>
> cperl-mode can't call perldocs for functions with a hyphen anymore like "-e" or "-X"
>
> (cperl-perldoc "-e") or "M-x cperl-perldoc RET -e" result to
>    "error in process sentinel: Man-bgproc-sentinel: Can't find the -e manpage"
>
> But perldoc -f -e works fine in the shell, and as far as I can see from the sources of cperl-mode "-e" this case is covered to be mapped on the -f switch.
>
> Tested on 23 and 22 from two different users on different continents.
>
> Cheers
>   Rolf

I can confirm this bug, and have attached a fix.

This is tested only on one continent.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Fix-looking-up-functions-like-e-in-cperl-mode.patch --]
[-- Type: text/x-patch, Size: 902 bytes --]

From 0025bfde027cbcd2d1fee6f0b9429a84c4770ac2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 5 Jul 2019 20:53:53 +0200
Subject: [PATCH] Fix looking up functions like "-e" in cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-perldoc): Handle functions with
leading dash (e.g. "-f"). (Bug#6013)
---
 lisp/progmodes/cperl-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 254269ddf1..6970b5ec84 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8382,7 +8382,7 @@ cperl-perldoc
   (require 'man)
   (let* ((case-fold-search nil)
 	 (is-func (and
-		   (string-match "^[a-z]+$" word)
+		   (string-match "^\\(-[A-Za-z]\\|[a-z]+\\)$" word)
 		   (string-match (concat "^" word "\\>")
 				 (documentation-property
 				  'cperl-short-docs
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#6013: [cperl-mode] cperl-perldoc doesn't work anymore with file test operators like -e
  2019-07-05 19:10 ` Stefan Kangas
@ 2019-07-13  7:41   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2019-07-13  7:41 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 6013-done, lanx.perl

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 5 Jul 2019 21:10:28 +0200
> Cc: 6013@debbugs.gnu.org
> 
> LanX <lanx.perl@googlemail.com> writes:
> 
> > Hi
> >
> > cperl-mode can't call perldocs for functions with a hyphen anymore like "-e" or "-X"
> >
> > (cperl-perldoc "-e") or "M-x cperl-perldoc RET -e" result to
> >    "error in process sentinel: Man-bgproc-sentinel: Can't find the -e manpage"
> >
> > But perldoc -f -e works fine in the shell, and as far as I can see from the sources of cperl-mode "-e" this case is covered to be mapped on the -f switch.
> >
> > Tested on 23 and 22 from two different users on different continents.
> >
> > Cheers
> >   Rolf
> 
> I can confirm this bug, and have attached a fix.

Thanks, pushed to the master branch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-13  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-23 11:16 bug#6013: [cperl-mode] cperl-perldoc doesn't work anymore with file test operators like -e LanX
2019-07-05 19:10 ` Stefan Kangas
2019-07-13  7:41   ` Eli Zaretskii

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).