]> jfr.im git - irc/weechat/weechat.git/commitdiff
doc: add a chapter on buffer local variables (user's guide)
authorSébastien Helleu <redacted>
Sat, 19 Dec 2020 20:23:16 +0000 (21:23 +0100)
committerSébastien Helleu <redacted>
Sat, 19 Dec 2020 20:23:16 +0000 (21:23 +0100)
doc/de/weechat_user.de.adoc
doc/en/weechat_user.en.adoc
doc/fr/weechat_user.fr.adoc
doc/it/weechat_user.it.adoc
doc/ja/weechat_user.ja.adoc
doc/pl/weechat_user.pl.adoc

index 20b65575c2e92776dfbf1d3de846278f11214d9c..cd8fb0a769e20ad6a7ded1ef007b98943a4e231d 100644 (file)
@@ -1101,8 +1101,8 @@ Beispiele für eine vertikale und horizontale Fensteraufteilung:
                  ▲ Fenster #1 (Buffer #3)              ▲ Fenster #2 (Buffer #4)
 ....
 
-[[buffers_lines]]
-=== Zeilen in Buffern
+[[buffers]]
+=== Buffern
 
 [[lines_format]]
 ==== Format von Zeilen
@@ -1169,6 +1169,142 @@ Falls ein "notify_xxx" Tag vorhanden ist, kann die tatsächliche Benachrichtigun
 unterschiedlich sein. Wenn beispielsweise der max hotlist level für einen Nick verwendet
 wird, kann die Benachrichtigungsstufe niedriger sein als der Wert im Tag.
 
+// TRANSLATION MISSING
+[[local_variables]]
+==== Local variables
+
+Local variables can be defined in all buffers.
+
+A local variable has:
+
+* a name (string)
+* a value (string, can be empty).
+
+Local variables can be set by WeeChat, plugins, scripts, or manually on the
+command line in the buffer.
+
+For example to add the local variable "completion_default_template":
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+To list local variables in the current buffer:
+
+----
+/buffer listvar
+----
+
+To remove the local variable "completion_default_template":
+
+----
+/buffer delvar completion_default_template
+----
+
+By default WeeChat and its default plugins interpret these variables:
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Name | Value | Description
+
+| away |
+  any string |
+  Away message on the server, set by irc plugin.
+
+| channel |
+  any string |
+  Channel name, set by irc/xfer plugins and debug buffer of relay/trigger plugins.
+
+| charset_modifier |
+  any string |
+  Charset modifier for the server buffer, set by irc plugin.
+
+| completion_default_template |
+  any string |
+  Default completion template for the buffer, overriding the option
+  `weechat.completion.default_template`.
+
+| filter |
+  any string |
+  Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
+
+| host |
+  any string |
+  Self host (if known), set by irc plugin.
+
+| lag |
+  any string |
+  Lag on the server, set by irc plugin.
+
+| name |
+  any string |
+  Buffer name (be careful, this is not the full name and this name is not
+  enough to identify or search a buffer.
+
+| nick |
+  any string |
+  Self nick, set by irc and xfer plugins.
+
+| no_log |
+  `1` (or any non-empty string) |
+  If set, the logger plugin does not log anything for the buffer.
+
+| plugin |
+  any string |
+  Name of plugin which created the buffer (`core` for WeeChat buffers).
+
+| script_close_cb |
+  any string |
+  Close callback defined by a script for a buffer.
+
+| script_close_cb_data |
+  any string |
+  Data for close callback defined by a script for a buffer.
+
+| script_input_cb |
+  any string |
+  Input callback defined by a script for a buffer.
+
+| script_input_cb_data |
+  any string |
+  Data for input callback defined by a script for a buffer.
+
+| script_name |
+  any string |
+  Name of the script which created the buffer.
+
+| server |
+  any string |
+  Server name, set by irc plugin and debug buffer of relay/trigger plugins.
+
+| spell_suggest |
+  any string |
+  Misspelled word and suggestions (format: "misspelled:suggestions"), set by
+  spell plugin.
+
+| trigger_filter |
+  any string |
+  Trigger filter, set by trigger plugin.
+
+| type |
+  any string, for example:
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type of buffer, set by WeeChat and many plugins.
+
+|===
+
+[NOTE]
+External plugins and scripts can define and use other local variables.
+
 [[bars]]
 === Bars
 
index 287ca791014c7c9d8aec9f774a4b7c3549f538e6..27d644ae8af737814c6385435d46c2cb28628409 100644 (file)
@@ -1085,8 +1085,8 @@ Example of vertical + horizontal splits:
                  ▲ window #1 (buffer #3)               ▲ window #2 (buffer #4)
 ....
 
-[[buffers_lines]]
-=== Buffers lines
+[[buffers]]
+=== Buffers
 
 [[lines_format]]
 ==== Format of lines
@@ -1153,6 +1153,141 @@ Tags commonly used (non-exhaustive list):
 if a max hotlist level is used for a nick, the notify level can be lower than
 the value in the tag.
 
+[[local_variables]]
+==== Local variables
+
+Local variables can be defined in all buffers.
+
+A local variable has:
+
+* a name (string)
+* a value (string, can be empty).
+
+Local variables can be set by WeeChat, plugins, scripts, or manually on the
+command line in the buffer.
+
+For example to add the local variable "completion_default_template":
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+To list local variables in the current buffer:
+
+----
+/buffer listvar
+----
+
+To remove the local variable "completion_default_template":
+
+----
+/buffer delvar completion_default_template
+----
+
+By default WeeChat and its default plugins interpret these variables:
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Name | Value | Description
+
+| away |
+  any string |
+  Away message on the server, set by irc plugin.
+
+| channel |
+  any string |
+  Channel name, set by irc/xfer plugins and debug buffer of relay/trigger plugins.
+
+| charset_modifier |
+  any string |
+  Charset modifier for the server buffer, set by irc plugin.
+
+| completion_default_template |
+  any string |
+  Default completion template for the buffer, overriding the option
+  `weechat.completion.default_template`.
+
+| filter |
+  any string |
+  Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
+
+| host |
+  any string |
+  Self host (if known), set by irc plugin.
+
+| lag |
+  any string |
+  Lag on the server, set by irc plugin.
+
+| name |
+  any string |
+  Buffer name (be careful, this is not the full name and this name is not
+  enough to identify or search a buffer.
+
+| nick |
+  any string |
+  Self nick, set by irc and xfer plugins.
+
+| no_log |
+  `1` (or any non-empty string) |
+  If set, the logger plugin does not log anything for the buffer.
+
+| plugin |
+  any string |
+  Name of plugin which created the buffer (`core` for WeeChat buffers).
+
+| script_close_cb |
+  any string |
+  Close callback defined by a script for a buffer.
+
+| script_close_cb_data |
+  any string |
+  Data for close callback defined by a script for a buffer.
+
+| script_input_cb |
+  any string |
+  Input callback defined by a script for a buffer.
+
+| script_input_cb_data |
+  any string |
+  Data for input callback defined by a script for a buffer.
+
+| script_name |
+  any string |
+  Name of the script which created the buffer.
+
+| server |
+  any string |
+  Server name, set by irc plugin and debug buffer of relay/trigger plugins.
+
+| spell_suggest |
+  any string |
+  Misspelled word and suggestions (format: "misspelled:suggestions"), set by
+  spell plugin.
+
+| trigger_filter |
+  any string |
+  Trigger filter, set by trigger plugin.
+
+| type |
+  any string, for example:
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type of buffer, set by WeeChat and many plugins.
+
+|===
+
+[NOTE]
+External plugins and scripts can define and use other local variables.
+
 [[bars]]
 === Bars
 
index 0a551bf562991acd47016fcaa14d54e8380fc2c8..f28178aec9b9889e417b41624bef99ec6d311bd8 100644 (file)
@@ -1112,8 +1112,8 @@ Exemple de découpage vertical + horizontal :
                  ▲ fenêtre n°1 (tampon n°3)            ▲ fenêtre n°2 (tampon n°4)
 ....
 
-[[buffers_lines]]
-=== Lignes des tampons
+[[buffers]]
+=== Tampons
 
 [[lines_format]]
 ==== Format des lignes
@@ -1182,6 +1182,149 @@ le niveau de notification réel peut être différent, par exemple si un niveau
 maximum de hotlist est utilisé pour un pseudo, le niveau de notification peut
 être inférieur à la valeur de l'étiquette.
 
+[[local_variables]]
+==== Variables locales
+
+Des variables locales peuvent être définies dans les tampons.
+
+Une variable locale a :
+
+* un nom (chaîne)
+* une valeur (chaîne, peut être vide).
+
+Les variables locales peuvent être définies par WeeChat, les extensions, les
+scripts, ou manuellement sur la ligne de commande, dans le tampon.
+
+Par exemple pour ajouter la variable locale "completion_default_template" :
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+Pour afficher les variables locales du tampon courant :
+
+----
+/buffer listvar
+----
+
+Pour supprimer la variable locale "completion_default_template" :
+
+----
+/buffer delvar completion_default_template
+----
+
+Par défaut WeeChat et ses extensions par défaut interprètent ces variables :
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Nom | Valeur | Description
+
+| away |
+  toute chaîne |
+  Message d'absence sur le serveur, défini par l'extension irc.
+
+| channel |
+  toute chaîne |
+  Nom du canal, défini par les extensions irc/xfer et le tampon de debug des
+  extensions relay/trigger.
+
+| charset_modifier |
+  toute chaîne |
+  Modificateur de charset du tampon serveur, défini par l'extension irc.
+
+| completion_default_template |
+  toute chaîne |
+  Modèle de complétion par défaut pour le tampon, qui remplace l'option
+  `weechat.completion.default_template`.
+
+| filter |
+  toute chaîne |
+  Filtre défini sur certains tampons comme `/fset`, `/server raw` (irc) et
+  `/script`.
+
+| host |
+  toute chaîne |
+  Nom d'hôte personnel (si connu), défini par l'extension irc.
+
+| lag |
+  toute chaîne |
+  Lag sur le serveur, défini par l'extension irc.
+
+| name |
+  toute chaîne |
+  Nom du tampon (attention, ce n'est pas le nom complet du tampon et ce nom
+  n'est pas suffisant pour identifier ou chercher un tampon).
+
+| nick |
+  toute chaîne |
+  Pseudo personnel, défini par les extensions irc et xfer.
+
+| no_log |
+  `1` (or any non-empty string) |
+  Si défini, l'extension logger n'écrira pas le "log" du tampon sur disque.
+
+| plugin |
+  toute chaîne |
+  Nom de l'extension qui a créé le tampon (`core` pour les tampons WeeChat).
+
+| script_close_cb |
+  toute chaîne |
+  Nom de la fonction de rappel pour la fermeture,
+  défini par un script pour le tampon.
+
+| script_close_cb_data |
+  toute chaîne |
+  Données pour la fonction de rappel pour la fermeture,
+  définies par un script pour le tampon.
+
+| script_input_cb |
+  toute chaîne |
+  Nom de la fonction de rappel d'entrée,
+  défini par un script pour le tampon.
+
+| script_input_cb_data |
+  toute chaîne |
+  Données pour la fonction de rappel d'entrée,
+  définies par un script pour le tampon.
+
+| script_name |
+  toute chaîne |
+  Nom du script qui a créé le tampon.
+
+| server |
+  toute chaîne |
+  Nom du serveur, défini par l'extension irc et le tampon de debug des extensions
+  relay/trigger.
+
+| spell_suggest |
+  toute chaîne |
+  Mot mal orthographié et ses suggestions (format : "mot:suggestions"), défini
+  par l'extension spell.
+
+| trigger_filter |
+  toute chaîne |
+  Filtre trigger, défini par l'extension trigger.
+
+| type |
+  toute chaîne, par exemple :
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type de tampon, défini par WeeChat et plusieurs extensions.
+
+|===
+
+[NOTE]
+Les extensions et script externes peuvent définir et utiliser d'autres
+variables locales.
+
 [[bars]]
 === Barres
 
index 3750be2b97bb6c477f6d71481e26ce4d49551660..4b359b16f9cb5f478d45043f50e1ac628c55d942 100644 (file)
@@ -1172,8 +1172,8 @@ Esempio di split orizzontale + verticale:
 ....
 
 // TRANSLATION MISSING
-[[buffers_lines]]
-=== Buffers lines
+[[buffers]]
+=== Buffers
 
 [[lines_format]]
 ==== Format of lines
@@ -1247,6 +1247,142 @@ Tag usati di frequente (elenco non esaustivo):
 if a max hotlist level is used for a nick, the notify level can be lower than
 the value in the tag.
 
+// TRANSLATION MISSING
+[[local_variables]]
+==== Local variables
+
+Local variables can be defined in all buffers.
+
+A local variable has:
+
+* a name (string)
+* a value (string, can be empty).
+
+Local variables can be set by WeeChat, plugins, scripts, or manually on the
+command line in the buffer.
+
+For example to add the local variable "completion_default_template":
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+To list local variables in the current buffer:
+
+----
+/buffer listvar
+----
+
+To remove the local variable "completion_default_template":
+
+----
+/buffer delvar completion_default_template
+----
+
+By default WeeChat and its default plugins interpret these variables:
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Name | Value | Description
+
+| away |
+  any string |
+  Away message on the server, set by irc plugin.
+
+| channel |
+  any string |
+  Channel name, set by irc/xfer plugins and debug buffer of relay/trigger plugins.
+
+| charset_modifier |
+  any string |
+  Charset modifier for the server buffer, set by irc plugin.
+
+| completion_default_template |
+  any string |
+  Default completion template for the buffer, overriding the option
+  `weechat.completion.default_template`.
+
+| filter |
+  any string |
+  Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
+
+| host |
+  any string |
+  Self host (if known), set by irc plugin.
+
+| lag |
+  any string |
+  Lag on the server, set by irc plugin.
+
+| name |
+  any string |
+  Buffer name (be careful, this is not the full name and this name is not
+  enough to identify or search a buffer.
+
+| nick |
+  any string |
+  Self nick, set by irc and xfer plugins.
+
+| no_log |
+  `1` (or any non-empty string) |
+  If set, the logger plugin does not log anything for the buffer.
+
+| plugin |
+  any string |
+  Name of plugin which created the buffer (`core` for WeeChat buffers).
+
+| script_close_cb |
+  any string |
+  Close callback defined by a script for a buffer.
+
+| script_close_cb_data |
+  any string |
+  Data for close callback defined by a script for a buffer.
+
+| script_input_cb |
+  any string |
+  Input callback defined by a script for a buffer.
+
+| script_input_cb_data |
+  any string |
+  Data for input callback defined by a script for a buffer.
+
+| script_name |
+  any string |
+  Name of the script which created the buffer.
+
+| server |
+  any string |
+  Server name, set by irc plugin and debug buffer of relay/trigger plugins.
+
+| spell_suggest |
+  any string |
+  Misspelled word and suggestions (format: "misspelled:suggestions"), set by
+  spell plugin.
+
+| trigger_filter |
+  any string |
+  Trigger filter, set by trigger plugin.
+
+| type |
+  any string, for example:
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type of buffer, set by WeeChat and many plugins.
+
+|===
+
+[NOTE]
+External plugins and scripts can define and use other local variables.
+
 // TRANSLATION MISSING
 [[bars]]
 === Bars
index 80a7f698bb94f8f653d7317f776f02211ae147a7..b6be3ab2f08d92804bcb2061848befc7c58873e3 100644 (file)
@@ -1107,8 +1107,9 @@ _window_
                  ▲ ウィンドウ #1 (バッファ #3)         ▲ ウィンドウ #2 (バッファ #4)
 ....
 
-[[buffers_lines]]
-=== バッファの行
+// TRANSLATION MISSING
+[[buffers]]
+=== Buffers
 
 [[lines_format]]
 ==== 行の書式
@@ -1180,6 +1181,142 @@ WeeChat は様々な目的で各行にタグを付けます:
 if a max hotlist level is used for a nick, the notify level can be lower than
 the value in the tag.
 
+// TRANSLATION MISSING
+[[local_variables]]
+==== Local variables
+
+Local variables can be defined in all buffers.
+
+A local variable has:
+
+* a name (string)
+* a value (string, can be empty).
+
+Local variables can be set by WeeChat, plugins, scripts, or manually on the
+command line in the buffer;
+
+For example to add the local variable "completion_default_template":
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+To list local variables in the current buffer:
+
+----
+/buffer listvar
+----
+
+To remove the local variable "completion_default_template":
+
+----
+/buffer delvar completion_default_template
+----
+
+By default WeeChat and its default plugins interpret these variables:
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Name | Value | Description
+
+| away |
+  any string |
+  Away message on the server, set by irc plugin.
+
+| channel |
+  any string |
+  Channel name, set by irc/xfer plugins and debug buffer of relay/trigger plugins.
+
+| charset_modifier |
+  any string |
+  Charset modifier for the server buffer, set by irc plugin.
+
+| completion_default_template |
+  any string |
+  Default completion template for the buffer, overriding the option
+  `weechat.completion.default_template`.
+
+| filter |
+  any string |
+  Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
+
+| host |
+  any string |
+  Self host (if known), set by irc plugin.
+
+| lag |
+  any string |
+  Lag on the server, set by irc plugin.
+
+| name |
+  any string |
+  Buffer name (be careful, this is not the full name and this name is not
+  enough to identify or search a buffer.
+
+| nick |
+  any string |
+  Self nick, set by irc and xfer plugins.
+
+| no_log |
+  `1` (or any non-empty string) |
+  If set, the logger plugin does not log anything for the buffer.
+
+| plugin |
+  any string |
+  Name of plugin which created the buffer (`core` for WeeChat buffers).
+
+| script_close_cb |
+  any string |
+  Close callback defined by a script for a buffer.
+
+| script_close_cb_data |
+  any string |
+  Data for close callback defined by a script for a buffer.
+
+| script_input_cb |
+  any string |
+  Input callback defined by a script for a buffer.
+
+| script_input_cb_data |
+  any string |
+  Data for input callback defined by a script for a buffer.
+
+| script_name |
+  any string |
+  Name of the script which created the buffer.
+
+| server |
+  any string |
+  Server name, set by irc plugin and debug buffer of relay/trigger plugins.
+
+| spell_suggest |
+  any string |
+  Misspelled word and suggestions (format: "misspelled:suggestions"), set by
+  spell plugin.
+
+| trigger_filter |
+  any string |
+  Trigger filter, set by trigger plugin.
+
+| type |
+  any string, for example:
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type of buffer, set by WeeChat and many plugins.
+
+|===
+
+[NOTE]
+External plugins and scripts can define and use other local variables.
+
 [[bars]]
 === バー
 
index 1e2064ec469d2927bc4427e952f4a46967962d9d..e97c6430a87b5bad5c4025090d40199b9f19222f 100644 (file)
@@ -1099,8 +1099,8 @@ Przykład podziałów pionowego i poziomego:
                  ▲ window #1 (buffer #3)               ▲ window #2 (buffer #4)
 ....
 
-[[buffers_lines]]
-=== Linie buforów
+[[buffers]]
+=== Buforów
 
 [[lines_format]]
 ==== Format linii
@@ -1172,6 +1172,142 @@ Popularnie używane tagi  (niepełna lista):
 if a max hotlist level is used for a nick, the notify level can be lower than
 the value in the tag.
 
+// TRANSLATION MISSING
+[[local_variables]]
+==== Local variables
+
+Local variables can be defined in all buffers.
+
+A local variable has:
+
+* a name (string)
+* a value (string, can be empty).
+
+Local variables can be set by WeeChat, plugins, scripts, or manually on the
+command line in the buffer.
+
+For example to add the local variable "completion_default_template":
+
+----
+/buffer setvar completion_default_template %(my_completion)
+----
+
+To list local variables in the current buffer:
+
+----
+/buffer listvar
+----
+
+To remove the local variable "completion_default_template":
+
+----
+/buffer delvar completion_default_template
+----
+
+By default WeeChat and its default plugins interpret these variables:
+
+[width="100%",cols="^2m,2,5",options="header"]
+|===
+| Name | Value | Description
+
+| away |
+  any string |
+  Away message on the server, set by irc plugin.
+
+| channel |
+  any string |
+  Channel name, set by irc/xfer plugins and debug buffer of relay/trigger plugins.
+
+| charset_modifier |
+  any string |
+  Charset modifier for the server buffer, set by irc plugin.
+
+| completion_default_template |
+  any string |
+  Default completion template for the buffer, overriding the option
+  `weechat.completion.default_template`.
+
+| filter |
+  any string |
+  Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
+
+| host |
+  any string |
+  Self host (if known), set by irc plugin.
+
+| lag |
+  any string |
+  Lag on the server, set by irc plugin.
+
+| name |
+  any string |
+  Buffer name (be careful, this is not the full name and this name is not
+  enough to identify or search a buffer.
+
+| nick |
+  any string |
+  Self nick, set by irc and xfer plugins.
+
+| no_log |
+  `1` (or any non-empty string) |
+  If set, the logger plugin does not log anything for the buffer.
+
+| plugin |
+  any string |
+  Name of plugin which created the buffer (`core` for WeeChat buffers).
+
+| script_close_cb |
+  any string |
+  Close callback defined by a script for a buffer.
+
+| script_close_cb_data |
+  any string |
+  Data for close callback defined by a script for a buffer.
+
+| script_input_cb |
+  any string |
+  Input callback defined by a script for a buffer.
+
+| script_input_cb_data |
+  any string |
+  Data for input callback defined by a script for a buffer.
+
+| script_name |
+  any string |
+  Name of the script which created the buffer.
+
+| server |
+  any string |
+  Server name, set by irc plugin and debug buffer of relay/trigger plugins.
+
+| spell_suggest |
+  any string |
+  Misspelled word and suggestions (format: "misspelled:suggestions"), set by
+  spell plugin.
+
+| trigger_filter |
+  any string |
+  Trigger filter, set by trigger plugin.
+
+| type |
+  any string, for example:
+  `channel`,
+  `debug`,
+  `exec`,
+  `option`,
+  `private`,
+  `relay`,
+  `script`,
+  `server`,
+  `user`,
+  `xfer` |
+  Type of buffer, set by WeeChat and many plugins.
+
+|===
+
+[NOTE]
+External plugins and scripts can define and use other local variables.
+
 [[bars]]
 === Paski