Hi, background: I use Screen 4.09.00 to control Emacs either in a local GUI terminal or an SSH client from my phone by using a command à la:
| screen -dRS emacs_gnus sh -c 'pidof emacs || emacs -nw -f gnus' I want to customize Emacs's browse-url et al. so that they do the Right Thing™ depending on which device I'm controll- ing Emacs from. My current game plan is to enhance the com- mand above so that prior to executing Screen, it notes the controlling device in some file /var/run/user/… that I can then read in Emacs and act upon its contents. But it would be more appropriate and better reusable code to consider this information a "property" of the Screen session. Look- ing at the Screen manual, at first I thought I might store the information in a register, but groups ("local", "de- vice1", "device2", etc.) appear to be more fitting. So I launch a test session: | $ screen -dRS test and, in another terminal, I try to assign the session to a group and (unsuccessfully) query its name: | $ screen -S test -X group local | $ screen -S test -X group | $ Rereading the manual, I note that it says: "Once a new group is created, it will act as a container for windows and even other groups." So I assume that I need to create the group before using it: | $ screen -S test -X screen -t local //group | $ This causes the "test" session to show a screen with the title "Group: local" and leaves me without a clue how to re- turn to my shell prompt. But even though it did something, it did not succeed to assign the session to something query- able from the command line: | $ screen -S test -X group local | $ screen -S test -X group | $ screen -S test -ls | There is a screen on: | 64047.test (Attached) | 1 Socket in /run/screen/S-tim. | $ So (how) can I create a group, assign a session to it, and query the group a session is assigned to? TIA, Tim