927 \end{tabular} |
927 \end{tabular} |
928 |
928 |
929 \<^medskip> |
929 \<^medskip> |
930 The \<^verbatim>\<open>use_theories\<close> command updates the identified session by adding the |
930 The \<^verbatim>\<open>use_theories\<close> command updates the identified session by adding the |
931 current version of theory files to it, while dependencies are resolved |
931 current version of theory files to it, while dependencies are resolved |
932 implicitly. The command succeeds eventually, when all theories have been |
932 implicitly. The command succeeds eventually, when all theories have status |
933 \<^emph>\<open>consolidated\<close> in the sense the formal \<open>node_status\<close> |
933 \<^emph>\<open>terminated\<close> or \<^emph>\<open>consolidated\<close> in the sense of \<open>node_status\<close> |
934 (\secref{sec:json-types}): the outermost command structure has finished (or |
934 (\secref{sec:json-types}). |
935 failed) and the final \<^theory_text>\<open>end\<close> command of each theory has been checked. |
|
936 |
935 |
937 Already used theories persist in the session until purged explicitly |
936 Already used theories persist in the session until purged explicitly |
938 (\secref{sec:command-purge-theories}). This also means that repeated |
937 (\secref{sec:command-purge-theories}). This also means that repeated |
939 invocations of \<^verbatim>\<open>use_theories\<close> are idempotent: it could make sense to do |
938 invocations of \<^verbatim>\<open>use_theories\<close> are idempotent: it could make sense to do |
940 that with different values for \<open>pretty_margin\<close> or \<open>unicode_symbols\<close> to get |
939 that with different values for \<open>pretty_margin\<close> or \<open>unicode_symbols\<close> to get |
946 special names like ``\<^verbatim>\<open>.\<close>'' or ``\<^verbatim>\<open>..\<close>''). The \<open>base64\<close> field specifies the |
945 special names like ``\<^verbatim>\<open>.\<close>'' or ``\<^verbatim>\<open>..\<close>''). The \<open>base64\<close> field specifies the |
947 format of the \<open>body\<close> string: it is true for a byte vector that cannot be |
946 format of the \<open>body\<close> string: it is true for a byte vector that cannot be |
948 represented as plain text in UTF-8 encoding, which means the string needs to |
947 represented as plain text in UTF-8 encoding, which means the string needs to |
949 be decoded as in \<^verbatim>\<open>java.util.Base64.getDecoder.decode(String)\<close>. |
948 be decoded as in \<^verbatim>\<open>java.util.Base64.getDecoder.decode(String)\<close>. |
950 |
949 |
951 \<^medskip> Due to asynchronous nature of PIDE document processing, structurally |
950 \<^medskip> The status of PIDE processing is checked every \<open>check_delay\<close> seconds, and |
952 broken theories never reach the \<open>consolidated\<close> state: consequently |
951 bounded by \<open>check_limit\<close> attempts (default: 0, i.e.\ unbounded). A |
953 \<^verbatim>\<open>use_theories\<close> will wait forever. The status is checked every \<open>check_delay\<close> |
952 \<open>check_limit > 0\<close> effectively specifies a timeout of \<open>check_delay \<times> |
954 seconds, and bounded by \<open>check_limit\<close> attempts (default: 0, i.e.\ |
953 check_limit\<close> seconds. |
955 unbounded). A \<open>check_limit > 0\<close> effectively specifies a timeout of |
|
956 \<open>check_delay \<times> check_limit\<close> seconds; it needs to be greater than the system |
|
957 option @{system_option editor_consolidate_delay} to give PIDE processing a |
|
958 chance to consolidate document nodes in the first place. |
|
959 |
954 |
960 \<^medskip> A non-negative \<open>nodes_status_delay\<close> enables continuous notifications of |
955 \<^medskip> A non-negative \<open>nodes_status_delay\<close> enables continuous notifications of |
961 kind \<open>nodes_status\<close>, with a field of name and type \<open>nodes_status\<close>. The time |
956 kind \<open>nodes_status\<close>, with a field of name and type \<open>nodes_status\<close>. The time |
962 interval is specified in seconds; by default it is negative and thus |
957 interval is specified in seconds; by default it is negative and thus |
963 disabled. |
958 disabled. |