all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: how switch between 2 mostly used windows
       [not found] <hujpab$chi$1@www.shinco.com>
@ 2010-06-07 22:31 ` Pascal J. Bourguignon
  2010-06-08  0:07   ` chenyu
  0 siblings, 1 reply; 2+ messages in thread
From: Pascal J. Bourguignon @ 2010-06-07 22:31 UTC (permalink / raw)
  To: help-gnu-emacs

"chenyu" <yu.chen@sh-rfid.com> writes:

> hi,
> 3 windows have open in emacs, and two of them are mostly used.
>
> C-X o, switch to the next windows.
>
> But which commands for switch back to the previous windows, by skipping the 
> third (just show windows)?


(defun selected-window ()
  (first (window-list)))

(defvar *first-window*  nil)
(defvar *second-window* nil)

(defun designate-first-window ()
  "Sets the first window."
  (interactive)
  (setf *first-window* (selected-window)))

(defun designate-second-window ()
  "Sets the second window."
  (interactive)
  (setf *second-window* (selected-window)))

(defun skip-to-other-designated-window ()
  "Selects the other window (either the first or second)."
  (interactive)
  (if (eq (selected-window) *first-window*)
      (select-window *second-window*)
      (select-window *first-window*)))


(global-set-key (kbd "<f9>")  'skip-to-other-designated-window)
(global-set-key (kbd "<f10>") 'designate-first-window)
(global-set-key (kbd "<f11>") 'designate-second-window)

Type <f10> to designate your first window, <f11> to designate the second.
Then you can use <f9> to toggle between the two.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how switch between 2 mostly used windows
  2010-06-07 22:31 ` how switch between 2 mostly used windows Pascal J. Bourguignon
@ 2010-06-08  0:07   ` chenyu
  0 siblings, 0 replies; 2+ messages in thread
From: chenyu @ 2010-06-08  0:07 UTC (permalink / raw)
  To: help-gnu-emacs

It works very well. Wonderful.


chenyu
"Pascal J. Bourguignon" <pjb@informatimago.com> 
??????:87bpbmo4od.fsf@kuiper.lan.informatimago.com...
> "chenyu" <yu.chen@sh-rfid.com> writes:
>
>> hi,
>> 3 windows have open in emacs, and two of them are mostly used.
>>
>> C-X o, switch to the next windows.
>>
>> But which commands for switch back to the previous windows, by skipping 
>> the
>> third (just show windows)?
>
>
> (defun selected-window ()
>  (first (window-list)))
>
> (defvar *first-window*  nil)
> (defvar *second-window* nil)
>
> (defun designate-first-window ()
>  "Sets the first window."
>  (interactive)
>  (setf *first-window* (selected-window)))
>
> (defun designate-second-window ()
>  "Sets the second window."
>  (interactive)
>  (setf *second-window* (selected-window)))
>
> (defun skip-to-other-designated-window ()
>  "Selects the other window (either the first or second)."
>  (interactive)
>  (if (eq (selected-window) *first-window*)
>      (select-window *second-window*)
>      (select-window *first-window*)))
>
>
> (global-set-key (kbd "<f9>")  'skip-to-other-designated-window)
> (global-set-key (kbd "<f10>") 'designate-first-window)
> (global-set-key (kbd "<f11>") 'designate-second-window)
>
> Type <f10> to designate your first window, <f11> to designate the second.
> Then you can use <f9> to toggle between the two.
>
> -- 
> __Pascal Bourguignon__                     http://www.informatimago.com/ 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-08  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <hujpab$chi$1@www.shinco.com>
2010-06-07 22:31 ` how switch between 2 mostly used windows Pascal J. Bourguignon
2010-06-08  0:07   ` chenyu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.