-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non modal errors in "Watch Document" mode #73
Comments
Yeah this would really be nice |
Perhaps it would be sufficient to indicate the errors in the gutter Downside is that the user may overlook it and it does not allow for On 15 Nov 2014, at 11:44, nemesit wrote:
|
If you just show the error, then I'd still have no idea what the error is about (you'd have to do another action to see it). Conversely, if you open up the HTML pane with the error content on the other hand, it's already there! |
why not both ;-p |
In about a month I am going to enter in writing season (research paper deadline). And yah, both sounds like a good idea. |
Generally when I get a build error, I first go to the line that the So I’m not sure having to click the gutter image to read the error Though it’s worth mentioning that while currently one has to click the Also, opening a HTML window from the background command is not currently On 15 Nov 2014, at 11:58, Andrea wrote:
|
Donations (from LaTeX users) should go to @sanssecours. https://github.com/textmate/latex.tmbundle/commits/master?author=sanssecours On 15 Nov 2014, at 12:05, Andrea wrote:
|
LaTeX error messages are something i rely on quite a bit as it becomes difficult to find certain compilation problems just from the failure itself^^, and searching the log manually takes some time that could be used more productively |
i think the gutter thing would probably be best especially if they could later be shown inline |
In a perfect world that would be amazing (where latex errors would be readable). But honestly a large part of latex error come without much information about its cause (math mostly causes this issue). Therefore, the reason for which the "watch document" feature is amazing is that while I edit I can keep a continuous check on the correctness of the latex syntax. I always use the watch document mode. Sometimes I can guess what I did wrong by pressing "ignore" on the modal window and just look at the last tweaks I did. But very, very very often I am forced to "show the log" to understand it. When I quickly notice what I did wrong (usecase #1 above) I still have to use the mouse to "ignore" the error prompt window. Clearly not optimal, as you might imagine. About the gutter, I guess I am not sure I have actually seen it before :) :) |
Hi, I think I need to get faster at typing :). Allan already answered one of the questions I would have had: It is not possible to open an HMTL output window outside of TextMate :(. This functionality would make fixing this issue certainly much easier. As Andrea (drtaglia) already pointed out: LaTeX error log are not that great to parse. Some problems include:
Especially the last point makes showing all error messages in the gutter hard. Where should we put an error message if we do not know where the error occurred… I guess I will — when I have free time — implement showing error messages in the gutter. After that I might look into some other ways to fix this issue. Kind regards, |
As for the “simple notification” used by the Subversion bundle, here is a quick crash course: Open a notification window using the following shell command (can test with ⌃R in TextMate):
The command returns a
And once we stop watching the tex file we close the window:
For some reason the I can look into these things if someone wants to update the LaTeX bundle to use the notification window instead of the modal dialog. Also, right now calling |
We bind all SCM actions to ⌘Y so presing that key will open a menu of On 15 Nov 2014, at 14:41, Andrea wrote:
|
Hi everyone, I just pushed some changes that should address the issues reported here. “LaTeX Watch” now uses the “notification window” that Allan mentioned. The window will appear if there are errors and should disappear after the errors are fixed. One problem with the current implementation is, that if we close the notification window manually it will never come back. The reason behind this behaviour is that currently You can test the current changes for “LaTeX Watch” by following these steps:
cd ~/Library/Application\ Support/TextMate/Managed/Bundles/
git clone -b latex_watch_notification https://github.com/textmate/latex.tmbundle.git If you have questions, comments or improvement suggestions please feel free to post them here. Kind regards, René |
Great work! An update to my comment above:
Any of the above should be usable to figure out if the window needs to As for dialog itself re-opening the window on update: I don’t think On 15 Dec 2014, at 4:08, René Schwaiger wrote:
|
Hi Allan, thanks for the quick and elaborate reply.
Unfortunately this only works for me if the window identified by "$DIALOG" nib --load "$TM_SUPPORT_PATH/nibs/SimpleNotificationWindow.nib" inside TextMate via ^R I get a token. Lets say this token is "$DIALOG" nib --update 7 --model '{ summary = "Hi"; log = ""; }' This will update the window and print nothing at all. If I now close the window — via the close button — and issue the last command again then the window will not be updated since it was already closed. The output however does not indicate an error and will just be empty. If I try to open a window that was never open e.g. by issuing the command "$DIALOG" nib --update 1000 --model '{ summary = "Hi"; log = ""; }' the command will fail correctly with the error message
Issuing the command Kind regards, |
It would seem we intended for the client to always call --dispose. I think this only makes sense when using --wait so I have improved it so On 15 Dec 2014, at 16:37, René Schwaiger wrote:
|
Hi Allan,
thanks a lot. This change certainly makes things easier for me. Kind regards, |
Hi, commit a59c77a should fix the issue that a manually closed notification window would never reappear. I am still interested in feedback. Andrea, nemesit: Does the code work for you? Do you have any improvement suggestions? Here are some screenshots from the current implementation for anybody that is interested: Kind regards, |
sorry, right now I am in the middle of a huge deadline. On Wed, Dec 17, 2014 at 4:45 PM, René Schwaiger notifications@github.com
|
Doesn't work here, at first it looked promising e.g. it showed to warnings related to labels. |
The window closing and opening works I think, but error/warning reporting only on the initial compile step and not on updates during the watching |
Hi nemesit,
strange. Updating — after save — works for me. Could you please provide a minimal example together with expected/actual result? Kind regards, |
This document for example does not work https://gist.github.com/nemesit/c95b6398683488b8a55a |
Hi nemesit,
thanks a lot for the example file. Commit 58a26e should make things better. The error output:
Does the new code work for you, nemesit? Kind regards, |
Nope for some reason the log messages still disappear after the first update |
Hi nemesit, thanks for the quick reply. Could you please check the command output for me? For this please follow these steps:
It would be really helpful if you could do that. Thanks again for your feedback. Kind regards, |
Here is the output https://gist.github.com/nemesit/857362b8ad22810c1a0d |
Hi nemesit, it seems that only one error is detected. The rest seems mostly fine to me. I made a screen recording that shows how I insert two errors and then remove them. If you follow the steps made in the video do you get the same output? If not:
Thank you, |
If I do that I get the same output https://gist.github.com/nemesit/768854f66b9b87ceb61c I think |
Hi nemesit, if I comment line 22 — I do not have “Garamond Premier Pro” installed — in the example tex file, then the notification window shows the following output:
While I think the first warning messages is rather strange, the rest seems to be fine. Updating works for me too. So if I for example remove
After I remove
again. Doe this work for you? If not, could you please post the corresponding log? Thanks again for your feedback, |
|
example too only works sometimes it seems now it does the same again ...weird |
Hi nemesit, I think I discovered the problem. If we add problematic input to an tex file Kind regards, |
Nope the error window stays empty after altering and saving |
Hi nemesit, the newest commits to Thank you, |
Hi everyone, I have a very simple solution which gives effects similar to what drtaglia asked in the first post in this thread – the errors are displayed in the standard typesetting window (with html markup), and typesetting is done continuously, similarly to as in Watch Document. The idea is to run the typesetting command (Cmd+R) with latexmk in pvc mode (preview continuously). The basic idea can be implemented by modifying just two lines: To use:
The above gives a very crude solution which doesn't work perfectly, but works most of the times. I'm curious of what you guys think of this idea (surely the solution needs many improvements), and of its advantages and disadvantages comparing to the Watch Document and the new notification window by René. Cheers, |
Hi Szymon, obviously I am quite biased :), but here is my take: Advantages “PVC”:
Advantages “Notification Window”:
Could you maybe test the changes in Kind regards, |
Hi René I agree with your evaluation. To your list, I would add the following. Advantages "PVC":
Advantages "Notification Window":
As to your remark about nicer looking error messages, I think that html error messages might be easier to read, if they are well formatted. Since "PVC" uses the standard parsers, it is enough to focus on enhancing their output (e.g. by modifying the css). Also, I have a question regarding your other remark – is there no way of bringing the html output window into focus when needed? The two approaches, even though they yield a similar outcome, have completely different origins Best regards, P.S. I tested briefly your ERROR main.tex:191 — LaTeX Error: �egin{itemize} on input line 170 ended by end{document}. Another problem – which is also apparent in the PVC approach – is in the following scenario: P.P.S. If you would be so nice to have a look at my newest commit, I'd be very grateful for any comments. Currently, the pvc mode is enabled in the latex preference pane. |
Hi Szymon,
“Watch Document” always uses
Since
The error messages should in theory all be well formatted. They do not use consistent formatting tough :). The problem that I see with the HTML output is the asynchronous update in
None that I know of.
I looked at the
I think merging both branches would mean additional complexity without much improvement overall, since the features are so similar.
Thanks a lot. I fixed the issue in commit 83597cd.
Yeah, I was to lazy to implement this until now. Maybe I will add the code for this feature sometimes in the future. For now you can just close the viewer window which will close
In my short test everything seemed to work fine. Good work. Here are some of my personal nitpicks, that most people do not care about at all :):
Kind regards, |
Hi René,
I wasn't aware of that. Is it possible to have Watch Document run bibtex automatically?
Since latex_watch now also uses latexmk, I cannot come up with any real advantages. One thing I can think of is for consistency – since latexmk is such a nice tool, it would be nice to be able to choose its options in the Latex Preferences dialog, one of them being -pvc.
It's true, they are very similar. I must say though that I like the html output.
Thanks a lot!
Thanks for the tips, I am new both to Python and to Git. I will keep them in mind. All the best, |
Hi Szymon,
it should do so without the need to configure anything. Running
One option for advanced user is to configure $preview_continuous_mode = 1;
$force_mode = 0;
$preview_mode = 0;
$printout_mode = 0; Since Kind regards, P.S.: I merged the changes from |
When you are watching a latex document and an error is produced you get a "modal" error window like the one below. This steals the focus, preventing you from correcting the error you made.
It would be much better if the HTML output pane was opened and the error log displayed there, similarly to what happens when you typeset the document:
The text was updated successfully, but these errors were encountered: