= WeeChat Release Notes :author: Sébastien Helleu :email: flashcode@flashtux.org :lang: en :toc: left :docinfo1: This document lists important changes for each version, that require manual actions (the latest formatted version of this document can be found https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[here]). + It is recommended to read it when upgrading to a new stable version. For a complete list of changes, please look at https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog] (file _ChangeLog.adoc_ in sources). [[v3.9]] == Version 3.9 (under dev) [[v3.9_ctrl_keys_lower_case]] === Control keys as lower case Keys using the kbd:[Ctrl] key and a letter are now automatically converted to lower case. + That means for example keys `ctrl-q` and `ctrl-Q` are the same and saved as `ctrl-q` (lower case). Example of key being automatically converted to lower case: ---- /key bind ctrl-Q /print test ---- Output is now: ---- New key binding (context "default"): ctrl-q => /print test ---- With older releases, upper case was mandatory and lower case letter for control keys were not working at all. [[v3.9_case_sensitive_identifiers]] === Case sensitive identifiers Many identifiers are made case sensitive, including among others: - configuration files, sections, options - commands, aliases - completion (except nick completion) - bars, bar items - colors - filters - IRC servers - scripts - triggers. See https://specs.weechat.org/specs/2023-001-case-sensitive-identifiers.html[Case sensitive identifiers specification] for more information. Accordingly, default aliases are now in lower case. + If you upgraded from an old WeeChat version, the aliases are still in upper case and must be completed/used with upper case. For example `/CLO` + key kbd:[Tab] completes to `/CLOSE` (and `/close` is not valid any more). + The default aliases can be converted to lower case with the following commands: ---- /alias rename AAWAY aaway /alias rename ANICK anick /alias rename BEEP beep /alias rename BYE bye /alias rename C c /alias rename CHAT chat /alias rename CL cl /alias rename CLOSE close /alias rename EXIT exit /alias rename IG ig /alias rename J j /alias rename K k /alias rename KB kb /alias rename LEAVE leave /alias rename M m /alias rename MSGBUF msgbuf /alias rename MUB mub /alias rename N n /alias rename Q q /alias rename REDRAW redraw /alias rename SAY say /alias rename SIGNOFF signoff /alias rename T t /alias rename UB ub /alias rename UMODE umode /alias rename V v /alias rename W w /alias rename WC wc /alias rename WI wi /alias rename WII wii /alias rename WM wm /alias rename WW ww ---- [[v3.9_remove_autotools]] === Remove build with autotools The autotools support for build of WeeChat has been removed. + WeeChat must now be built with CMake. [[v3.8]] == Version 3.8 (2023-01-08) [[v3.8_command_input_options]] === Move of options out of command /input Some options of `/input` command have been moved to other commands (they can still be used with `/input` but marked as deprecated and completion has been removed): [width="100%",cols="4m,4m,3",options="header"] |=== | Old command | New command | Default key | /input jump_smart | /buffer jump smart | kbd:[Alt+a] | /input jump_previously_visited_buffer | /buffer jump prev_visited | kbd:[Alt+<] | /input jump_next_visited_buffer | /buffer jump next_visited | kbd:[Alt+>] | /input jump_last_buffer_displayed | /buffer jump last_displayed | kbd:[Alt+/] | /input hotlist_clear | /hotlist clear | kbd:[Alt+h], kbd:[Alt+c] | /input hotlist_remove_buffer | /hotlist remove | kbd:[Alt+h], kbd:[Alt+m] | /input hotlist_restore_buffer | /hotlist restore | kbd:[Alt+h], kbd:[Alt+r] | /input hotlist_restore_all | /hotlist restore -all | kbd:[Alt+h], kbd:[Alt+Shift+R] | /input set_unread | /allbuf /buffer set unread | kbd:[Ctrl+s], kbd:[Ctrl+u] | /input set_unread_current_buffer | /buffer set unread | (none) | /input switch_active_buffer | /buffer switch | kbd:[Ctrl+x] | /input switch_active_buffer_previous | /buffer switch -previous | (none) | /input zoom_merged_buffer | /buffer zoom | kbd:[Alt+x] |=== The following default keys can be reset to use the new command: ---- /key reset meta-a /key reset meta-< /key reset meta-> /key reset meta-/ /key reset meta-hmeta-c /key reset meta-hmeta-m /key reset meta-hmeta-r /key reset meta-hmeta-R /key reset ctrl-Sctrl-U /key reset ctrl-X /key reset meta-x ---- [[v3.8_return_code_string_comparison_functions]] === Return code of string comparison functions The following functions now return arithmetic result of subtracting the last compared UTF-8 char in string2 from the last compared UTF-8 char in string1: * string_charcmp * string_charcasecmp * string_charcasecmp_range * string_strcasecmp * string_strcasecmp_range * string_strncasecmp * string_strncasecmp_range * string_strcmp_ignore_chars In addition, the case conversion has been extended, now in addition to range A-Z, all chars that have a lower case version are handled. + That means for example the case insensitive comparison of "é" and "É" is 0 (chars are considered equal). Example with WeeChat 3.8: [source,c] ---- int diff = string_strcasecmp ("aaa", "CCC"); /* == -2 */ ---- With older releases: [source,c] ---- int diff = string_strcasecmp ("aaa", "CCC"); /* == -1 */ ---- [[v3.8_api_string_lower_upper]] === API functions string_tolower and string_toupper The functions link:https://weechat.org/doc/plugin/#_string_tolower[string_tolower] and link:https://weechat.org/doc/plugin/#_string_toupper[string_toupper] now return newly allocated string instead of doing the change in place. + The returned string must then be freed after use. [[v3.8_trigger_regex_command]] === Trigger regex command The trigger regex now starts with a command, which is "s" (regex replace, default) or "y" (translate chars). For compatibility, any regex starting with a delimiter different from a letter will still work. If you defined some triggers with a regex starting with a letter (used as delimiter), then you must change them *before* upgrading WeeChat, otherwise they'll be lost after upgrade (with an error when WeeChat tries to load them from configuration file). For example this regex is now invalid: ---- XabcXdefX ---- And must be replaced by: ---- sXabcXdefX ---- For more information on the regex format, see the trigger chapter in the _WeeChat User's guide_. [[v3.8_remove_python2_support]] === Remove Python 2 support The CMake option `ENABLE_PYTHON2` and autotools option `--enable-python2` have been removed, and WeeChat can not be compiled with Python 2.x any more. [[v3.8_config_new_option_callbacks]] === Callbacks of function config_new_option The two callbacks "callback_change" and "callback_delete" in scripting API function config_new_option have been changed: an integer return value was expected by error, now any return value is ignored (like it has always been in the C API). [[v3.7.1]] == Version 3.7.1 (2022-10-21) Bug fix and maintenance release. [[v3.7]] == Version 3.7 (2022-10-09) [[v3.7_upgrade_new_callback_object_id]] === Argument "object_id" in callback of upgrade_new In all script languages (except PHP), the argument "object_id" sent to the callback of "upgrade_new" is now an integer (it was a string in older releases). To be compatible with all versions, it is recommended to convert the argument to integer before testing it, for example in Python: [source,python] ---- if int(object_id) == 1: # ... ---- [[v3.7_hook_timer_callback_remaining_calls]] === Argument "remaining_calls" in callback of hook_timer In all script languages (except PHP), the argument "remaining_calls" sent to the callback of "hook_timer" is now an integer (it was a string in older releases). To be compatible with all versions, it is recommended to convert the argument to integer before testing it, for example in Python: [source,python] ---- if int(remaining_calls) > 0: # ... ---- [[v3.7_delete_previous_word_whitespace]] === Delete previous word until whitespace A new parameter `delete_previous_word_whitespace` has been added in `/input` command to delete previous word until backspace. + This is now bound by default to the key kbd:[Ctrl+w] (see issue #559). A new key kbd:[Alt+Backspace] has been added to delete word, like kbd:[Ctrl+w] did in previous releases. You can get the new behavior for kbd:[Ctrl+w] with this command: ---- /key bind ctrl-W /input delete_previous_word_whitespace ---- And add the new key kbd:[Alt+Backspace] with this command: ---- /key missing ---- [[v3.7_api_string_rebuild_split_string]] === Function string_rebuild_split_string The API function string_build_with_split_string has been renamed to link:https://weechat.org/doc/plugin/#_string_rebuild_split_string[string_rebuild_split_string] and two new arguments have been added: _index_start_ and _index_end_. To stay compatible, the existing calls to the function must be done with the new function name and these values: * _index_start_: `0` * _index_end_: `-1` [[v3.6]] == Version 3.6 (2022-07-10) [[v3.6_hook_print_empty_messages]] === Hook print on empty messages The "hook_print" callback is now called even when an empty message is displayed (with or without prefix). This was a bug, but is mentioned here just in case some scripts callbacks would be surprised to be called with such empty messages. [[v3.6_trigger_beep]] === Default trigger "beep" The command of "beep" trigger is now executed only if the buffer notify is NOT set to `none` (in addition to existing conditions). You can restore the default trigger "beep" with the following command: ---- /trigger restore beep ---- [[v3.5]] == Version 3.5 (2022-03-27) [[v3.5_relay_weechat_compression_zstd]] === Compression "zstandard" in relay Relay of type "weechat" now offers a compression with https://facebook.github.io/zstd/[Zstandard], which allows better compression and is much faster than zlib for both compression and decompression. The new compression type is `zstd`, and the default compression is now `off` instead of `zlib`: the compression must now be explicitly given in the link:https://weechat.org/doc/relay/#command_handshake[handshake] command. The option `compression` in link:https://weechat.org/doc/relay/#command_handshake[init] command has been removed, it is now ignored and must be given in the link:https://weechat.org/doc/relay/#command_handshake[handshake] command (it was deprecated since WeeChat 2.9). The option relay.network.compression_level has been renamed to relay.network.compression and is now a percentage between `0` and `100`: * `0`: disable compression * `1`: low compression (fast) * `100`: best compression (slow) [[v3.4.1]] == Version 3.4.1 (2022-03-13) Bug fix and maintenance release. [[v3.4]] == Version 3.4 (2021-12-18) [[v3.4_default_triggers]] === Default triggers The existing triggers "cmd_pass" and "cmd_pass_register" have been updated to hide key and password in command `/msg nickserv setpass ` and support the option `-server `. You can restore the default triggers with the following command: ---- /trigger restore cmd_pass cmd_pass_register ---- [[v3.4_hdata_search]] === New parameters in function hdata_search New parameters have been added in function link:https://weechat.org/doc/plugin/#_hdata_search[hdata_search], used for the evaluation of expression. New parameters are the same as function link:https://weechat.org/doc/plugin/#_string_eval_expression[string_eval_expression]: * pointers: hashtable with pointers (pointers) * extra_vars: hashtable with extra variables (strings) * options: hashtable with options (strings). The following scripts are updated consequently to be compatible with all WeeChat versions: * https://weechat.org/scripts/source/autoauth.py/[autoauth.py] 1.3 * https://weechat.org/scripts/source/buffer_open.py/[buffer_open.py] 0.3 * https://weechat.org/scripts/source/collapse_channel.py/[collapse_channel.py] 0.9 * https://weechat.org/scripts/source/grep_filter.py/[grep_filter.py] 0.11 * https://weechat.org/scripts/source/samechannel.rb/[samechannel.rb] 0.2 * https://weechat.org/scripts/source/soju.py/[soju.py] 0.1.4 * https://weechat.org/scripts/source/stalker.pl/[stalker.pl] 1.6.3 [[v3.4_hdata_arrays]] === Static array support in hdata Support of static array in hdata has been added. For pointers to arrays, a prefix `*,` must be added in parameter `array_size` of API function link:https://weechat.org/doc/plugin/#_hdata_new_var[hdata_new_var]. [[v3.3]] == Version 3.3 (2021-09-19) [[v3.3_hotlist_keys_clear_restore]] === New keys for hotlist New keys have been added to manipulate the hotlist: * kbd:[Alt+h], kbd:[Alt+c]: clear the whole hotlist (former key: kbd:[Alt+h]) * kbd:[Alt+h], kbd:[Alt+m]: mark the current buffer as read by removing it from the hotlist * kbd:[Alt+h], kbd:[Alt+r]: restore latest hotlist removed in the current buffer * kbd:[Alt+h], kbd:[Alt+Shift+R]: restore latest hotlist removed in all buffers You can add them with the following command: ---- /key missing ---- Since the key kbd:[Alt+h] has been moved to kbd:[Alt+h], kbd:[Alt+c], you must manually remove the old key: ---- /key unbind meta-h ---- [[v3.3_typing_bar_item]] === Bar item "typing" A bar item called "typing" has been added to status bar by default. It is used to display users that are currently typing a message on the current IRC channel or private buffer. If you want to display typing notifications in the status bar, add `,[typing]` in your option weechat.bar.status.items. [[v3.3_ordered_hashtables]] === Ordered hashtables Hashtables entries are now ordered by creation date, the following functions are now returning entries sorted by insertion order: * hashtable_map * hashtable_map_string * hashtable_get_string (all properties except "keys_sorted" and "keys_values_sorted") * hashtable_add_to_infolist [[v3.3_irc_default_capabilities]] === IRC default capabilities All supported capabilities are now enabled by default if the server support them: * account-notify * away-notify * cap-notify * chghost * extended-join * invite-notify * message-tags * multi-prefix * server-time * setname * userhost-in-names Two new options have been added and enabled by default to customize the behavior of capabilities "account-notify" and "extended-join": * irc.look.display_account_message: display ACCOUNT messages received * irc.look.display_extended_join: display extended join info in the JOIN messages: account name and real name The default value of option irc.server_default.capabilities is now `*` which means that all capabilities supported by both WeeChat and the server are enabled by default. After upgrade, to enable all capabilities and remove custom capabilities you have set, you can do: ---- /set irc.server_default.capabilities "*" /unset irc.server.example.capabilities ---- You can also explicitly disable some capabilities with this syntax (see `/help irc.server_default.capabilities`): ---- /set irc.server_default.capabilities "*,!away-notify,!extended-join" ---- [[v3.3_irc_sasl_blowfish_aes]] === IRC SASL DH-BLOWFISH and DH-AES mechanisms removed The SASL mechanisms DH-BLOWFISH and DH-AES have been removed, because they are insecure and already removed from most IRC servers. + If you were using one of these mechanisms, it is highly recommended to switch to any other supported SASL mechanism. For example: ---- /set irc.server.example.sasl_mechanism scram-sha-256 ---- [[v3.2.1]] == Version 3.2.1 (2021-09-04) Bug fix and maintenance release. [[v3.2]] == Version 3.2 (2021-06-13) [[v3.2_xdg_directories]] === XDG directories Support of XDG directories has been added. For compatibility, if the XDG directories are not found but `~/.weechat` exists, this single directory is used for all files. If you want to switch to XDG directories, you must create and move manually all files in the appropriate directories. + See https://specs.weechat.org/specs/001285-follow-xdg-base-dir-spec.html#weechat-home[WeeChat XDG specification] for more information. Some options have new default value: `%h` is replaced by `${weechat_xxx_dir}`. + If you didn't change the value, it is recommended to set the new default value, by doing `/unset