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

Add shell-pop-full-span to get a wide terminal #21

Merged
merged 1 commit into from Jul 14, 2014

Conversation

popoppo
Copy link
Collaborator

@popoppo popoppo commented Jul 13, 2014

Let me suggest 'shell-pop-full-span' as a new function.
It allows you to pop up a terminal which has the same width as your Emacs window.

I know it can also be done with 'full' mode,
but in many cases, I want to watch other frames while I'm using a terminal.

shell-pop-full-span is enabled with only adding a following line into your .emacs .

(setq shell-pop-full-span t)

What do you think about it?
Thank you for your consideration.

@kyagi
Copy link
Owner

kyagi commented Jul 13, 2014

Thank you for your suggestion. It's an interesting idea. I suppose you are thinking about having another terminal assuming the environment where X Window System runs.

I can show you below a quick and easy way to run another terminal from Emacs on Mac. (Sorry, I don't have any Linux environment now, but you can use start-process-shell-command or start-process function to invoke a program from Emacs.)

(defun quick-and-easy-way-to-run-another-terminal-on-mac ()
  (interactive)
  (start-process-shell-command "anotherTerminal" nil
    "open" "-n" "/Applications/Utilities/Terminal.app"))

Unfortunately, I haven't found a way to get the width and height of running applications on Mac yet, but I'm sure that the option is provided on X Window System in Linux environment. So, if we follow this way, I think that we can implement that expected function.

However, I'm afraid if this implementation would eventually fall into the traditional "kitchen sink" approach, against the Unix philosophy as "small but doing one thing well" way that I prefer to. It might be better to confine this hack to individual usage, I mean, on your .emacs only, if possible.

All the above is my opinion. Let me listen to other developers' ideas. Yoshida-san(@syohex), what do you think about this extension?

@kyagi
Copy link
Owner

kyagi commented Jul 13, 2014

Sorry! I totally overlooked your commit. I mistook this for just a suggestion without code. Let me look at diff attached.

@kyagi
Copy link
Owner

kyagi commented Jul 14, 2014

Let me check if I can understand your suggestion correctly. You would like to watch other frames while you are using a terminal on Emacs with shell-pop, would'nt you?

I wonder why I couldn't find the function that will create a new frame in your diff. I suppose there should be some functions like this:

(make-frame default-frame-alist)

Let me know if I got it wrong.

@syohex
Copy link
Collaborator

syohex commented Jul 14, 2014

@kyagi Looks good to me and this is useful feature.

And I suppose @popoppo uses word frame as Emacs window.
(Emacs terms about window and frame are little complicated for users)

@kyagi
Copy link
Owner

kyagi commented Jul 14, 2014

I now know what we are discussing. Sorry for my missing it.

shell-pop runs with multiple windows when (setq shell-pop-full-span nil)
nil-shell-pop-full-span
shell-pop runs with multiple windows when (setq shell-pop-full-span t)
t-shell-pop-full-span

@kyagi
Copy link
Owner

kyagi commented Jul 14, 2014

Yes, I agree that it is an useful feature. For users who always have multiple Emacs windows like the above, shell-pop should work in this way. Also, I've confirmed it worked well when Emacs has multiple vertical and horizontal windows. @popoppo, Thank you for this great contribution. 😄 👍

kyagi added a commit that referenced this pull request Jul 14, 2014
Add shell-pop-full-span to get a wide terminal
@kyagi kyagi merged commit 92bee95 into kyagi:master Jul 14, 2014
@popoppo
Copy link
Collaborator Author

popoppo commented Jul 14, 2014

@kyagi, @syohex
Thanks for your review, and sorry for my late reply.

And I suppose @popoppo uses word frame as Emacs window.

@syohex is absolutely right, and my use of some words was wrong.
I'm sorry for making you confused.

Thank you for this great contribution

My pleasure!! Thank you @kyagi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants