package ecaml
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Library for writing Emacs plugin in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=87e76473915e12d718096100a5c4d15d98aba6f99ecbf21814b7389e8c28bb25
doc/CHANGES.html
Release v0.17.0
- Ecaml is now built and tested against Emacs 29.2 (was Emacs 27.2).
Basic data types
- Removed unused module type
Customization.Enum Customization.Type.Optionis now an inline record with self-documenting fields. It corresponds to the Elisp customization type'(choice (const :tag "documentation for nil" nil) <some-other-type>).Defun.defaliasnow allows the definition to be any value, not just a symbol, as the Elispdefaliasallows.- Removed
Symbol.set_function. UseDefun.defaliasinstead, which handles load-history, documentation, advice, etc. properly. Hooknow supports binding special hooks, including those whose functions return meaningful values.Hook.t,Hook_type.t, andHook.Function.tnow have an additional type parameter to track the return type of the hook functions.- Add variant
Hook_type.Query_functionfor things likekill-buffer-query-functions. - Add
Progress_reportermodule, with bindings and helper functions for echo area progress reporters - Add
Text.of_utf8_bytes_replacing_invalid, similar toText.of_utf8_bytesbut with error-handling if the OCaml string contains malformed UTF-8 sequences - Add
Text.Property_name.help_echoandText.Property_name.kbd_helpbindings for Emacs mouse-over and idle help display functionality. - Add
Timer.run_after_idleandTimer.run_after_idle_ifor creating idle timers (run-with-idle-timer)
- Removed unused module type
Buffers
- New function
Buffer.find_byfinds a live buffer using a predicate function Current_buffer.replace_buffer_contentsis assumed to always be available (requires Emacs 26+).- Removed function
Current_buffer.describe_mode - Add
Mode_line.Format.header_line_in_buffer, a binding forheader-line-format(likemode-line-format, but for the buffer-local header line). - Add
Mode_line.Format.emptyandMode_line.Format.string_verbatimhelpers to make mode-line format constructs.
- New function
Commands and user interaction
Removed
Command.quit_flagbinding forquit-flag. Ecaml now calls theprocess_inputmodule function to poll for whether a blocking Async operation should be interrupted, and preserves the originalquitsignal instead of replacing it with an OCaml exception.If you need to set this variable for whatever reason, you can use
Command.Private.request_quit, but this is not useful outside of tests.Completing.readandCompleting.read_multiplenow acceptcollectionparameter asstring listinstead of a variant type. The Elisp value variant was almost never used.- Add
Prefixvariant toDefun.Interactive.tfor numerical prefix arguments. This corresponds to thepinteractive specifier in Elisp. - Add
Browse_url.browser-function, a binding for thebrowse-url-browser-functioncustomization. - Add binding
User.init_fileforuser-init-filevariable. It isNoneif Emacs was started with-qor--no-init-fileoptions.
Major modes
- Add
Major_mode.Lisp_dataforlisp-data-mode.Major_mode.Lisp, which is now unused, has been deleted. - Reworked the
Tabulated_listAPI. Creating aTabulated_list.tnow requires specifying a function to extract a non-empty string ID for each record, rather than an arbitrary ID type. This change was required to provide a custom sorting function for each column, instead of just the native Emacs string comparison function. - Records (not just IDs) are now stored in the buffer itself and can be extracted by calling
Tabulated_list.get_record_at_point_exn.
- Add
System
- Add optional argument to
Directory.files_recursively:?ignore_unreadable_dirsdefaults to false and corresponds to thePREDICATEargument ofdirectory-files-recursively. - Update the type of
Filename.expand's~in_dirargument.Default_directory_in_current_bufferis equivalent to omitting the second argument toexpand-file-name. - Add optional arguments to
Process.create:coding,query_before_exit, andstderr. These correspond to the:coding,:noquery(inverted) and:stderrarguments tomake-process.
- Add optional argument to
Release v0.16.0
- Ecaml is now built and tested against Emacs 27.2 (was Emacs 26.3).
- Stop loading library
cl.el, which is deprecated (Ecaml usescl-libnow instead). Basic data types
- Removed deprecated module type
Value.Type.Enum. Users should now useValue.Type.Enum.Sinstead. - Add
Filename.extension, a wrapper forfile-name-extension. - Add
Emacs_version.major_version, a wrapper for variableemacs-major-version. - Add
Hook.Function.symbol, which retrieves the name of a given hook function. Process.call_exnnow accepts an optional?stderrargument, which specifies what to do with the standard error output from the process. The default,Mix, retains the old behavior of interleaving it with the standard output. It can also be dropped withDrop_if_okor redirected elsewhere withSplit.Advice.defun_around_funcallnow raises a more informative error message when the advice function's arity does not match the advised function's.
- Removed deprecated module type
Buffers and Text
- Add
Buffer.is_modified, a wrapper forbuffer-modified-p. Current_buffer.active_regionnow checksuse-region-pinstead ofmark-active.- Add optional arguments
max_durationandmax_costsforCurrent_buffer.replace_buffer_contents. See the docstring forreplace-buffer-contents. - Add
Kill_ring.current_kill_exn, which returns the first item in the kill ring (the one that would be inserted byyank). It can also return text copied from another GUI application, if available. This is a wrapper forcurrent-kill. - Add
Overlay.delete_property. This sets an overlay property to nil, as Emacs doesn't expose a way to actually remove the property from an overlay's plist; for most text properties, a nil value has the same effect as a missing one. - Add
Point.Property_searchmodule, which wrapstext-property-search-forwardand its required argument types. - Add wrappers for text property names:
Text.Property_name.{after_string,before_string,invisible}, equivalent toafter-string,before-string, andinvisible. - Add
Rx.Char_class.Named, which allows specifying a character class by name (e.g., "alphabetic", "digit"), rather than by listing them in a string or specifying a range.
- Add
Commands
- Add type
Symbol.Disabled.t, which allows disabled commands to include a message, such as to explain why a command was disabled. This message is displayed when the user attempts to run the disabled command.defun_* ?disabledarguments use the new type. - Add
Key_sequence.invoking_this_command, a wrapper forthis-command-keys.
- Add type
Faces
- Add
Color.of_rgb8, which takes arguments in the range[0, 255](instead of[0, 65_535]asColor.of_rgbdoes). - Add
Face.Attribute.Extendvariant, to handle the built-in faces in Emacs 28.
- Add
Frames and Windows
Frame.window_listnow accepts an optional?frameargument. WhenNone, this still lists the windows of the selected frame.- Make
Selected_window.find_file_other_windowAsync, asfind_filealready was.
Major modes
- Add
Compilation.major_mode, a wrapper forcompilation-mode. - Add
Compilation.find_buffer, a wrapper forcompilation-find-buffer. - Add
Major_mode.Python, a wrapper forpython-mode.
- Add
Minor modes
- Add
Minor_mode.auto_fill, a wrapper forauto-fil-mode Minor_mode.define_minor_mode'sinitializefunction now receives the minor mode being defined as an argument; this can be used to change the behavior based on whether the minor mode is being enabled or disabled, or to add hooks/commands that may enable/disable the minor mode.
- Add
Other
Buffer.with_temp_bufferandEcho_area.wrap_messagenow accept aSync_or_async.targument, instead of requiring the body to returnDeferred.t.- Add
Customization.Type.Key_sequencevariant. - Add
Minibuffer.read_file_name, a wrapper forread-file-name
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page