{"id":21320644,"url":"https://github.com/jayfoad/dyalog-mode","last_synced_at":"2026-01-02T15:41:33.858Z","repository":{"id":83726892,"uuid":"76249762","full_name":"jayfoad/dyalog-mode","owner":"jayfoad","description":"Major mode for editing Dyalog APL source code","archived":false,"fork":false,"pushed_at":"2017-12-11T11:21:53.000Z","size":537,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T11:40:07.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bitbucket.org/harsman/dyalog-mode","language":"Emacs Lisp","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jayfoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-12T11:19:10.000Z","updated_at":"2020-03-01T17:59:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5a64af5-be47-4f03-a243-51e5dfaf71f5","html_url":"https://github.com/jayfoad/dyalog-mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayfoad%2Fdyalog-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayfoad%2Fdyalog-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayfoad%2Fdyalog-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayfoad%2Fdyalog-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayfoad","download_url":"https://codeload.github.com/jayfoad/dyalog-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801610,"owners_count":20350106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T19:53:08.971Z","updated_at":"2026-01-02T15:41:33.803Z","avatar_url":"https://github.com/jayfoad.png","language":"Emacs Lisp","readme":"Dyalog mode\r\n===========\r\n\r\nDyalog-mode is a GNU Emacs major mode for editing Dyalog APL source code. It\r\nintegrates with the Dyalog IDE so you can use Emacs instead of the built in\r\nDyalog editor.\r\n\r\nFeatures\r\n--------\r\n\r\nDyalog mode supports syntax highlighting (including correct highlighting of\r\nlocalized variables), indentation and convenience functions like toggling\r\nlocalization of variables.\r\n\r\nSupported platforms\r\n-------------------\r\nDyalog mode should work in Emacs 23, but for full functionality, you should\r\nuse Emacs 24.2 or newer.\r\n\r\nDyalog mode itself works on all platforms supported by Emacs, but the\r\nintegration with the Dyalog session requires functionality only present in the\r\nGUI version of the Dyalog IDE, so that part only works on Windows. However,\r\nyou can still connect Emacs and Dyalog when running on Linux, you just have to\r\nmanually invoke editing in Emacs by calling `Emacs.editor.edit 'funcname'`.\r\n\r\nInstallation\r\n------------\r\n\r\n### From MELPA ###\r\n\r\nSince version 24.1, Emacs includes a package management system. Using the\r\n[MELPA](http://melpa.org) package repository is the easiest way to install and\r\nupdate Dyalog mode.\r\n\r\nIf you have installed packages from Melpa before, all you have to do is:\r\n\r\n`M-x package-install RET dyalog-mode RET`\r\n\r\nIf you haven't used Melpa before, then you have to configure `package.el`\r\nfirst. Add the following to your\r\n[init file](http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html)\r\n\r\n```lisp\r\n(require 'package)\r\n(add-to-list 'package-archives\r\n             '(\"melpa\" . \"http://melpa.org/packages/\") t)\r\n```\r\n\r\nRestart Emacs and update the package cache by running:\r\n\r\n`M-x package-refresh-contents RET`\r\n\r\nYou can now install Dyalog mode by running `M-x package-install`, as above.\r\n\r\n#### Installing in older versions of Emacs ####\r\n\r\nIf you have an older version of Emacs, please follow the\r\n[instruction from MELPA](http://melpa.org/#/getting-started).\r\n\r\n### Installing manually\r\n\r\nTo install manually, clone the\r\n[mercurial repository](https://bitbucket.org/harsman/dyalog-mode) and add the\r\nfollowing to your init file:\r\n\r\n```lisp\r\n(autoload 'dyalog-mode \"/path/to/dyalog-mode.el\" \"Edit Dyalog APL\" t)\r\n(autoload 'dyalog-editor-connect \"/path/to/dyalog-mode.el\" \"Connect Emacs to Dyalog\" t)\r\n(add-to-list 'auto-mode-alist '(\"\\\\.apl\\\\'\" . dyalog-mode))\r\n(add-to-list 'auto-mode-alist '(\"\\\\.dyalog$\" . dyalog-mode))\r\n```\r\n\r\n#### Dependencies ####\r\n\r\nIf you install with `package.el` then dependencies are automatically\r\ninstalled. If you install manually, you have to install dependencies manually\r\nas well.\r\n\r\n* `cl-lib` is installed by default in Emacs 24.3 and newer. It provides\r\n  various Common Lisp forms, but unlike the older `cl` library, it doesn't\r\n  pollute the global namespace. If you have an older Emacs version, without\r\n  `cl-lib`, you can install it from the [GNU ELPA](http://elpa.gnu.org/)\r\n  repository by using `package.el` (by doing `M-x package-install RET cl-lib\r\n  RET`), or you can get it manually\r\n  [here](http://elpa.gnu.org/packages/cl-lib.html).\r\n\r\nGetting started\r\n---------------\r\n\r\nTo get started, just open any text file with APL source code and a .dyalog\r\nextension in Emacs.\r\n\r\nYou can also use Emacs as the editor inside a Dyalog APL session. First you\r\nneed to load the code for this into Dyalog. Issue the following commands at\r\nthe Dyalog prompt:\r\n\r\n```apl\r\n      ]load /path/to/dyalog-mode/Emacs.apl\r\n      Emacs.editor.setupmenu ⍬\r\n      Emacs.editor.connect\r\n```\r\n\r\nThis will first try to connect to a running Emacs instance, and if one isn't\r\navailable, start Emacs and connect to it from the Dyalog session. The call to\r\n`setupmenu` will add a shortcut to the session's context menu, called \"Edit in\r\nEmacs\" with the keyboard shortcut `Ctrl+Alt+Enter`.\r\n\r\nTo edit a function, class or namespace in Emacs, just place the cursor on a\r\nname in the Dyalog session or editor and press `Ctrl+Alt+Enter`. Once you are\r\nhappy with your changes, press `C-c C-c` in Emacs to fix the changes back in\r\nthe Dyalog session. While you are editing in Emacs, you can press `C-c C-e` to\r\nedit the name at point. You can also open arrays in Emacs, although currently\r\nno arrays are editable, i.e. they are all read-only.\r\n\r\nIf you edit a namespace or class that has been loaded with Dyalog's SALT\r\ntoolkit (e.g. by using `]load` at the session prompt), the path to the source\r\nfile will be sent to Emacs, so you can also save directly from there. If Emacs\r\ndoesn't know the path to the source file, it will ask you to name a file when\r\nyou try to save.\r\n\r\n### Entering APL characters in Emacs ###\r\nBy installing and enabling the Dyalog IME you can enter APL characters in\r\nEmacs. Note that the classic Dyalog layout uses the Control key for entering\r\nAPL characters, which tends to conflict with Emacs' keyboard shortcuts. Your\r\nbest bet is to use a layout that uses AltGr or Ctrl+Alt instead (the Dyalog\r\nkeyboard for Linux uses a special compose key called the APL key).\r\n\r\nIf you use AltGr to enter APL characters in Emacs on Windows, Emacs may\r\ninterpret commands where you press Ctrl+Alt+key as Ctrl+Alt+aplchar. To avoid\r\nthis, call dyalog-fix-altgr-chars. For example, if you want to enable the\r\nDyalog IME globally in Emacs and want to fix the global keymap, so that ⊃,\r\nwhich you produce by pressing AltGr+x, isn't confused with C-M⊃, you would\r\nadd the following to your init file:\r\n\r\n```lisp\r\n(dyalog-fix-altgr-chars (current-global-map) \"⊃\" \"x\")\r\n```\r\n\r\nConfiguration\r\n-------------\r\n\r\n### Emacs ###\r\n\r\nRun `M-x customize-group dyalog RET` to customize the various settings\r\navailable.\r\n\r\n### Dyalog ###\r\n\r\nIf you want to use another keyboard shortcut for editing, just call\r\n`setupmenu` with an argument of the `Accelerator` property for your desired\r\nkeyboard shortcut. For more information, see the built in Dyalog help for the\r\nAccelerator property.\r\n\r\nIf you use something other than SALT to load source code into the session, you\r\ncan set `Emacs.editor.getPath` to the name of a function that given a name\r\n(relative to root), will return the path to the corresponding source file.\r\n\r\nThe variable `Emacs.editor.onMissing` is the name of a function to call when\r\ntrying to edit a name that doesn't exist. It is called with the name as an\r\nargument and should try to establish the corresponding function, namespace or\r\nclass. That way, you can press edit on names that haven't been established in\r\nthe session yet.\r\n\r\nIf `Emacs.editor.boxing` is true, arrays will be displayed with boxing inside\r\nEmacs, using the DISPLAY function from the display workspace that comes with\r\nDyalog.\r\n\r\nKnown issues and limitations\r\n----------------------------\r\n\r\nArrays are always read-only and cannot be edited.\r\n\r\nIn versions of Dyalog before 14.0, if you invoke Emacs to edit the current\r\nfunction suspended in the debugger from inside the debugger and fix that\r\nfunction, the debuggers display of the function's source code isn't updated.\r\nThis is a Dyalog bug and cannot be fixed in Dyalog mode.\r\n\r\nIf you invoke Emacs to edit the name under the cursor in the Dyalog editor,\r\nany line number specified is ignored, e.g. even if you edit FUNC[3] Emacs\r\nwon't open with the cursor on line 3. This is a Dyalog limitation, the\r\nrequired information isn't available from within the editor.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayfoad%2Fdyalog-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayfoad%2Fdyalog-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayfoad%2Fdyalog-mode/lists"}