* How to open full window programmatically? @ 2020-12-03 0:34 Jean Louis 2020-12-03 1:02 ` Jamie Beardslee 2020-12-03 3:13 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 13+ messages in thread From: Jean Louis @ 2020-12-03 0:34 UTC (permalink / raw) To: Help GNU Emacs Does anybody know how to open full window programmatically if windows are split? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 0:34 How to open full window programmatically? Jean Louis @ 2020-12-03 1:02 ` Jamie Beardslee 2020-12-03 5:36 ` Jean Louis 2020-12-03 3:13 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 13+ messages in thread From: Jamie Beardslee @ 2020-12-03 1:02 UTC (permalink / raw) To: help-gnu-emacs By "open full window", do you mean (delete-other-windows)? -- Jamie ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 1:02 ` Jamie Beardslee @ 2020-12-03 5:36 ` Jean Louis 2020-12-03 6:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2020-12-03 5:36 UTC (permalink / raw) To: Jamie Beardslee; +Cc: help-gnu-emacs * Jamie Beardslee <jdb@jamzattack.xyz> [2020-12-03 04:03]: > By "open full window", do you mean (delete-other-windows)? This here does not work: (defun hyperscope-key () (interactive) (let ((buffer "*HyperScope*")) (if (bufferp (get-buffer buffer)) (cond ((and (one-window-p) hyperscope-full-window) (switch-to-buffer buffer)) ((and (not (one-window-p)) hyperscope-full-window) (progn (switch-to-buffer-other-window buffer) (delete-other-windows))) ((one-window-p) (switch-to-buffer buffer)) ((not (one-window-p)) (switch-to-buffer-other-window buffer))) (hyperscope)))) One time it opens split window from one window, second time opens full window with one window. hyperscope-full-window is true (one-window-p) is true I do not know why first condition is not working every time but every second time. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 5:36 ` Jean Louis @ 2020-12-03 6:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 6:12 ` Jean Louis 0 siblings, 1 reply; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 6:00 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: > (one-window-p) Oh la la, `one-window-p', didn't know about that one! Thank you, I should replace my (= 1 (count-windows)) :) > I do not know why first condition is not working every time > but every second time. Probably because the state changed (here, the window configuration), so there is a different behavior when invoking the function. Isn't that the idea? If the different behavior is undesired, well, debug it. Setup the windows and invoke it. Is the correct `cond' clause executed? If yes, does it do the right thing? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 6:00 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 6:12 ` Jean Louis 2020-12-03 8:07 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2020-12-03 6:12 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2020-12-03 09:01]: > Jean Louis wrote: > > > (one-window-p) > > Oh la la, `one-window-p', didn't know about that one! > > Thank you, I should replace my (= 1 (count-windows)) :) > > > I do not know why first condition is not working every time > > but every second time. > > Probably because the state changed (here, the window > configuration), so there is a different behavior when invoking > the function. Isn't that the idea? If the different behavior is > undesired, well, debug it. Sure but I write here when I cannot. Not when I can. Yes, probably state changed, that is what you say. My uptime is 2 days and 11 hours, and all states got chaned and are weird. It is like dream. - input-method changed and I cannot turn it off, so the state is not changeable. - symon-mode turned on, cannot be turned off. Not changeable. - opened Dired, trying to edit file names but I can change only few of lines, others are read only, not reproducible with emacs -Q There are serious bugs in Emacs that I cannot reproduce easily but affect usage so much. > Setup the windows and invoke it. Is the correct `cond' clause > executed? If yes, does it do the right thing? I do not think it is that easy under this environment where I am, you may not have it. We are debugging maybe memory leak, this Emacs is running under LD_PRELOAD and I did not encountered yet problem I expected before one day. My vsize is 3.4G and growing, and I still do not know what to do with it. Maybe this is bug related to state not changing back for input-method and symon-mode and if I restart session it will simply work. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 6:12 ` Jean Louis @ 2020-12-03 8:07 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 8:58 ` Jean Louis 0 siblings, 1 reply; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 8:07 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: > My uptime is 2 days and 11 hours, and all states got chaned > and are weird. It is like dream. Don't do that, at least don't make it a habit. 2d 11h w/o food no problem. 2d 11h w/o sleep -> psychosis ahead. advance too quickly, you catch up with death. but advance too slowly, death catches up with YOU > - input-method changed and I cannot turn it off, so the state > is not changeable. No, I mean state that is relevant to that particular function... > I do not think it is that easy under this environment where > I am, you may not have it. Again, nothing around that function should matter, unless you want it to. It is just a function. f(x) = y x here are explicit arguments but also what you call the environment, sure. But only that data from the environment that _you_ choose that function f should extract and act upon! If it gets too complicated, break it up into small modules (defuns). Try the modules first, when they work have the function call them. When that works as well you MAY want to incorporate the modules into the function. Or keep them as modules! Either way are fine. It is up to you. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 8:07 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 8:58 ` Jean Louis 2020-12-03 9:23 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2020-12-03 8:58 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2020-12-03 11:08]: > Jean Louis wrote: > > > My uptime is 2 days and 11 hours, and all states got chaned > > and are weird. It is like dream. > > Don't do that, at least don't make it a habit. 2d 11h w/o food > no problem. 2d 11h w/o sleep -> psychosis ahead. My personal uptime is much longer even though I go into sleep-mode from time to time. I was referring to (emacs-uptime). Something changes after about 1 day and we have memory leak bug trying to debug on bug mailing list. But it was not the cause why I cannot open up full window programmatically. > No, I mean state that is relevant to that particular function... I said that it could not be turned off or changed. Function was possible to be invoked, I would get "disabled" or I would get indicators that it was changed but it was not really changed. If input method was german-postfix the C-\ would visibly change indicator from DE to U and german-postifx remained engaged like I did not change it. > > I do not think it is that easy under this environment where > > I am, you may not have it. > > Again, nothing around that function should matter, unless you > want it to. It is just a function. f(x) = y > > x here are explicit arguments but also what you call the > environment, sure. But only that data from the environment that > _you_ choose that function f should extract and act upon! Not correct, I have not chosen wrong behavior of software in any relation to input methods. I have chosen to turn it off and control was lost. I have chosen to turn off symon-mode and though I got "disabled" message it was not turned off, it continued running. It did not happen in last 2 months or ever before. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 8:58 ` Jean Louis @ 2020-12-03 9:23 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 0 replies; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 9:23 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: >> Again, nothing around that function should matter, unless >> you want it to. It is just a function. f(x) = y >> >> x here are explicit arguments but also what you call the >> environment, sure. But only that data from the environment >> that _you_ choose that function f should extract and >> act upon! > > Not correct, I have not chosen wrong behavior of software in > any relation to input methods. I have chosen to turn it off > and control was lost. I have chosen to turn off symon-mode > and though I got "disabled" message it was not turned off, it > continued running. It did not happen in last 2 months or > ever before. Ha! What are you on, Mescaline? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 0:34 How to open full window programmatically? Jean Louis 2020-12-03 1:02 ` Jamie Beardslee @ 2020-12-03 3:13 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 8:54 ` Jean Louis 1 sibling, 1 reply; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 3:13 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: > Does anybody know how to open full window programmatically if > windows are split? What you're looking for is probably `delete-other-windows'. I have that M-p. Then I have M-o to do other-window-or-split which you can find here [1], amongst a bunch of other stuff. The two-window solution is because I use a projector with a low resolution, so I only have 30 lines and 80 columns. Nonetheless, you can examine the code and find things that you could use as building blocks for the particular setup you are using and working on. [1] https://dataswamp.org/~incal/emacs-init/window-new.el -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 3:13 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 8:54 ` Jean Louis 2020-12-03 9:08 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2020-12-03 8:54 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2020-12-03 06:14]: > Jean Louis wrote: > > > Does anybody know how to open full window programmatically if > > windows are split? > > What you're looking for is probably `delete-other-windows'. > I have that M-p. That is interactively rather than programmatically. > The two-window solution is because I use a projector with a low > resolution, so I only have 30 lines and 80 columns. Nonetheless, > you can examine the code and find things that you could use as > building blocks for the particular setup you are using and > working on. I would if I would not be stuck. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How to open full window programmatically? 2020-12-03 8:54 ` Jean Louis @ 2020-12-03 9:08 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 9:26 ` [solved] " Jean Louis 0 siblings, 1 reply; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 9:08 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: >> What you're looking for is probably `delete-other-windows'. >> I have that M-p. > > That is interactively rather than programmatically. OK, here you have it, programmatically, then: (delete-other-windows) ikr? worlds apart! ;) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* [solved] Re: How to open full window programmatically? 2020-12-03 9:08 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 9:26 ` Jean Louis 2020-12-03 9:40 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2020-12-03 9:26 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2020-12-03 12:09]: > Jean Louis wrote: > > >> What you're looking for is probably `delete-other-windows'. > >> I have that M-p. > > > > That is interactively rather than programmatically. > > OK, here you have it, programmatically, then: > > (delete-other-windows) (defun hyperscope-key () (interactive) (let ((buffer "*HyperScope*")) (get-buffer-create buffer) (if hyperscope-full-window (progn (delete-other-windows) (switch-to-buffer buffer)) (switch-to-buffer-other-window buffer)) (hyperscope))) Thank you, I solved it this way. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [solved] Re: How to open full window programmatically? 2020-12-03 9:26 ` [solved] " Jean Louis @ 2020-12-03 9:40 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 0 replies; 13+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-12-03 9:40 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: >> OK, here you have it, programmatically, then: >> >> (delete-other-windows) > > (defun hyperscope-key () > (interactive) > (let ((buffer "*HyperScope*")) > (get-buffer-create buffer) > (if hyperscope-full-window > (progn > (delete-other-windows) > (switch-to-buffer buffer)) > (switch-to-buffer-other-window buffer)) > (hyperscope))) > > Thank you, I solved it this way. I didn't do much but I'll take it, you're welcome :) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-12-03 9:40 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-12-03 0:34 How to open full window programmatically? Jean Louis 2020-12-03 1:02 ` Jamie Beardslee 2020-12-03 5:36 ` Jean Louis 2020-12-03 6:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 6:12 ` Jean Louis 2020-12-03 8:07 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 8:58 ` Jean Louis 2020-12-03 9:23 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 3:13 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 8:54 ` Jean Louis 2020-12-03 9:08 ` Emanuel Berg via Users list for the GNU Emacs text editor 2020-12-03 9:26 ` [solved] " Jean Louis 2020-12-03 9:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).