Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

[emacs] perldoc on windows (update)

by LanX (Saint)
on Mar 23, 2018 at 14:52 UTC ( [id://1211610]=perlquestion: print w/replies, xml ) Need Help??

LanX has asked for the wisdom of the Perl Monks concerning the following question:

Hi

before I reinvent the wheel:

...cperl-mode comes with a lot of options to show perldocs, but requires external unix tools like man and nroff to work, which is a problem on Win without cygwin.

I'm hacking something with pod2man and woman.el (emacs built-in interpretation of nroff output), but probably someone allready knows a drop-in replacement which works generally?

Disclaimer:

This thread is intended for Emacs users programming Perl.

I'm not interested to explain or defend the basics of an Integrated Development Environment to non-believers.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re: [emacs] perldoc on windows
by Discipulus (Canon) on Mar 23, 2018 at 16:13 UTC
    Hello LanX,

    dunno if useful but UnxUtils has a working man not a nroff although.

    To see documentation I use Jenda's macro  pdoc=perldoc -o html -T -w index $* > %TEMP%\perldoc_temp.html && start %TEMP%\perldoc_temp.html Maybe you can spawn an html page and stop.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      Thanks, but spawning a browser to show an html-page is already easy, I use it to inspect the POD of the files I'm editing.

      Having the perldoc directly in another Emacs pane without switching the application has many advantages:

      • you can edit the file directly, for instance search and cut and paste code examples from a module
      • I can build keyboard-macros which use this text
      • you get an index inside imenu to navigate it
      • this imenu index is shown in a left pane for navigation when ECB or similar is activated
      • auto-expansion like dabbrev-expand is parsing the man buffer for possible expansions
      • revisiting the man-page is faster if the man-buffer already exists inside emacs
      • the internal window-management sparse me from adjusting the browser and editor window
      • ... (certainly forgot to mention other stuff)

      Additionally does cperl-mode come with more DWIM logic, like cperl-perldoc-at-point which reads the word under the cursor and automatically calls perldoc -f <word> instead of perldoc <word> if it's a function.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Wikisyntax for the Monastery

Re: [emacs] perldoc on windows
by fishmonger (Chaplain) on Mar 23, 2018 at 15:28 UTC

    What's wrong with using perldoc which comes with perl, even on Windows?

      I want the full IDE integration without needing to switch to the console and copy and paste the name of the doc.

      update

      and perldoc is using Win's |more as pager, which is quite ... "rudimentary".

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Wikisyntax for the Monastery

        Regarding the update: To get around the Win 'more', you can invoke 'M-x shell-command perldoc ...' to get the results in an emacs buffer. No console required, but either copypasting names or wrapping shell-command into an emacs macro are needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1211610]
Approved by marto
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found