This mode was originally intended for personal use and created with the HP-48G in mind.
Files with the .hprpl, .hp48, or .hp50 extensions, or simply run M-x hprpl-mode.
This file provides:
- syntax highlighting, including special highlighting for HP-50G words
- auto-indentation (needs improvement)
- ASCII/Unicode switching
- comments auto-insertion
- a 23-column warning bar in Unicode mode
- communication with emulators or real machines using
kermittool - auto-detection of
x48port (wire)
C-c h cadds a comment colon to each non-comment line to keep track of the stack stateC-c h iprintsx48screen region to"QL-700"label printerC-c h mloads a module file containing new wordsC-c h Munloads a module file containing new wordsC-c h ncapturesx48screen region to a png fileC-c h psends HPRPL code to thelprcommand using the Unicode version for my"QL-700"label printer, so prints !C-c h rreceives data from a port (e.g./dev/ttyUSB0,/dev/pts/1, etc.) usingkermitC-c h ssends data to a port (e.g./dev/ttyUSB0,/dev/pts/1, etc.) usingkermitC-c h utoggles between Unicode and ASCII (e.g.ΣLISTswitches to\GSLIST)C-c h xlaunchesx48(the path is set to/usr/bin/x48using thehprpl-x48-execpathvariable — see below)C-c h ylaunchesx50ng(the path is set to/usr/bin/x50ngusing thehprpl-x50ng-execpathvariable — see below)
Faces are cutomizable using M-x customize.
hprpl-x48-execpath: full path to thex48emulator. Default:"/usr/bin/x48"hprpl-x50ng-execpath: full path to thex50ngemulator. Default:"/usr/bin/x50ng"hprpl-x48-screencapture-bg-color: background color ofx48screen in screencapture. Default is"#fefefe",x48's original color is"#c9dc5c".hprpl-x48-screencapture-fg-color:foreground color ofx48screen in screencapture. Default is"#000000",x48's original color is"#484e74".hprpl-kermit-config: a multiline string configuringkermitcommunication. Default:
"#!/usr/bin/kermit +
set line %s
set speed 9600
set carrier-watch off
set modem type direct
set flow none
set parity none
set block 1
set control prefix all
robust
"This configuration can communicate with the { 9600 0 0 0 1 3 } IOPAR variable.
hprpl-kermit-config-alt: an alternative version of the previous configuration. This allows two configurations to coexist. The default is intended for use with HP-50G :
"#!/usr/bin/kermit +
set modem type direct
set prefixing all
set port %s
set speed 9600
set carrier-watch off
set flow none
set parity space
set send packet-length 80
set block 3
"hprpl-default-port-node: port used withkermit. Default:"/dev/ttyUSB0". You may also be prompted to use the"/dev/pts/1"port corresponding tox48.hprpl-printer-name:CUPSprinter name. Default:"QL-700".hprpl-label-width-mm: width of the printer label in millimeters. Default:62.hprpl-label-line-height-mm: height in millimeters of a single line of code (depends on the font used). Default:4.1.hprpl-module-files: list of file paths containing new words to be loaded at start.
You can add new words you use. For example, ListExt is a popular lib for the HP-50G.
It contains a lot of new words. You can add them in creating a file containing a word per line. Lines beginning with # and empty lines are ignored. A possible file for ListExt may begin with:
# List Creation (CREAT menu)
LSEQ
LSEQR
LASEQ
LMSEQ
LDSEQ
LMRPT
LWHL
# List Editing (EDIT menu)
LDDUP
LPOP
...
...For conversion words, you may add both unicode and ASCII versions, for example:
S→SL
S\->SLNo ELPA or MELPA package is currently available.
Add the following lines to your Emacs configuration file so Emacs can find hprpl-mode.el:
(add-to-list 'load-path "/path/to/the/dir/you/have/installed/the/file/")
(require 'hprpl-mode)In my configuration, I also use the indent-bars package, so I added:
(use-package indent-bars
:ensure t
:hook (hprpl-mode . indent-bars-mode))- more RPL words
GNU GPL v3 — https://www.gnu.org/licenses/gpl-3.0.html