sideframe icon indicating copy to clipboard operation
sideframe copied to clipboard

Sideframe Use on Windows

Open Remillard opened this issue 3 years ago • 11 comments

This package might be OS dependent, or have OS dependent features. I tried the most basic thing out I could think of, and have not seen any child frames.

I loaded and invoked sideframe as follows:

(use-package sideframe
  :load-path "site-lisp/sideframe/")

(sideframe-make 'left 32)

These were done in *scratch* and then line evaluated. The response in *Messages* is as follows:

nil
#<frame GNU Emacs at WIC-USL03372 000002af5fd94d60>

So it THINKS it created a frame, however no frame has showed up, or ... I imagine there's a lot of other possibilities (invisible, stacked and anchored behind, etc). I know the frame creation variables are a little hinky on Windows depending on how the program is invoked and sometimes they work in one context and don't in others so I'm not wildly surprised. Might be something that only really works on *nix systems though I guess. Unfortunate, I wanted speed bar as a child frame.

Remillard avatar Sep 02 '22 13:09 Remillard

Thanks for the report. Can you try with emacs -q to see if the problem persists? (you can load the sideframe.el and eval the buffer to test)

rougier avatar Sep 02 '22 14:09 rougier

Then you can also try (with emacs -q)

(make-frame `((parent-frame . ,(selected-frame)) (width . 80) (height . 12)))

rougier avatar Sep 02 '22 14:09 rougier

I will try as soon as I can. After a relatively peaceful morning where I was able to tinker with emacs, all hell broke loose at work and I haven't gotten back to fiddling with it. Launching emacs in windows uses runemacs.exe but I think that takes the same commandline parameters, so I'll try with that.

Remillard avatar Sep 02 '22 16:09 Remillard

Alright, got some results for you on this. Windows OS system. Emacs is in the path.

At the commandline:

PS C:\Users\nor71443> emacs -q

In *scratch* I performed the following:

(require 'package)
(package-initialize)
(use-package sideframe
  :load-path "site-lisp/sideframe/")
(sideframe-make 'left 32)

After each line evaluated. After the sideframe-make invocation, it printed a message #<frame GNU Emacs at WICUSL03372 <hexstring>. (Sorry, I didn't record the precise message on this one as I did two tests.) No frame appeared in Windows.

Second test, I did the following, except for the final line was:

(make-frame '((parent-frame . ,(selected-frame)) (width . 80) (height . 12)))

Emacs replies with:

#<frame GNU Emacs at WIC-USL03372 000001f5b759e8a0>

In this case, a frame did show up, containing *scratch* on top of the other frame. So I can make frames (in general) but perhaps I cannot make an attached child frame? I'm not entirely sure what the test tells you in this case but hopefully this was useful!

Remillard avatar Sep 06 '22 12:09 Remillard

This message says that the frame has been created but it is not visible. Either you need to add (visible . t) in the arguments, or you can also to raise-frame :

(raise-frame (make-frame '((parent-frame . ,(selected-frame)) (width . 80) (height . 12)))

Last option would the fram to be positionned outside the screen but we can check this later.

rougier avatar Sep 21 '22 10:09 rougier

Alright, that final invocation (with an added paren at the end, worked for me.

(raise-frame (make-frame '((parent-frame . ,(selected-frame)) (width . 80) (height . 12))))

image

It appears to be a smaller font size than the parent so I don't know what it used for its faces. However perhaps this is a clue to getting the sideframe to work on Windows.

Remillard avatar Sep 22 '22 12:09 Remillard

Which one is the child frame?

rougier avatar Oct 01 '22 10:10 rougier

The small one without treemacs in it. Sorry, I didn't show the entirety of the screen for brevity.. The smaller frame there has a smaller font than my regular frame. I know it's difficult to see there, but you can compare the face size for "raise" on the right, original, to "raise" on the left, new). Hope this helps!

Remillard avatar Oct 01 '22 12:10 Remillard

Ok. So now we now you can create child frame and they're visible. When you move the main frame (parent), does the child frame follows?

rougier avatar Oct 10 '22 07:10 rougier

Sorry for the delay. Was on vacation then have been down for the count sick. However I got a chance to try this again this morning.

No they are not linked in any fashion that I can determine. I was able to duplicate the behavior established above with the raise-frame invocation however then trying the experiment of moving the parent frame did not result in the child frame maintaining its position relative -- it basically didn't move. I tried moving the child frame and I can move it, but there's no linkage between the two.

Remillard avatar Oct 11 '22 12:10 Remillard

Could you give a try to the mini-frame package? It uses the same child-frame technique but it might be more robust. It will help to decide if there's something wrong on your side or in my code.

rougier avatar Oct 17 '22 12:10 rougier