Editor line numbers

Installing APL, Sorting out Fonts, Keyboards, etc.

Editor line numbers

Postby ksa on Mon Jul 22, 2019 6:04 pm

I can't figure out how to configure the session to always display line numbers in the editor/trace windows. I'm tired of having to turn them on every time I start a session. I can't find a parameter to set anywhere. Can you help? Thanks!
...../Kim
ksa
 
Posts: 10
Joined: Thu Jul 18, 2019 7:02 pm

Re: Editor line numbers

Postby kai on Tue Jul 23, 2019 3:03 pm

You might not be aware that all you have to do is press the <minus> key on the numeric keypad to toggle them on and off.

I would recommend doing that rather than saving/loading a session, particularly because in some circumstances you don't want line numbers, for example on nested variables.
User avatar
kai
 
Posts: 141
Joined: Thu Jun 18, 2009 5:10 pm
Location: Hillesheim / Germany

Re: Editor line numbers

Postby paulmansour on Tue Jul 23, 2019 6:31 pm

Implicit in Kai's answer is that you can save the session configuration so you don't need to reset your preferences every time. There are t(at least) two ways to do this:

1. Go to session/save on the menu.

2. Click the x on the main window to close (rather than )off ) and select save session in the popup dialog box.
paulmansour
 
Posts: 431
Joined: Fri Oct 03, 2008 4:14 pm

Re: Editor line numbers

Postby ksa on Tue Jul 23, 2019 9:20 pm

Thanks, Kai & Paul.

Kai, I knew about the num <->, except that I have reassigned the functionality as it destroys the possibility to use the num <-> key in the session/editor (the same with num </>).

Paul, it's strange, because even if I save the session file with the line numbers turned on they are still turned off when I start Dyalog anew. But the trick with closing the APL window works. What is being saved in this situation? There seems to be some confusion/inconsistency here...

Best Regards,
...../Kim
ksa
 
Posts: 10
Joined: Thu Jul 18, 2019 7:02 pm

Re: Editor line numbers

Postby AndyS|Dyalog on Wed Jul 24, 2019 12:25 pm

The session file in general contains the configuration of the session - mainly what has been created using the BUILDSE workspace, along with the callback code etc. For many years we only had session files on Windows.

Settings such as the state of line numbers are defined to be configuration parameters, which are saved in the registry (on Windows) or are defined as environment variables on non-Windows platforms. Again, in general, we read the registry entries on startup, and write changed ones back when APL terminates. This is due to several reasons, including reducing the amount of polling of the registry, allowing consistency across platforms, and avoiding race conditions when multiple APL processes are attempting to update the same registry entry.

So indeed, the state of the line number toggle is written only when you terminate the APL process cleanly because it is a configuration parameter, rather than a property of the session.
User avatar
AndyS|Dyalog
 
Posts: 263
Joined: Tue May 12, 2009 6:06 pm

Re: Editor line numbers

Postby ksa on Wed Jul 24, 2019 2:05 pm

Thanks for the clarification, Andy.
...../Kim
ksa
 
Posts: 10
Joined: Thu Jul 18, 2019 7:02 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest