How to enlarge the Emacs editor window under uQLx emulator

Discussion and advice about emulating the QL on other machines.
Post Reply
User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

How to enlarge the Emacs editor window under uQLx emulator

Post by drdtyc »

I tried to make the screen larger when invoking uQLx using the following Linux command:
./qm -b "lrun win1_boot" -g 960x720

My intention is to use a larger 960x720 screen when opening the emacs editor via the following QDOS command.
exec win1_emacs

But the outcome is not what I expected. The screen of 960x720 is mainly blank and dark with exception that the QDOS window and emacs window remaining unchanged and small, not utilising the blank and dark space of the screen. (see the attached image)

https://drive.google.com/file/d/1oDQ0RT ... sp=sharing

What can I do to rectify this problem?


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by tofro »

PE programs normally open with a default window size that fits on any screen. In order to resize this window, do the following:
  • Move the mouse pointer to the top-right button (the resize button) of the window, (mouse or cursor keys)
  • press left mouse button (or SPACE)
  • move the mouse pointer to the desired new position of the top-right corner of the window
  • press SPACE (or left mouse button) again.
The top-left button in the window operates in a similar way - and moves the window

Note PE is not like Windows - The position of the buttons for Move and Resize is not pre-determined, but depends on the application. Emacs pretty much implements a quasi-standard.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by Derek_Stewart »

Hi,

Microemacs can be configured by setting environmenral variables, which ENV_BIN is required. This not included in the Microemacs archive zio file, but can be downliaded at:
http://www.dilwyn.me.uk/tk/env.zip

The size of the emacs windows can controlled by defining the environmental variables:

EMACS_ROWS
EMACS_COLS

Details of the Emacs Environmental Variables are detailed in the help file: EMACS.HLP, see section 3.2

I set the above variables to:
SETENV "EMACS_ROWS=100"
SETENV "EMACS_COLS=200"

which gives a full size emacs screen at 1024x768 on QPC, SMSQmulator, Q68, I have not tried UQLX, but it should work.

I will look at this later and report back.


Regards,

Derek
User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by drdtyc »

tofro wrote:PE programs normally open with a default window size that fits on any screen. In order to resize this window, do the following:
  • Move the mouse pointer to the top-right button (the resize button) of the window, (mouse or cursor keys)
  • press left mouse button (or SPACE)
  • move the mouse pointer to the desired new position of the top-right corner of the window
  • press SPACE (or left mouse button) again.
The top-left button in the window operates in a similar way - and moves the window

Note PE is not like Windows - The position of the buttons for Move and Resize is not pre-determined, but depends on the application. Emacs pretty much implements a quasi-standard.
Thanks!
I can now manually enlarge the window of emacs.
But this has to be done every time.
Now looking at how to set up the environment variables EMACS_ROWS and EMACS_COLS permanently.


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by swensont »

> Now looking at how to set up the environment variables EMACS_ROWS and EMACS_COLS permanently.

Just add those ENV commands to your normal boot program. There is also an emacs_rc configuration file. It should have those settings. Just edit it. MicroEmacs will always check the emacs_rc on start up to get a local configuration.

Tim


User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by drdtyc »

swensont wrote:> Now looking at how to set up the environment variables EMACS_ROWS and EMACS_COLS permanently.

Just add those ENV commands to your normal boot program. There is also an emacs_rc configuration file. It should have those settings. Just edit it. MicroEmacs will always check the emacs_rc on start up to get a local configuration.

Tim
In the boot file, I added two lines
550 SETENV "EMACS_ROWS=100"
560 SETENV "EMACS_COLS=200"
The Superbasic interpreter flagged up SETENV as unknown.

I then changed the above two lines to the following:
550 EMACS_ROWS=100
560 EMACS_COLS=200
There was no error message.

After running the boot file, there was no effect on the EMACS window size i.e. it was not enlarged.

I must have done certain novice error.
What was the error?


User avatar
RalfR
Aurora
Posts: 870
Joined: Fri Jun 15, 2018 8:58 pm

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by RalfR »

Yu have to LRESPR "ENV_bin" in your BOOT program before using the command SET_ENV.

You will find this here http://www.dilwyn.me.uk/tk/env.zip


4E75 7000
User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by drdtyc »

RalfR wrote:Yu have to LRESPR "ENV_bin" in your BOOT program before using the command SET_ENV.

You will find this here http://www.dilwyn.me.uk/tk/env.zip
Thanks!
With ENV_bin loaded, I can now use SETENV to set EMACS_ROWS and EMACS_COLS.

One question still remains.
The EMACS window size is now changed with an increase in horizontal dimension due to the new value assigned to EMACS_COLS only. But new value assigned to EMACS_ROWS has no effect on the vertical dimension of the window at all i.e. the window width is unchanged.

What is wrong ?


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by Derek_Stewart »

Hi,

I have had another look at the EMACS_HLP file, which I made an error in stating the variable name of EMACS_ROWS, when the help file states EMACS_LINES

The section of EMACS_HLP relating to this is definition is:
EMACS_HLP wrote: The following three additional variables are scanned at MicroEMACS startup only
(and should therefore be set from the parent job of MicroEMACS (usually, it is
job 0)).

EMACS_LINES
Number of lines into the MicroEMACS sub-window (defaults to 22, which is the minimum value allowed).

EMACS_COLS
Number of columns into the MicroEMACS sub-window (defaults to 82, which is the minimum value allowed).
The environmental variables are read when the Emacs application is run, so changing the variable with SETENV before running EMACS, should change the size of the Emacs window.

Sorry for the confusion.


Regards,

Derek
User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

Re: How to enlarge the Emacs editor window under uQLx emulator

Post by drdtyc »

Derek_Stewart wrote:Hi,

I have had another look at the EMACS_HLP file, which I made an error in stating the variable name of EMACS_ROWS, when the help file states EMACS_LINES

The section of EMACS_HLP relating to this is definition is:
EMACS_HLP wrote: The following three additional variables are scanned at MicroEMACS startup only
(and should therefore be set from the parent job of MicroEMACS (usually, it is
job 0)).

EMACS_LINES
Number of lines into the MicroEMACS sub-window (defaults to 22, which is the minimum value allowed).

EMACS_COLS
Number of columns into the MicroEMACS sub-window (defaults to 82, which is the minimum value allowed).
The environmental variables are read when the Emacs application is run, so changing the variable with SETENV before running EMACS, should change the size of the Emacs window.

Sorry for the confusion.
Very grateful to your guidance!
It now works perfectly.


Post Reply