Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s8LNx0XA010378 for ; Mon, 22 Sep 2014 01:59:01 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx104) with ESMTPS (Nemesis) id 0MQtog-1XsIme2F5C-00UGtk for ; Mon, 22 Sep 2014 01:58:54 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s8LNuGcx010164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Sep 2014 01:56:16 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s8LM13Xj026039; Mon, 22 Sep 2014 01:56:16 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11284331 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 22 Sep 2014 01:56:16 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s8LNuGab008780 for ; Mon, 22 Sep 2014 01:56:16 +0200 Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s8LNu5DU010117 for ; Mon, 22 Sep 2014 01:56:10 +0200 Received: from mxin3-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0NC900AZAZSJIO00@smtp3.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Mon, 22 Sep 2014 11:56:04 +1200 (NZST) Received: from 121-74-37-33.telstraclear.net (HELO [127.0.0.1]) ([121.74.37.33]) by smtpin3.clear.net.nz with ESMTP; Mon, 22 Sep 2014 11:55:57 +1200 MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140921-1, 22/09/2014), Outbound message X-Antivirus-Status: Clean User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Message-ID: <541F658C.2000007@clear.net.nz> Date: Mon, 22 Sep 2014 11:55:56 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Capturing messages in a token list variable? To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:4E/GGottWMA=:Vs4CIqn6KNuEBmYN3omO8ZQUzV /enXbknd97JC8cMxvE9j6ky1GfdkQE4AEsKPNbEFLCqtS/MJPHdny7socuO0O77KFmFlXg0cj TxHm/6hHm0ywrN2InT5+c7tlcR8NYmx0LogXby8u4zro62oGMAXlk3V08I41XVTmyZD4dfnct f9AYQAmwV1dJ+/mi13ILkpd1CkJJdcm9NowWvUbvZ5f4cPE7hfy4bEtdEpNEbRALf2lgO33sx Q8TBQWCzevhpKTya6xuzbKNjmeJJP09YvFnLIyvswPtQEreB23IY+gEf6q5YoWkhJBq4kKlNf 3pjBzpigK1mTjSNpQTqyhXjmSz6XbMZLFmIfTvacv9YNdcmPaPT9LAkykrVpMUVZff9Kh5ohI iyTV1/BQL3Q0KwX4w6+uY7/5Mfi1WTUiqrdrIa8PH5wMkPzMlWWhLteHQlptTDE5BY6PEVYIe FJu/HaBY+TlFYaeBGVxKhaacKCqjdLenURnc42z3dy8cmbabRoJRmr1dMR6iwxDP9rrLwOg8h mJZtG+hcdzU8+tf7qW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1; Status: R X-Status: X-Keywords: X-UID: 7599 Is there any way to capture the expanded content of a message (in the sense of l3msg) in a token list variable? As I understand it, messages at present go either to the terminal or the log file. To use a message in some other way, doesn't seem to be allowed for. The question arises from the following context. I've been writing a program that takes mathematical expressions constructed in LyX's math editor, changes them into a form that can be digested by l3fp, and uses the mini-LaTeX runs of LyX's instant preview facility to evaluate and display the result. Each preview run creates a LaTeX log but that is buried in the temporary directory where LyX does its previewing and is not easily accessed by the LyX user, unlike the LaTeX log for the whole document which can be displayed in a LyX window. I've put in an enhancement request to make the preview log similarly available but that has attracted no interest whatever. Hence the wish to make at least some messages available to be displayed in the preview inset (where the calculated result would otherwise have gone). Certainly I can capture errors that occur at the level of what I've programmed and display an appropriate message in the preview inset, although it's frustrating not being able to use the l3msg machinery for this purpose. But errors that occur at the level of l3fp seem frustratingly inaccessible. Many of these errors are not fatal or critical. (For instance an extra, or absent, parenthesis is often harmless: try \fp_eval:n { 3((1+1) }. It will flag an error, "Missing ) inserted." but one press of the key and the correct answer, 6, is displayed.) A more appropriate response than the preview never compiling, which is what happens now, would be to let compilation continue if it can, and display the message in the preview inset. I write in happy ignorance of kernel internals, but envisage (for instance) a new class of message, "display" perhaps, to which certain errors could be redirected. This class, like "warning" and "info", would not stop compilation, although subsequent cumulating errors might have that consequence, but try to 'blunder on' (like the "r" option in TeX) and, unlike the other classes, would load the message into a tl-variable and set a boolean. The higher level program would check for the boolean and branch to display the tl-variable (in my case, in the preview inset displayed within the larger LyX document). The "display" class, with the associated l3msg machinery, would also be available to the higher level program for its own messages. Andrew