From ff1ddf6251766ac11422079bc16fd3a7254b5fe0 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 21 Feb 2022 14:00:14 +0100 Subject: [PATCH] Fixup 71623b88: change semantics of "delete" LFUNs again Instead of specifying "force" to disable the deletion protection mechanism, invert the default so that "confirm" is needed to activate it. The idea is to keep the lfun reasonable for scripting and add a special argument for interactive use. Document in release notes. Update LFUN.lyx documentation Update bind files. Add conversion step to prefs2prefs_lfun.py. --- lib/RELEASE-NOTES | 10 + lib/bind/cua.bind | 4 +- lib/bind/emacs.bind | 8 +- lib/bind/mac.bind | 10 +- lib/bind/site.bind | 4 +- lib/bind/sk/menus.bind | 2 +- lib/bind/xemacs.bind | 10 +- lib/doc/LFUNs.lyx | 1346 +++++++++++------------------- lib/scripts/prefs2prefs_lfuns.py | 24 +- src/LyXAction.cpp | 18 +- src/Text3.cpp | 8 +- src/mathed/InsetMathNest.cpp | 8 +- 12 files changed, 540 insertions(+), 912 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index bd562bf802..f91b3d677d 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -178,6 +178,16 @@ * branch-sync-all: Open/close all insets of selected branch (depending on its activation status). +* word-delete-forward, word-delete-backward, char-delete-forward, + char-delete-backward + + The 2.4 behavior of these functions is almost equivalent to the + pre-2.3 behavior: without argument, it just deletes the + next/previous element; with the "confirm" argument however, big + insets are selected on the first call and deleted only on the + second. This new behavior allow scripts to work intuitively and + require the argument only for interactive use. + !!!The following LyX functions have been removed in 2.4: diff --git a/lib/bind/cua.bind b/lib/bind/cua.bind index 9ec1f340ca..ac4236a470 100644 --- a/lib/bind/cua.bind +++ b/lib/bind/cua.bind @@ -226,8 +226,8 @@ Format 5 # Edit group # -\bind "C-Delete" "word-delete-forward" -\bind "C-BackSpace" "word-delete-backward" +\bind "C-Delete" "word-delete-forward confirm" +\bind "C-BackSpace" "word-delete-backward confirm" \bind "M-Return" "paragraph-break inverse" \bind "C-Return" "newline-insert newline" \bind "C-S-Return" "newline-insert linebreak" diff --git a/lib/bind/emacs.bind b/lib/bind/emacs.bind index 3a6a52096f..dec719b8cd 100644 --- a/lib/bind/emacs.bind +++ b/lib/bind/emacs.bind @@ -31,7 +31,7 @@ Format 5 \bind "C-a" "line-begin" \bind "C-b" "char-backward" #bind "C-c" "------" // used as users prefix -\bind "C-d" "char-delete-forward" +\bind "C-d" "char-delete-forward confirm" \bind "C-e" "line-end" \bind "C-f" "char-forward" \bind "C-g" "cancel" @@ -225,9 +225,9 @@ Format 5 # Edit group # -\bind "C-Delete" "word-delete-forward" -\bind "M-d" "word-delete-forward" -\bind "C-BackSpace" "word-delete-backward" +\bind "C-Delete" "word-delete-forward confirm" +\bind "M-d" "word-delete-forward confirm" +\bind "C-BackSpace" "word-delete-backward confirm" \bind "M-Return" "paragraph-break inverse" \bind "C-Return" "newline-insert newline" \bind "C-S-Return" "newline-insert linebreak" diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind index d90b78b401..5d9b397d1e 100644 --- a/lib/bind/mac.bind +++ b/lib/bind/mac.bind @@ -53,13 +53,13 @@ Format 5 # +: "Control-B" # Move one character backward \bind "M-b" "char-backward" # +: "Control-D" # Delete the character in front of the cursor -\bind "M-d" "char-delete-forward" +\bind "M-d" "char-delete-forward confirm" # +: "Control-E" # Move to end of line/paragraph \bind "M-e" "line-end" # +: "Control-F" # Move one character forward \bind "M-f" "char-forward" # +: "Control-H" # Delete the character behind the cursor -\bind "M-h" "char-delete-backward" +\bind "M-h" "char-delete-backward confirm" # -: "Control-K" # Delete from the character in front of the cursor to the end of the line/paragraph # used by menu.bind - keymap # +: "Control-L" # Center the cursor/selection in the visible area @@ -83,7 +83,7 @@ Format 5 \bind "M-S-BackTab" "buffer-previous" \bind "A-S-BackTab" "buffer-previous" # +: "fn-Delete" # Forward Delete (on portable Macs' built-in keyboard) -\bind "Delete" "char-delete-forward" +\bind "Delete" "char-delete-forward confirm" # ?: "Control-F1" # Toggle full keyboard access on or off # +: "Control-F2" # Move focus to the menu bar # +: "Control-F3" # Move focus to the Dock @@ -348,8 +348,8 @@ Format 5 # Additional Edit group # -\bind "A-Delete" "word-delete-forward" -\bind "A-BackSpace" "word-delete-backward" +\bind "A-Delete" "word-delete-forward confirm" +\bind "A-BackSpace" "word-delete-backward confirm" \bind "M-Return" "paragraph-break inverse" \bind "C-Return" "newline-insert newline" \bind "C-S-Return" "newline-insert linebreak" diff --git a/lib/bind/site.bind b/lib/bind/site.bind index 615c685e8b..2e7ad43489 100644 --- a/lib/bind/site.bind +++ b/lib/bind/site.bind @@ -38,8 +38,8 @@ Format 5 \bind "Prior" "screen-up" \bind "Next" "screen-down" \bind "Return" "paragraph-break" -\bind "Delete" "char-delete-forward" -\bind "BackSpace" "char-delete-backward" +\bind "Delete" "char-delete-forward confirm" +\bind "BackSpace" "char-delete-backward confirm" \bind "KP_Enter" "paragraph-break" \bind "KP_Right" "char-right" diff --git a/lib/bind/sk/menus.bind b/lib/bind/sk/menus.bind index 3ec829dd09..7c2639e622 100644 --- a/lib/bind/sk/menus.bind +++ b/lib/bind/sk/menus.bind @@ -152,4 +152,4 @@ Format 5 # \unbind "M-u" "word-upcase partial" -\unbind "M-d" "word-delete-forward" +\unbind "M-d" "word-delete-forward confirm" diff --git a/lib/bind/xemacs.bind b/lib/bind/xemacs.bind index e336b2a8c3..135b13303b 100644 --- a/lib/bind/xemacs.bind +++ b/lib/bind/xemacs.bind @@ -33,7 +33,7 @@ Format 5 \bind "C-a" "line-begin" \bind "C-b" "char-backward" #bind "C-c" "------" # see end of file -\bind "C-d" "char-delete-forward" +\bind "C-d" "char-delete-forward confirm" \bind "C-e" "line-end" \bind "C-f" "char-forward" \bind "C-g" "cancel" @@ -220,10 +220,10 @@ Format 5 # Edit group # -\bind "M-Delete" "word-delete-backward" -\bind "C-Delete" "word-delete-forward" -\bind "M-d" "word-delete-forward" -\bind "C-BackSpace" "word-delete-backward" +\bind "M-Delete" "word-delete-backward confirm" +\bind "C-Delete" "word-delete-forward confirm" +\bind "M-d" "word-delete-forward confirm" +\bind "C-BackSpace" "word-delete-backward confirm" \bind "M-Return" "paragraph-break inverse" \bind "C-Return" "newline-insert newline" \bind "C-S-Return" "newline-insert linebreak" diff --git a/lib/doc/LFUNs.lyx b/lib/doc/LFUNs.lyx index 29729bd1bb..82117def0f 100644 --- a/lib/doc/LFUNs.lyx +++ b/lib/doc/LFUNs.lyx @@ -1,5 +1,5 @@ -#LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 609 +# gen_lfuns.py generated this file. For more info see http://www.lyx.org/ +\lyxformat 509 \begin_document \begin_header \save_transient_properties true @@ -16,7 +16,7 @@ } \end_preamble \use_default_options false -\maintain_unincluded_children no +\maintain_unincluded_children false \begin_local_layout Style Description LabelIndent MM @@ -25,8 +25,8 @@ End \end_local_layout \language english \language_package default -\inputencoding auto-legacy -\fontencoding auto +\inputencoding auto +\fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" @@ -34,13 +34,10 @@ End \font_default_family default \use_non_tex_fonts false \font_sc false -\font_roman_osf false -\font_sans_osf false -\font_typewriter_osf false +\font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 -\use_microtype false -\use_dash_ligatures true +\use_microtype 0 \graphics default \default_output_format default \output_sync 0 @@ -70,8 +67,6 @@ End \suppress_date false \justification true \use_refstyle 0 -\use_minted 0 -\use_lineno 0 \index Index \shortcut idx \color #008000 @@ -84,23 +79,15 @@ End \tocdepth 3 \paragraph_separation indent \paragraph_indentation default -\is_math_indent 0 -\math_numbering_side default -\quotes_style english -\dynamic_quotes 0 +\quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default -\tablestyle default \tracking_changes false \output_changes false -\change_bars false -\postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false -\docbook_table_output 0 -\docbook_mathml_prefix 1 \end_header \begin_body @@ -132,8 +119,8 @@ LyX Functions These are commands that are used to make \SpecialChar LyX perform specific actions. \SpecialChar LyX - itself uses these functions internally, and every internal action is bound - to an LFUN. + itself uses these functions internally, and every internal action is + bound to an LFUN. \end_layout \begin_layout Standard @@ -199,18 +186,15 @@ Syntax environment-split [before|outer|previous] \end_layout \begin_layout Description -Params outer: If this is given, LyX will split the outermost environment - in the current nesting hierarchy. +Params outer: If this is given, LyX will split the outermost environment in the current nesting hierarchy. \begin_inset Newline newline \end_inset -previous: If this is given, LyX will split the environment in the previous - paragraph (if there is one). +previous: If this is given, LyX will split the environment in the previous paragraph (if there is one). \begin_inset Newline newline \end_inset -before: If this is given, the new environment will be appended rather - than prepended. +before: If this is given, the new environment will be appended rather than prepended. \end_layout \begin_layout Description @@ -554,11 +538,7 @@ Action Reloads layout information. \end_layout \begin_layout Description -Notion Reloads all layout information for the current buffer from disk, - thus recognizing any changes that have been made to layout files on the - fly. - This is intended to be used only by layout developers and should not be - used when one is trying to do actual work. +Notion Reloads all layout information for the current buffer from disk, thus recognizing any changes that have been made to layout files on the fly. This is intended to be used only by layout developers and should not be used when one is trying to do actual work. \end_layout \begin_layout Description @@ -594,9 +574,7 @@ Action Toggles the layout (that is, environment) for the current paragraph. \end_layout \begin_layout Description -Notion Contrary to `layout', this function resets the current (or selection) - layout to the standard layout it already has the correct layout. - Useful for toolbar icons. +Notion Contrary to `layout', this function resets the current (or selection) layout to the standard layout it already has the correct layout. Useful for toolbar icons. \end_layout \begin_layout Description @@ -648,8 +626,7 @@ Syntax textclass-apply \end_layout \begin_layout Description -Params : the textclass to set. - Note that this must be the filename, minus the ".layout" extension. +Params : the textclass to set. Note that this must be the filename, minus the ".layout" extension. \end_layout \begin_layout Subsection* @@ -665,8 +642,7 @@ Syntax textclass-load \end_layout \begin_layout Description -Params : the textclass to load. - Note that this must be the filename, minus the ".layout" extension. +Params : the textclass to load. Note that this must be the filename, minus the ".layout" extension. \end_layout \begin_layout Subsection* @@ -678,8 +654,7 @@ Action Apply last used text properties. \end_layout \begin_layout Description -Notion These properties are stored via LFUN_TEXTSTYLE_UPDATE, which is automatic -ally triggered when using Text Style dialog. +Notion These properties are stored via LFUN_TEXTSTYLE_UPDATE, which is automatically triggered when using Text Style dialog. \end_layout \begin_layout Description @@ -687,8 +662,7 @@ Syntax textstyle-apply []textstyle-apply \end_layout \begin_layout Description -Params : number of the selection in the internal freefonts stack to - be applied. +Params : number of the selection in the internal freefonts stack to be applied. \end_layout \begin_layout Description @@ -700,8 +674,7 @@ textstyle-update \end_layout \begin_layout Description -Action Apply text style and update the settings to be used by LFUN_TEXTSTYLE_APP -LY. +Action Apply text style and update the settings to be used by LFUN_TEXTSTYLE_APPLY. \end_layout \begin_layout Description @@ -709,9 +682,7 @@ Syntax textstyle-update \end_layout \begin_layout Description -Params : specifies font attributes, e.g. - family, series, shape, size, emph, noun, underbar, number, color, language, - toggleall. +Params : specifies font attributes, e.g. family, series, shape, size, emph, noun, underbar, number, color, language, toggleall. \begin_inset Newline newline \end_inset @@ -959,8 +930,7 @@ Action Rejects all tracked changes in the document. \end_layout \begin_layout Description -Notion Reject does not work recursively; the user may have to repeat the - operation. +Notion Reject does not work recursively; the user may have to repeat the operation. \end_layout \begin_layout Description @@ -1016,8 +986,7 @@ Action Adds database, which will be used for bibtex citations. \end_layout \begin_layout Description -Notion Databases are added to the first BibTeX inset (Inset->List/TOC->BibTeX - bibliography) found from the cursor position. +Notion Databases are added to the first BibTeX inset (Inset->List/TOC->BibTeX bibliography) found from the cursor position. \end_layout \begin_layout Description @@ -1037,8 +1006,7 @@ Action Adds database, which will be used for bibtex citations. \end_layout \begin_layout Description -Notion Databases are deleted from the first BibTeX inset (Inset->List/TOC->BibTe -X bibliography) found from the cursor position. +Notion Databases are deleted from the first BibTeX inset (Inset->List/TOC->BibTeX bibliography) found from the cursor position. \end_layout \begin_layout Description @@ -1070,29 +1038,23 @@ bookmark-goto \end_layout \begin_layout Description -Action Moves the cursor to the numbered bookmark, opening the file if necessary. - Note that bookmarks are saved per-session, not per file. +Action Moves the cursor to the numbered bookmark, opening the file if necessary. Note that bookmarks are saved per-session, not per file. \end_layout \begin_layout Description -Notion Bookmark 0 has a special purpose. - It is automatically set +Notion Bookmark 0 has a special purpose. It is automatically set \begin_inset Newline newline \end_inset -1. - to the paragraph you are currently editing +1. to the paragraph you are currently editing \begin_inset Newline newline \end_inset -2. - to the paragraph from where you are jumping to the last-edited position - (jump-back feature) +2. to the paragraph from where you are jumping to the last-edited position (jump-back feature) \begin_inset Newline newline \end_inset -3. - when jumping from crossreference to the requested label by LFUN_LABEL_GOTO. +3. when jumping from crossreference to the requested label by LFUN_LABEL_GOTO. \end_layout \begin_layout Description @@ -1116,9 +1078,7 @@ Action Save a bookmark. \end_layout \begin_layout Description -Notion Saves a numbered bookmark to the sessions file. - The number must be between 1 and 9, inclusive. - Note that bookmarks are saved per-session, not per file. +Notion Saves a numbered bookmark to the sessions file. The number must be between 1 and 9, inclusive. Note that bookmarks are saved per-session, not per file. \end_layout \begin_layout Description @@ -1178,9 +1138,7 @@ buffer-anonymize \end_layout \begin_layout Description -Action For debug purposes only. - Convert all [a-zA-Z0-1] characters to single character. - Useful when submitting docs to list or bugzilla. +Action For debug purposes only. Convert all [a-zA-Z0-1] characters to single character. Useful when submitting docs to list or bugzilla. \end_layout \begin_layout Description @@ -1208,8 +1166,7 @@ buffer-begin-select \end_layout \begin_layout Description -Action Move the cursor to the beginning of the document adding the traversed - text to the selection. +Action Move the cursor to the beginning of the document adding the traversed text to the selection. \end_layout \begin_layout Description @@ -1233,8 +1190,7 @@ buffer-end-select \end_layout \begin_layout Description -Action Move the cursor to the end of the document adding the traversed text - to the selection. +Action Move the cursor to the end of the document adding the traversed text to the selection. \end_layout \begin_layout Description @@ -1290,8 +1246,7 @@ cell-split \end_layout \begin_layout Description -Action Splits cell and shifts right part to the next cell (inside the math - grid). +Action Splits cell and shifts right part to the next cell (inside the math grid). \end_layout \begin_layout Description @@ -1323,8 +1278,7 @@ change-next \end_layout \begin_layout Description -Action Moves the cursor to the position of the next change of the change - tracking records. +Action Moves the cursor to the position of the next change of the change tracking records. \end_layout \begin_layout Description @@ -1340,8 +1294,7 @@ change-previous \end_layout \begin_layout Description -Action Moves the cursor to the position of the previous change of the change - tracking records. +Action Moves the cursor to the position of the previous change of the change tracking records. \end_layout \begin_layout Description @@ -1373,8 +1326,7 @@ changes-merge \end_layout \begin_layout Description -Action Open change tracking dialog for merging and moves the cursor to the - position of the next change. +Action Open change tracking dialog for merging and moves the cursor to the position of the next change. \end_layout \begin_layout Description @@ -1426,10 +1378,7 @@ Action Moves the cursor one position logically backwards. \end_layout \begin_layout Description -Notion This is not the action which should be bound to the arrow keys, because - backwards may be left or right, depending on the language. - The arrow keys should be bound to LFUN_CHAR_LEFT or LFUN_CHAR_RIGHT actions, - which in turn may employ this one. +Notion This is not the action which should be bound to the arrow keys, because backwards may be left or right, depending on the language. The arrow keys should be bound to LFUN_CHAR_LEFT or LFUN_CHAR_RIGHT actions, which in turn may employ this one. \end_layout \begin_layout Description @@ -1441,8 +1390,7 @@ char-backward-select \end_layout \begin_layout Description -Action Moves the cursor one position logically backwards, adding traversed - position to the selection. +Action Moves the cursor one position logically backwards, adding traversed position to the selection. \end_layout \begin_layout Description @@ -1458,16 +1406,15 @@ char-delete-backward \end_layout \begin_layout Description -Action Deletes one character in the backward direction (usually the "BackSpace" - key). +Action Deletes one character in the backward direction (usually the "BackSpace" key). \end_layout \begin_layout Description -Syntax char-delete-backward [force] +Syntax char-delete-backward [confirm] \end_layout \begin_layout Description -Params force: Delete big insets, do not only select them. +Params confirm: Select big insets, do not directly delete them. \end_layout \begin_layout Subsection* @@ -1475,16 +1422,15 @@ char-delete-forward \end_layout \begin_layout Description -Action Deletes one character in the backward direction (usually the "Delete" - key). +Action Deletes one character in the backward direction (usually the "Delete" key). \end_layout \begin_layout Description -Syntax char-delete-forward [force] +Syntax char-delete-forward [confirm] \end_layout \begin_layout Description -Params force: Delete big insets, do not only select them. +Params confirm: Select big insets, do not directly delete them. \end_layout \begin_layout Subsection* @@ -1496,10 +1442,7 @@ Action Moves the cursor one position logically forward. \end_layout \begin_layout Description -Notion This is not the action which should be bound to the arrow keys, because - forward may be left or right, depending on the language. - The arrow keys should be bound to LFUN_CHAR_LEFT or LFUN_CHAR_RIGHT actions, - which in turn may employ this one. +Notion This is not the action which should be bound to the arrow keys, because forward may be left or right, depending on the language. The arrow keys should be bound to LFUN_CHAR_LEFT or LFUN_CHAR_RIGHT actions, which in turn may employ this one. \end_layout \begin_layout Description @@ -1511,8 +1454,7 @@ char-forward-select \end_layout \begin_layout Description -Action Moves the cursor one position logically forward, adding traversed - position to the selection. +Action Moves the cursor one position logically forward, adding traversed position to the selection. \end_layout \begin_layout Description @@ -1532,13 +1474,7 @@ Action Moves the cursor one position "to the left". \end_layout \begin_layout Description -Notion This is the action which should be taken when the "left" key is pressed. - Generally, it moves the cursor one position to the left. - However, in Bidi text this become slightly more complicated, and there - are different modes of cursor movement. - In "visual mode", this moves left, plain and simple. - In "logical mode", movement is logically forward in RTL paragraphs, and - logically backwards in LTR paragraphs. +Notion This is the action which should be taken when the "left" key is pressed. Generally, it moves the cursor one position to the left. However, in Bidi text this become slightly more complicated, and there are different modes of cursor movement. In "visual mode", this moves left, plain and simple. In "logical mode", movement is logically forward in RTL paragraphs, and logically backwards in LTR paragraphs. \end_layout \begin_layout Description @@ -1550,8 +1486,7 @@ char-left-select \end_layout \begin_layout Description -Action Moves the cursor one position "to the left", adding traversed position - to the selection. +Action Moves the cursor one position "to the left", adding traversed position to the selection. \end_layout \begin_layout Description @@ -1571,14 +1506,7 @@ Action Moves the cursor one position "to the right". \end_layout \begin_layout Description -Notion This is the action which should be taken when the "right" key is - pressed. - Generally, it moves the cursor one position to the right. - However, in Bidi text this become slightly more complicated, and there - are different modes of cursor movement. - In "visual mode", this moves right, plain and simple. - In "logical mode", movement is logically forward in LTR paragraphs, and - logically backwards in RTL paragraphs. +Notion This is the action which should be taken when the "right" key is pressed. Generally, it moves the cursor one position to the right. However, in Bidi text this become slightly more complicated, and there are different modes of cursor movement. In "visual mode", this moves right, plain and simple. In "logical mode", movement is logically forward in LTR paragraphs, and logically backwards in RTL paragraphs. \end_layout \begin_layout Description @@ -1590,8 +1518,7 @@ char-right-select \end_layout \begin_layout Description -Action Moves the cursor one position "to the right", adding traversed position - to the selection. +Action Moves the cursor one position "to the right", adding traversed position to the selection. \end_layout \begin_layout Description @@ -1663,8 +1590,7 @@ Params : URL (https:,file:) of the document. \begin_inset Newline newline \end_inset - and launching viewer. - In this case TARGET consists of author and year + and launching viewer. In this case TARGET consists of author and year \begin_inset Newline newline \end_inset @@ -1680,18 +1606,11 @@ clipboard-paste \end_layout \begin_layout Description -Action Pastes text from the active clipboard (retains formatting if the - clipboard contains formatted text). - Pastes plain text if plain text is on the clipboard, but tries to interpret - it in special ways for certain insets, e.g. - converting csv data to rows and columns if the paste happens in a tabular - inset. +Action Pastes text from the active clipboard (retains formatting if the clipboard contains formatted text). Pastes plain text if plain text is on the clipboard, but tries to interpret it in special ways for certain insets, e.g. converting csv data to rows and columns if the paste happens in a tabular inset. \end_layout \begin_layout Description -Notion Historically, LFUN_CLIPBOARD_PASTE was introduced as a counterpart - of LFUN_PRIMARY_SELECTION_PASTE: It behaved exactly the same, but the source - is the clipboard, not the selection. +Notion Historically, LFUN_CLIPBOARD_PASTE was introduced as a counterpart of LFUN_PRIMARY_SELECTION_PASTE: It behaved exactly the same, but the source is the clipboard, not the selection. \end_layout \begin_layout Description @@ -1699,8 +1618,7 @@ Syntax clipboard-paste [] \end_layout \begin_layout Description -Params : "paragraph" will cause pasting as one paragraph, i.e. - "Join lines". +Params : "paragraph" will cause pasting as one paragraph, i.e. "Join lines". \end_layout \begin_layout Description @@ -1712,12 +1630,7 @@ clipboard-paste-simple \end_layout \begin_layout Description -Action Pastes plain text from the active clipboard even if formatted LyX - content is in the clipboard. - Pastes plain text if plain text is on the clipboard, without trying to - interpret it in special ways for certain insets, e.g. - converting csv data to rows and columns if the paste happens in a tabular - inset. +Action Pastes plain text from the active clipboard even if formatted LyX content is in the clipboard. Pastes plain text if plain text is on the clipboard, without trying to interpret it in special ways for certain insets, e.g. converting csv data to rows and columns if the paste happens in a tabular inset. \end_layout \begin_layout Description @@ -1725,8 +1638,7 @@ Syntax clipboard-paste-simple [] \end_layout \begin_layout Description -Params : "paragraph" will cause pasting as one paragraph, i.e. - "Join lines". +Params : "paragraph" will cause pasting as one paragraph, i.e. "Join lines". \end_layout \begin_layout Subsection* @@ -1734,9 +1646,7 @@ command-execute \end_layout \begin_layout Description -Action Switches the focus to the minibuffer so that the user can type in - there. - If necessary, it opens the minibuffer toolbar. +Action Switches the focus to the minibuffer so that the user can type in there. If necessary, it opens the minibuffer toolbar. \end_layout \begin_layout Description @@ -1856,8 +1766,7 @@ depth-decrement \end_layout \begin_layout Description -Action Decrease the nesting depth of the (selected) paragraph(s) inside - lists. +Action Decrease the nesting depth of the (selected) paragraph(s) inside lists. \end_layout \begin_layout Description @@ -1869,8 +1778,7 @@ depth-increment \end_layout \begin_layout Description -Action Increase the nesting depth of the (selected) paragraph(s) inside - lists. +Action Increase the nesting depth of the (selected) paragraph(s) inside lists. \end_layout \begin_layout Description @@ -1902,8 +1810,7 @@ dialog-hide \end_layout \begin_layout Description -Action Hides showed dialog. - Counterpart to LFUN_DIALOG_SHOW . +Action Hides showed dialog. Counterpart to LFUN_DIALOG_SHOW . \end_layout \begin_layout Description @@ -1923,8 +1830,7 @@ dialog-show \end_layout \begin_layout Description -Action Shows hidden dialog or creates new one for a given function/inset - settings etc. +Action Shows hidden dialog or creates new one for a given function/inset settings etc. \end_layout \begin_layout Description @@ -1936,13 +1842,11 @@ Params : aboutlyx|bibitem|bibtex|box|branch|changes|character|citation| \begin_inset Newline newline \end_inset -compare|counter|document|errorlist|ert|external|file|findreplace|findreplaceadv| -float| +compare|counter|document|errorlist|ert|external|file|findreplace|findreplaceadv|float| \begin_inset Newline newline \end_inset -graphics|href|include|index|index_print|info|label|line|listings|log|mathdelimit -er| +graphics|href|include|index|index_print|info|label|line|listings|log|mathdelimiter| \begin_inset Newline newline \end_inset @@ -1962,8 +1866,7 @@ thesaurus|texinfo|toc|view-source|vspace|wrap| \begin_inset Newline newline \end_inset -: data, usually settings for the given dialog. - Use debug mode for the details. +: data, usually settings for the given dialog. Use debug mode for the details. \end_layout \begin_layout Description @@ -1975,13 +1878,11 @@ dialog-show-new-inset \end_layout \begin_layout Description -Action Shows hidden dialog or create new one for a given inset settings - etc. +Action Shows hidden dialog or create new one for a given inset settings etc. \end_layout \begin_layout Description -Notion Internally uses LFUN_DIALOG_SHOW with processed data for a given - inset. +Notion Internally uses LFUN_DIALOG_SHOW with processed data for a given inset. \end_layout \begin_layout Description @@ -2061,8 +1962,7 @@ down-select \end_layout \begin_layout Description -Action Moves the cursor one line in downward direction adding the current - position to the selection. +Action Moves the cursor one line in downward direction adding the current position to the selection. \end_layout \begin_layout Description @@ -2090,9 +1990,7 @@ escape \end_layout \begin_layout Description -Action Clears the selection. - If no text is selected call LFUN_FINISHED_FORWARD. - Inside math mode jumps out of the math inset. +Action Clears the selection. If no text is selected call LFUN_FINISHED_FORWARD. Inside math mode jumps out of the math inset. \end_layout \begin_layout Description @@ -2132,9 +2030,7 @@ Syntax file-insert [] [ignorelang] \end_layout \begin_layout Description -Params : Filename to be inserted. - ignorelang: If given, the (main) language of the inserted file is ignored - (the context language is used). +Params : Filename to be inserted. ignorelang: If given, the (main) language of the inserted file is ignored (the context language is used). \end_layout \begin_layout Subsection* @@ -2162,8 +2058,7 @@ file-insert-plaintext-para \end_layout \begin_layout Description -Action Inserts plain text file as paragraph (i.e. - join lines). +Action Inserts plain text file as paragraph (i.e. join lines). \end_layout \begin_layout Description @@ -2187,15 +2082,11 @@ Action Inserts CharStyle, Custom inset or XML short element. \end_layout \begin_layout Description -Notion Look into the Customization manual for more information about these - elements. +Notion Look into the Customization manual for more information about these elements. \begin_inset Newline newline \end_inset -To make this command enabled the layout file for the document class you're - using has to load the character styles. - There are a few contained in the Logical Markup module. - You can also of course create some yourself. +To make this command enabled the layout file for the document class you're using has to load the character styles. There are a few contained in the Logical Markup module. You can also of course create some yourself. \begin_inset Newline newline \end_inset @@ -2207,10 +2098,7 @@ Syntax flex-insert Name \end_layout \begin_layout Description -Params Name: This name must be defined either in your layout file or imported - by some module. - The definition is InsetLayout Name or InsetLayout . - The Flex: prefix is optional. +Params Name: This name must be defined either in your layout file or imported by some module. The definition is InsetLayout Name or InsetLayout . The Flex: prefix is optional. \end_layout \begin_layout Description @@ -2230,8 +2118,7 @@ Syntax float-insert \end_layout \begin_layout Description -Params : type of float depends on the used textclass. - Usually "algorithm", "table", "figure" parameters can be given. +Params : type of float depends on the used textclass. Usually "algorithm", "table", "figure" parameters can be given. \end_layout \begin_layout Description @@ -2251,8 +2138,7 @@ Syntax float-list-insert \end_layout \begin_layout Description -Params : type of float depends on the used textclass. - Usually "algorithm", "table", "figure" parameters can be given. +Params : type of float depends on the used textclass. Usually "algorithm", "table", "figure" parameters can be given. \end_layout \begin_layout Description @@ -2276,8 +2162,7 @@ Syntax float-wide-insert \end_layout \begin_layout Description -Params : type of float depends on the used textclass. - Usually "algorithm", "table", "figure" parameters can be given. +Params : type of float depends on the used textclass. Usually "algorithm", "table", "figure" parameters can be given. \end_layout \begin_layout Description @@ -2329,9 +2214,7 @@ Syntax graphics-set-group [] \end_layout \begin_layout Description -Params : Id for an existing group. - In case the Id is an empty string, the graphics inset is removed from the - current group. +Params : Id for an existing group. In case the Id is an empty string, the graphics inset is removed from the current group. \end_layout \begin_layout Description @@ -2351,9 +2234,7 @@ Syntax graphics-unify [] \end_layout \begin_layout Description -Params : Id for an existing group. - In case the Id is an empty string, the group Id from the first graphics - inset will be used. +Params : Id for an existing group. In case the Id is an empty string, the group Id from the first graphics inset will be used. \end_layout \begin_layout Description @@ -2389,8 +2270,7 @@ Action Only active in IPA inset. \end_layout \begin_layout Description -Notion Dummy function which is only active in a IPA inset. - It's used to toggle the IPA toolbar if the cursor moves into an IPA inset. +Notion Dummy function which is only active in a IPA inset. It's used to toggle the IPA toolbar if the cursor moves into an IPA inset. \end_layout \begin_layout Description @@ -2418,8 +2298,7 @@ Syntax index-insert [] \end_layout \begin_layout Description -Params : name of the index, if multiple indices are defined. - With an empty argument, the default index is selected. +Params : name of the index, if multiple indices are defined. With an empty argument, the default index is selected. \end_layout \begin_layout Description @@ -2439,21 +2318,59 @@ Syntax index-print [] \end_layout \begin_layout Description -Params : name of the index, if multiple indices are defined. - With an empty argument, the default index is selected. +Params : name of the index, if multiple indices are defined. With an empty argument, the default index is selected. \end_layout \begin_layout Description Origin Lgb, 27 Feb 1997 \end_layout +\begin_layout Subsection* +index-tag-all +\end_layout + +\begin_layout Description +Action Tags all occurrences of the word before the cursor with the index inset at cursor. +\end_layout + +\begin_layout Description +Notion It automatically takes the word on the cursor position. +\end_layout + +\begin_layout Description +Syntax index-tag-all +\end_layout + +\begin_layout Description +Origin spitz, 5 Nov 2022 +\end_layout + +\begin_layout Subsection* +indexmacro-insert +\end_layout + +\begin_layout Description +Action Inserts special Index macros into the document. +\end_layout + +\begin_layout Description +Syntax indexmacro-insert +\end_layout + +\begin_layout Description +Params : see, seealso, subentry, sortkey. +\end_layout + +\begin_layout Description +Origin spitz, 20 Feb 2022 +\end_layout + \begin_layout Subsection* info-insert \end_layout \begin_layout Description -Action Displays shortcuts, lyxrc, package and textclass availability and - menu information in a non-editable boxed InsetText. +Action Displays shortcuts, lyxrc, package and textclass availability and menu information in a non-editable boxed InsetText. \end_layout \begin_layout Description @@ -2461,14 +2378,11 @@ Notion Apart from lfun arguments you can use the following method: \begin_inset Newline newline \end_inset -1. - input the type and argument of this inset, e.g. - "menu paste", in the work area. +1. input the type and argument of this inset, e.g. "menu paste", in the work area. \begin_inset Newline newline \end_inset -2. - select the text and run info-insert lfun. +2. select the text and run info-insert lfun. \end_layout \begin_layout Description @@ -2476,13 +2390,11 @@ Syntax info-insert \end_layout \begin_layout Description -Params : date|moddate|fixdate|time|modtime|fixtime|shortcut|shortcuts|lyxr -c| lyxinfo|package|textclass|menu|l7n|icon|buffer|vcs +Params : date|moddate|fixdate|time|modtime|fixtime|shortcut|shortcuts|lyxrc| lyxinfo|package|textclass|menu|l7n|icon|buffer|vcs \begin_inset Newline newline \end_inset -: argument for a given type. - Look into InsetInfo.h for detailed description. +: argument for a given type. Look into InsetInfo.h for detailed description. \begin_inset Newline newline \end_inset @@ -2516,8 +2428,7 @@ alpha) \begin_inset Newline newline \end_inset -lyxrc: name of rc_entry (e.g. - bind_file) +lyxrc: name of rc_entry (e.g. bind_file) \begin_inset Newline newline \end_inset @@ -2525,13 +2436,11 @@ lyxinfo: "version" - used version of LyX \begin_inset Newline newline \end_inset -package: name of latex package (e.g. - listings) +package: name of latex package (e.g. listings) \begin_inset Newline newline \end_inset -textclass: name of textclass (e.g. - article) +textclass: name of textclass (e.g. article) \begin_inset Newline newline \end_inset @@ -2547,8 +2456,7 @@ icon: icon of lfun used in toolbar or direct icon name \begin_inset Newline newline \end_inset -buffer: "name"|"name-noext"|"path"|"class" vcs: "tree-revision"|"revision"|"auth -or"|"date"|"time" +buffer: "name"|"name-noext"|"path"|"class" vcs: "tree-revision"|"revision"|"author"|"date"|"time" \end_layout \begin_layout Description @@ -2568,10 +2476,7 @@ Action Apply data for an inset. \end_layout \begin_layout Description -Notion LFUN_INSET_APPLY is sent from the dialogs when the data should be - applied. - This is either changed to LFUN_INSET_MODIFY or LFUN_INSET_INSERT depending - on the context where it is called. +Notion LFUN_INSET_APPLY is sent from the dialogs when the data should be applied. This is either changed to LFUN_INSET_MODIFY or LFUN_INSET_INSERT depending on the context where it is called. \end_layout \begin_layout Description @@ -2587,11 +2492,7 @@ inset-begin \end_layout \begin_layout Description -Action Move the cursor to the beginning of the current inset if it is not - already there. - If the cursor is already at the beginning of the current inset, move it - to the beginning of the enclosing inset or the main work area, respectively, - if there is no enclosing inset. +Action Move the cursor to the beginning of the current inset if it is not already there. If the cursor is already at the beginning of the current inset, move it to the beginning of the enclosing inset or the main work area, respectively, if there is no enclosing inset. \end_layout \begin_layout Description @@ -2607,11 +2508,7 @@ inset-begin-select \end_layout \begin_layout Description -Action Move the cursor to the beginning of the current inset if it is not - already there. - If the cursor is already at the beginning of the current inset, move it - to the beginning of the enclosing inset or the main work area, respectively, - if there is no enclosing inset (adding the traversed text to the selection). +Action Move the cursor to the beginning of the current inset if it is not already there. If the cursor is already at the beginning of the current inset, move it to the beginning of the enclosing inset or the main work area, respectively, if there is no enclosing inset (adding the traversed text to the selection). \end_layout \begin_layout Description @@ -2631,8 +2528,7 @@ Action Copies the inset to the clipboard as a certain type. \end_layout \begin_layout Description -Notion Currently used only for InsetInfo where its content is copied as - a text. +Notion Currently used only for InsetInfo where its content is copied as a text. \end_layout \begin_layout Description @@ -2656,11 +2552,7 @@ Syntax inset-dissolve [] \end_layout \begin_layout Description -Params : this can be used to make sure the right kind of inset is - dissolved. - For example "dissolve" entry in the charstyles sub-menu should only dissolve - the charstyle inset, even if the cursor is inside several nested insets - of different type. +Params : this can be used to make sure the right kind of inset is dissolved. For example "dissolve" entry in the charstyles sub-menu should only dissolve the charstyle inset, even if the cursor is inside several nested insets of different type. \begin_inset Newline newline \end_inset @@ -2676,13 +2568,7 @@ inset-edit \end_layout \begin_layout Description -Action Edit the inset at cursor with an external application, if one is - attributed. - If the inset is file based, the referenced file is edited. - Otherwise, the inset contents is written to a temporary file, the inset - is locked, and the temporary file is edited. - In this case, LFUN_INSET_END_EDIT must be called to overtake the changes - and unlock the inset after editing is finished. +Action Edit the inset at cursor with an external application, if one is attributed. If the inset is file based, the referenced file is edited. Otherwise, the inset contents is written to a temporary file, the inset is locked, and the temporary file is edited. In this case, LFUN_INSET_END_EDIT must be called to overtake the changes and unlock the inset after editing is finished. \end_layout \begin_layout Description @@ -2706,11 +2592,7 @@ inset-end \end_layout \begin_layout Description -Action Move the cursor to the end of the current inset if it is not already - there. - If the cursor is already at the end of the current inset, move it to the - end of the enclosing inset or the main work area, respectively, if there - is no enclosing inset. +Action Move the cursor to the end of the current inset if it is not already there. If the cursor is already at the end of the current inset, move it to the end of the enclosing inset or the main work area, respectively, if there is no enclosing inset. \end_layout \begin_layout Description @@ -2726,9 +2608,7 @@ inset-end-edit \end_layout \begin_layout Description -Action End editing the inset at cursor with an external application. - This replaces the inset contents with the contents of the temporary file, - deletes the file and unlocks the inset. +Action End editing the inset at cursor with an external application. This replaces the inset contents with the contents of the temporary file, deletes the file and unlocks the inset. \end_layout \begin_layout Description @@ -2744,11 +2624,7 @@ inset-end-select \end_layout \begin_layout Description -Action Move the cursor to the end of the current inset if it is not already - there. - If the cursor is already at the end of the current inset, move it to the - end of the enclosing inset or the main work area, respectively, if there - is no enclosing inset (adding the traversed text to the selection). +Action Move the cursor to the end of the current inset if it is not already there. If the cursor is already at the end of the current inset, move it to the end of the enclosing inset or the main work area, respectively, if there is no enclosing inset (adding the traversed text to the selection). \end_layout \begin_layout Description @@ -2768,15 +2644,7 @@ Action Apply the given commands on insets of a given name. \end_layout \begin_layout Description -Notion WARNING: use at your own risks; this function gives you too many - ways of shooting yourself in the foot. - A typical example is inset-forall Note note-insert which starts an infinite - loop. - This is mitigated by the fact that the number of actions is arbitrarily - limited to 100000. - Note also that inset-forall does not update metrics between iterations, - which can lead to bugs. - This has to be eventually fixed. +Notion WARNING: use at your own risks; this function gives you too many ways of shooting yourself in the foot. A typical example is inset-forall Note note-insert which starts an infinite loop. This is mitigated by the fact that the number of actions is arbitrarily limited to 100000. Note also that inset-forall does not update metrics between iterations, which can lead to bugs. This has to be eventually fixed. \end_layout \begin_layout Description @@ -2784,10 +2652,7 @@ Syntax inset-forall \begin_inset Newline newline \end_inset -: Type of Inset. - If is *, all insets are matched. - The name is used like for InsetLayout in layout files: "Note" matches all - note insets, while "Note:Note" only matches LyX yellow note insets. +: Type of Inset. If is *, all insets are matched. The name is used like for InsetLayout in layout files: "Note" matches all note insets, while "Note:Note" only matches LyX yellow note insets. \end_layout \begin_layout Description @@ -2795,11 +2660,11 @@ Sample Remove all index insets: \begin_inset Newline newline \end_inset -inset-forall Index char-delete-forward force +inset-forall Index char-delete-forward \begin_inset Newline newline \end_inset -Close all Notes (also works for a particular branch, for example): +Close all Notes: \begin_inset Newline newline \end_inset @@ -2807,6 +2672,14 @@ inset-forall Note inset-toggle close \begin_inset Newline newline \end_inset +Open all branch insets of branch "myBranch": +\begin_inset Newline newline +\end_inset + +inset-forall Branch:myBranch inset-toggle open +\begin_inset Newline newline +\end_inset + Transform all yellow notes to comments \begin_inset Newline newline \end_inset @@ -2847,8 +2720,7 @@ hyperlink|include|index|label|line|nomencl|vspace|ref|toc|script> \begin_inset Newline newline \end_inset -: depends on the given inset. - Use "lyx -dbg action" to explore. +: depends on the given inset. Use "lyx -dbg action" to explore. \end_layout \begin_layout Description @@ -2858,8 +2730,7 @@ end_inset \begin_inset Newline newline \end_inset -where