Comments (18)
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:
from eless.
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.
Hello @kaushalmodi, I am using archlinux and emacs 27
from eless.
hmm.. even then, does PAGER=less man -P eless argv
work for you (instead of PAGER=eless man argv
)?
from eless.
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.
PAGER=less man -P eless argv
No, I get the same result
from eless.
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.
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.
@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.
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.
@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.
Also can you edit your copy of eless and add the below debug line after these lines:
Lines 553 to 558 in 0065c3b
.. 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.
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.
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.
Update eless and now I get this:
Thanks
from eless.
- 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. - 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.
Whit (man "tclvars(n)")
get this
But PAGER="eless -D" man grep
works
from eless.
.. 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)
- Make eless run on emacs 22.1 HOT 17
- Get emacs binary name from an env var HOT 2
- Replace sed -r s/foo/bar/I with BSD compatible equivalent HOT 2
- Fix building using "make all" on macOS HOT 12
- Invalid regex: "Invalid regular expression" error on macOS HOT 15
- Test various eless usage scenarios on Travis
- man pages are not readable on macOS HOT 79
- Support Perl man pages HOT 2
- Default theme HOT 2
- Installation instructions HOT 17
- View multiple files in sequence with eless HOT 1
- Document how markdown-mode can be installed to use eless as CLI md viewer
- Make the test for info .. | eless work on Travis HOT 3
- Customize faces HOT 3
- `make install` fails without meaningful error message if makeinfo is not installed HOT 2
- Error when filename has parentheses HOT 3
- Reconsider emacs dependency for brew formula HOT 3
- How can I use eless in vterm? HOT 1
- passing updated man page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eless.