Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any reason GUI mode is forced for man pages and the like? #3

Closed
itamarst opened this Issue Apr 25, 2017 · 9 comments

Comments

Projects
None yet
2 participants
@itamarst
Copy link

itamarst commented Apr 25, 2017

It'd be nice if eless could be set to always use console or alway use GUI, I found the seemingly random choice of one or the other confusing.

@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Apr 25, 2017

This has been fixed few minutes back (943a513).

Earlier the limitation was the emacs -Q -nw could not received input from the pipe. man always sends data to the end process like less ($PAGER) via a pipe. So the same limitation applied.

This has now been fixed. Please git pull again and let me know if it works.

could be set to always use console or alway use GUI,

Now by default, eless always opens in terminal mode. If you like to force GUI mode, pass the -gui switch.

@itamarst

This comment has been minimized.

Copy link
Author

itamarst commented Apr 25, 2017

With latest version for PAGER=eless man grep I am getting console emacs... but split into two panes.

@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Apr 25, 2017

mangrep

As we cannot pass the -D flag for eless directly to man grep, set PAGER to eless -D.

  • I do not see man started with split windows. What emacs version are you on? I am on the latest build of emacs.
  • Here is the debug info I get:
> man grep
--> Input from pipe/file
    Output to terminal -->
var : -D
Raw Args      : -D
Emacs Args    : -nw
Pipe Contents : GREP(1)                                                                GREP(1)
<snip -- The whole of grep man page>
Temp File : /tmp/emacs-stdin-kmodi.5MB8HSR
first_line_piped_data = GREP(1)                                                                GREP(1)
Man Page = GREP(1)
Eless Command : emacs_Q_view_mode                          -nw                          --eval '(progn
                                   (man (downcase "GREP(1)"))
                                   (delete-window)
                                 )'
Args passed to emacs_Q_view_mode : -nw --eval (progn
                                   (man (downcase "GREP(1)"))
                                   (delete-window)
                                 )
@itamarst

This comment has been minimized.

Copy link
Author

itamarst commented Apr 25, 2017

24.5.1. Running inside tmux. Here's output:

Temp File : /tmp/emacs-stdin-itamarst.w9IDUzm
first_line_piped_data = GREP(1)                                                                                     General Commands Manual                                                                                    GREP(1)
Man Page = GREP(1)
Eless Command : emacs_Q_view_mode                          -nw                          --eval '(progn
                                   (man (downcase "GREP(1)"))
                                   (delete-window)
                                 )'
Args in emacs_Q_view_mode : -nw --eval (progn
                                   (man (downcase "GREP(1)"))
                                   (delete-window)
                                 )
@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Apr 25, 2017

24.5.1

I sorted of guessed that. The good news is that this issue has long been fixed. I would suggest that you upgrade to the recently released emacs 25.2.

I verified that the issue you mentioned happens on 24.5, but not on 25.1.

I'll still try fixing this so that it behaves the same for emacs 24.5 too.

@itamarst

This comment has been minimized.

Copy link
Author

itamarst commented Apr 25, 2017

OK, thanks! I've been thinking about upgrading to latest Ubuntu, might be the excuse I need.

kaushalmodi added a commit that referenced this issue Apr 25, 2017

@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Apr 25, 2017

Let me know if this fixes the issue for you: 57668b7

@itamarst

This comment has been minimized.

Copy link
Author

itamarst commented Apr 25, 2017

Now it starts with two panes and then jumps into having only one after a moment. I should probably just upgrade to newer version of Emacs...

Thanks for the help, and for the neat tool!

@itamarst itamarst closed this Apr 25, 2017

@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Apr 25, 2017

Now it starts with two panes and then jumps into having only one after a moment.

Yeah, it's just a workaround.. I'll come back to this if I find a better way of fixing this.

Thanks for the help, and for the neat tool!

Glad to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.