Giter Club home page Giter Club logo

Comments (18)

kaushalmodi avatar kaushalmodi commented on June 19, 2024

What is your OS?

I am on GNU/Linux type system: RHEL 6.8 and the same man page show up fine in eless too:

image

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

Your screenshot looks similar to the one in an earlier issue: #27.

Based off the long debug in that thread, this was the solution: https://eless.scripter.co/#example-eless-config-in-bash [don't set PAGER to eless for man pages on OSX (I am assuming you have that OS)].

from eless.

arkhan avatar arkhan commented on June 19, 2024

Hello @kaushalmodi, I am using archlinux and emacs 27

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

hmm.. even then, does PAGER=less man -P eless argv work for you (instead of PAGER=eless man argv)?

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

If that doesn't help, then please provide debug info using the -D switch as explained here: https://eless.scripter.co/#how-to-help-debug.

from eless.

arkhan avatar arkhan commented on June 19, 2024

PAGER=less man -P eless argv

No, I get the same result

from eless.

arkhan avatar arkhan commented on June 19, 2024

If that doesn't help, then please provide debug info using the -D switch as explained here: https://eless.scripter.co/#how-to-help-debug.

I have this:
img-2019-07-30-220656

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

I am seeing the same value of first_line_piped_data ..

km²~/temp/:> (setenv PAGER "eless -D"; man argv)                                                                                                                                             07/30 11:18pm
Eless Version v0.5
https://github.com/kaushalmodi/eless/tree/v0.5
DEBUG: Piped data file : /tmp/emacs-stdin-kmodi.p5p8VwX
DEBUG: --> Input from pipe/file
DEBUG:     Output to terminal -->
DEBUG: var : -D
DEBUG: Raw Args                       : -D
DEBUG: Emacs Args                     : -nw
DEBUG: Pipe Contents (up to 10 lines) : tclvars(n)                   Tcl Built-In Commands                  tclvars(n)



_______________________________________________________________________________________________________________________________________________________________________________________

NAME
       argc,  argv,  argv0, auto_path, env, errorCode, errorInfo, tcl_interactive, tcl_library, tcl_nonwordchars, tcl_patchLevel, tcl_pkgPath, tcl_platform, tcl_precision, tcl_rcFile-
       Name, tcl_traceCompile, tcl_traceEval, tcl_wordchars, tcl_version - Variables used by Tcl
_______________________________________________________________________________________________________________________________________________________________________________________
DEBUG: first_line_piped_data = tclvars(n)                   Tcl Built-In Commands                  tclvars(n)
DEBUG: Man Page = tclvars(n)
DEBUG: Eless Command : emacs_Q_view_mode                          -nw                          --eval '(progn
                                   (man "tclvars(n)")
                                   ;; Below workaround is only for emacs 24.5.x and older releases
                                   ;; where the man page takes some time to load.
                                   ;; 1-second delay before killing the *scratch* window
                                   ;; seems to be sufficient
                                   (when (version<= emacs-version "24.5.99")
                                      (sit-for 1))
                                   (delete-window))'
DEBUG: Args passed to emacs_Q_view_mode : -nw --eval (progn
                                   (man "tclvars(n)")
                                   ;; Below workaround is only for emacs 24.5.x and older releases
                                   ;; where the man page takes some time to load.
                                   ;; 1-second delay before killing the *scratch* window
                                   ;; seems to be sufficient
                                   (when (version<= emacs-version "24.5.99")
                                      (sit-for 1))
                                   (delete-window))

.. but you are getting "No man page or info manual detected."

So, let's try this.. what do you get when you run the below bash script (it's an excerpt of what I use in eless to detect if man command is called)?

#!/usr/bin/env bash
perl --version | grep 'perl.*version'

first_line_piped_data="tclvars(n)                   Tcl Built-In Commands                  tclvars(n)"
man_page=$(echo "${first_line_piped_data}" \
               | perl -ne '/^([A-Za-z0-9-_]+\([a-z0-9]+\))(?=\s+.*?\1$)/ and print $1' \
               | perl -pe 's/bash_builtins/builtins/i' \
               | perl -pe 's/xsel\(1x\)/xsel/i' \
               | perl -pe 's/^[A-Z0-9-_()]+$/\L$_/' \
               || true)
echo "Man page = ${man_page}"

The output I get is:

This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux
Man page = tclvars(n)

from eless.

arkhan avatar arkhan commented on June 19, 2024

@kaushalmodi, I get this:

This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-thread-multi
Man page = tclvars(n)

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

@arkhan

To what I said in my previous comment:

I am seeing the same value of first_line_piped_data

I see that your first_line_piped_data is wrapping around.. is that wrapping because of terminal width or does that line actually break with a newline?

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

@arkhan Can you share the first 10 lines of your "piped data file" to a gist or ix.io or just paste it here in a code block while preserving all whitespaces and newlines .. the file path following:

DEBUG: Piped data file : ..

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

Also can you edit your copy of eless and add the below debug line after these lines:

eless/eless

Lines 553 to 558 in 0065c3b

man_page=$(echo "${first_line_piped_data}" \
| perl -ne '/^([A-Za-z0-9-_]+\([a-z0-9]+\))(?=\s+.*?\1$)/ and print $1' \
| perl -pe 's/bash_builtins/builtins/i' \
| perl -pe 's/xsel\(1x\)/xsel/i' \
| perl -pe 's/^[A-Z0-9-_()]+$/\L$_/' \
|| true)

.. add

debug "man_page = ${man_page}"

Run the same command with -D and this time, please paste the whole text output here between

```
```

instead of pasting the screenshot.

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

And finally, can you also paste the output of:

/usr/bin/env bash --version

Mine is:

GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

I recently added few more debug commands to eless.

So please update your eless version to the HEAD of the master branch, and paste the output of your eless command with the -D switch within triple backquotes in this thread.

from eless.

arkhan avatar arkhan commented on June 19, 2024

Update eless and now I get this:

img-2019-08-01-082946

img-2019-08-01-082903

Thanks

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024
  1. Does evaluating (man "tclvars(n)") in an emacs -Q work for you [I just tested that and it works for me]? As you see in your screenshot, that's exactly what eless does.
  2. Do you want to try PAGER="eless -D" man grep? (and please paste the ascii text from the terminal instead of pasting the image; that would allow me to quickly copy/paste stuff from there if I need).

Also, what changed on your system? Earlier you got "No man page or info man detected", and now you get "Man page = tclvars(n)". There was no change with man page detection in the recent eless update.

from eless.

arkhan avatar arkhan commented on June 19, 2024

Whit (man "tclvars(n)") get this
img-2019-08-01-085957

But PAGER="eless -D" man grep works
img-2019-08-01-090056

from eless.

kaushalmodi avatar kaushalmodi commented on June 19, 2024

.. so it looks like you do not have tclvars in your MANPATH? Does a simple man tclvars (without eless) work for you?

If you try to view arbitrary man pages like:

  • PAGER="eless -D" man grep
  • PAGER="eless -D" man ls
  • PAGER="eless -D" man tclvars

and for tclvars, if eless is actually trying to do (man "tclvars(n)") and if that doesn't work, then the problem seems to be outside emacs and eless. What do you think?

from eless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.