highlight-nonselected-windows is a variable defined in xdisp.c. Its default value is nil. A non-nil value means highlight region even in nonselected windows. You can customize this variable, e.g.:
(setq highlight-nonselected-windows t)
You'll need to write your own function for doing this.
You'll want to read up on the functions get-buffer-process and signal-process to learn about how to send the right signal to the ESS process.
Here is an example: An interactive function that sends a SIGINT to a buffer of your choosing.
You can modify this function to target whatever ESS buffer you ...
The irregular nature of those windows in your images and the lack of being able to manually resize them suggest you may be using a window-management minor mode such as golden-ratio (http://github.com/roman/golden-ratio.el) or zoom (http://github.com/cyrus-and/zoom).
Further clues to check:
Do the windows resize themselves to make the active window larger ...
I use this in several of my libraries. Use it to make pretty much any command repeatable even when it's on a prefix key.
(defun repeat-command (command)
(let ((repeat-previous-repeated-command command)
What Org emits here is a printed representation of an otherwise opaque window object. While you can serialize a window to a string, you cannot go back from the string to the window. You can recognize such data types by their printed representation looking like #<...>, see https://www.gnu.org/software/emacs/manual/html_node/elisp/Printed-...
I battled with this phenomenon for years and discovered that Emacs automatically recreates a scratch buffer if there are no other buffers. In addition, Emacs creates a scratch buffer on startup. There are a variety of factors that affect how buffers are displayed on startup, including, but not limited to the hard coded (baked-in) startup.el. The startup....
I don't think anyone has already implemented exactly this, but you might look into code folding. Folding allows you to hide and show parts of the buffer on command. There are implementations of code folding for specific languages, as well as some which are more generic. Some are keyed off of indentation, others off of syntax elements (such as curly braces or ...
hydra (https://github.com/abo-abo/hydra) are another way to get repeatable commands. This doesn't move the point on the first call, but you can press o as many times as you want to move around.
(defhydra other-window (:color red :body-pre (other-window 1))
("o" (other-window 1)))
(global-set-key (kbd "C-x o") #'other-window/body)
Opening Two Buffers on Startup
You could add a function to emacs-startup-hook which switches to the first buffer you want, splits the window, moves to the next window, and switches the second buffer (this is exactly what the function below does). You didn't specify whether the buffers you wanted to display were file buffers or already existing buffers. Here ...
For Emacs 26 and later you can use emacs-maple-minibuffer or ivy-posframe if your are using ivy.
Those packages let you configure to popup a minibuffer frame at any position, including the current window top/bottom. The docs of those packages describe how to set them up.
Sorry not sure how to paste this as a comment, this works for ESS:
(defun my-interrupt-ess-buffer-process ()
"Send a SIGINT to script's iESS process."
(signal-process (ess-get-process-buffer) 'sigint))
Customize the variable ispell-choices-win-default-height, which has a default value of 2. The doc-string states:
"The default size of the `*Choices*' window, including the mode line.
Must be greater than 1."
One possible way: save the current window configuration to a register, maximize and then when you are done, restore the saved window configuration. E.g. to save it in register R: C-x r w R; then to restore: C-x r j R. These run the commands window-configuration-to-register and jump-to-register resp. You can look at the doc strings of these functions with C-h ...
The Elisp below defines a command my-delete-compilation-window that deletes the first compilation window in the window list. That should normally be the last selected compilation window. The command is bound to C-c w but you can modify that to your own liking.
(defmacro with-compilation-window (&rest body)
"Select first compilation window in `window-...
If you want to target whichever compilation (or similar) buffer is currently being used by next-error and previous-error, I would suggest this:
(defun my-delete-compilation-window ()
"Delete all windows displaying the `next-error-find-buffer' buffer."
(when-let ((buf (next-error-find-buffer)))
Or based on ...
The minimum total height, in lines, of any window. The value has to
accommodate one text line, a mode and header line, a horizontal scroll
bar and a bottom divider, if present. A value less than
‘window-safe-min-height’ is ignored. The value of this variable is
honored when windows are resized or split.
I found this with M-x ...
If you use Icicles then you can use command icicle-select-window to switch to windows by name, using completion.
icicle-select-window is an interactive compiled Lisp function in
Select window by its name.
With no prefix arg, candidate windows are those of the selected frame.
With a prefix arg:
Would it suit your purpose if you had a command which searched for the next line in the buffer which has a number in it and then showed you just that line?
(defun go-to-next-line-with-number ()
(when (search-forward-regexp "[0-9]" nil 0)
You can automatically have the *Help* window be selected when it is displayed, by customizing option help-window-select.
help-window-select is a variable defined in help.el.
Its value is t
Original value was nil
Non-nil means select help window for viewing.
never (nil) -- Select help window only if ...
Have you tried the various code navigation bindings? I often set the mark to remember where I start and then do C-M-u repeatedly to go up in the code structure. Then C-x C-x gets me back to my mark (and C-g gets rid of the active region if necessary).
There are other such bindings: C-M-f goes forward one statement at the same level and C-M-b goes back. So ...
Not too clear. Is what you want to open Emacs, from outside Emacs, to edit a file?
If so, use program/command emacsclient or emacs followed by a file name. See the Emacs manual, node Action Arguments and perhaps node Emacs Server.
Add the following to your init file:
Then whenever your window configuration is unexpectedly changed, or you simply want to go back to an earlier configuration, use C-c<left> to call winner-undo (which you can do repeatedly if necessary).
Obviously if additional window config changes have happened since the window in question was ...
What troubles me here is that the totally nebulous computation that I removed did not affect anything.
And for a reason. The temp-buffer-max-height variable does not have any effect unless another variable, namely temp-buffer-resize-mode, is set to t. Both variables are customizable. This is kind of documented with the temp-buffer-max-height variable help:
along with a message about the desktop file already being in use
Emacsclient does not attempt to process the desktop file, so you are clearly starting a new instance of Emacs.
If emacsclient can't connect to the server, but you either passed it -a '' or --alternate-editor='' or else have the ALTERNATE_EDITOR environment variable set to an empty string, ...
You could write a function similar to text-scale-adjust. E.g.
(defun mw-other-window-repeat (count &optional all-frames)
"Wrapper around `other-window' to continue to jump to other with key o."
(other-window count all-frames)
(message "Use o to jump to next window.")
(let ((map (make-sparse-keymap)))