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

Is there any ways to open help message horizontally from frame-root-window? #10164

Closed
Ailrun opened this issue Jan 16, 2018 · 8 comments

Comments

@Ailrun
Copy link

@Ailrun Ailrun commented Jan 16, 2018

Original emacs with enough window-width can split help buffer horizontally,
but in spacemacs it's not the case.

I tried #5140 but it didn't work. What I tried is following.

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
  (setq-default
   split-width-threshold 0
   split-height-threshold nil
   )
  )

Even with above code, help message splitted vertically in (and only in) frame-root-window.
What did makes this difference between pure emacs and spacemacs? Could anyone please help me....?

@Ailrun

This comment has been minimized.

Copy link
Author

@Ailrun Ailrun commented Jan 16, 2018

For additional information, I use spacemacs with emacs editing style.

@nixmaniack

This comment has been minimized.

Copy link
Contributor

@nixmaniack nixmaniack commented Jan 16, 2018

What do you mean by help message? Is it *Help* buffer or *Messages* buffer?

If you can provide sequence of commands that you're executing and the desire layout expected, it'd be easy to reproduce and provide a solution.

@Ailrun

This comment has been minimized.

Copy link
Author

@Ailrun Ailrun commented Jan 16, 2018

@nixmaniack I mean *Help*. Sorry for misselected words.

What I did is

  1. Install pure emacs (25.3.1)
  2. Install spacemacs by git clone
  3. Do initial settings as emacs editing mode
  4. Type C-h v exec-path
  5. Help buffer is splitted vertically.
  6. Add above settings
  7. Restart emacs
  8. Repeat 4, and get the same result.
@nixmaniack

This comment has been minimized.

Copy link
Contributor

@nixmaniack nixmaniack commented Jan 16, 2018

First of all *Help* buffer is a special case and it's handled through popwin. The relevant piece of code that configures this is here.

Secondly, if you're on develop branch, there was a regression in how these new help windows are arranged. If you are on latest code it's already fixed. Related PR #10140.

And lastly, I often get confused in emacs parlance with the words horizontal/vertical split because of how split-window-vertically and split-window-horizontally behave visually. So just want to make sure you mean following when you're saying can split help buffer horizontally

   +-----------+       +-----+-----+
   |           | -->   |     |     |
   |           |       |     |     |
   +-----------+       +-----+-----+

If yes, it works as expected on latest develop for me.

If helps if you use SPC h I to create issue which includes the basic information(branch/commit, editing style, layers used etc) required to debug issues. For now, could you add that information with SPC h d s.

@Ailrun

This comment has been minimized.

Copy link
Author

@Ailrun Ailrun commented Jan 16, 2018

@nixmaniack Yes. What I mean by horizontally is just the same thing what split-window-horizontally means.
I will try develop branch and add comments!
Thank you for your detail comment!

@Ailrun

This comment has been minimized.

Copy link
Author

@Ailrun Ailrun commented Jan 16, 2018

@nixmaniack It looks like works! Thank you for your help!

Could I ask one more thing?

What is the elegant way in spacemacs to change

(push '("*Help*" :dedicated t :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)

into

(push '("*Help*" :dedicated t :position right :stick t :noselect t :width 0.5) popwin:special-display-config)

?

What I try is

(defun dotspacemacs/user-config ()
  "Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
  (mapc
   (lambda (item)
     (if (string= (car item) "*Help*")
         (progn
           (plist-put (cdr item) :position 'right)
           (plist-put (cdr item) :height nil)
           (plist-put (cdr item) :width 0.5))))
   popwin:special-display-config)
  )

and it works, but I think it's quite crappy...

@nixmaniack

This comment has been minimized.

Copy link
Contributor

@nixmaniack nixmaniack commented Jan 16, 2018

Could I ask one more thing?

Indeed!

What is the elegant way in spacemacs to change

This was answered by bmag for exactly similar ask sometime back. I'll find and add the source.

(setcdr (assoc "*Help*" popwin:special-display-config)
        '(:dedicated t :position right :stick t :noselect t :width 0.5))

Edit:
Source: #6649 (comment)

@Ailrun

This comment has been minimized.

Copy link
Author

@Ailrun Ailrun commented Apr 11, 2018

It looks like I should close this. My problem is solved.

@Ailrun Ailrun closed this Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.