Subject: CVS commit: pkgsrc/chat/weechat
From: Ryo ONODERA
Date: 2023-02-13 14:58:56
Message id: 20230213135856.D7CF1FA90@cvs.NetBSD.org

Log Message:
weechat: Update to 3.8

* Add PYTHON_VERSIONS_INCOMPATIBLE=27 for 3.8

Changelog:
Version 3.8 (2023-01-08)

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):

         Old command                New command              Default key
/input jump_smart              /buffer jump smart     kbd:[Alt+a]

/input                         /buffer jump           kbd:[Alt+<]
jump_previously_visited_buffer prev_visited

/input                         /buffer jump           kbd:[Alt+>]
jump_next_visited_buffer       next_visited

/input                         /buffer jump           kbd:[Alt+/]
jump_last_buffer_displayed     last_displayed

/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    kbd:[Ctrl+s], kbd:
                               unread                 [Ctrl+u]

/input                         /buffer set unread     (none)
set_unread_current_buffer

/input switch_active_buffer    /buffer switch         kbd:[Ctrl+x]

/input                         /buffer switch         (none)
switch_active_buffer_previous  -previous

/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

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:

int diff = string_strcasecmp ("aaa", "CCC");  /* == -2 */

With older releases:

int diff = string_strcasecmp ("aaa", "CCC");  /* == -1 */

API functions string_tolower and string_toupper

The functions string_tolower and string_toupper now return newly allocated
string instead of doing the change in place.
The returned string must then be freed after use.

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.

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.

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).

Version 3.7.1 (2022-10-21)

Bug fix and maintenance release.

Version 3.7 (2022-10-09)

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:

if int(object_id) == 1:
    # ...

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:

if int(remaining_calls) > 0:
    # ...

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

Function string_rebuild_split_string

The API function string_build_with_split_string has been renamed to
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

Version 3.6 (2022-07-10)

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.

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

Files:
RevisionActionfile
1.135modifypkgsrc/chat/weechat/Makefile
1.76modifypkgsrc/chat/weechat/distinfo