{"action":"created","issue":{"url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/70","repository_url":"https://api.github.com/repos/msiniscalchi/atom-latextools","labels_url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/70/comments","events_url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/70/events","html_url":"https://github.com/msiniscalchi/atom-latextools/issues/70","id":144202575,"number":70,"title":"\\cite and \\ref autocomplete indexing issues","user":{"login":"tomrijndorp","id":15803419,"avatar_url":"https://avatars.githubusercontent.com/u/15803419?v=3","gravatar_id":"","url":"https://api.github.com/users/tomrijndorp","html_url":"https://github.com/tomrijndorp","followers_url":"https://api.github.com/users/tomrijndorp/followers","following_url":"https://api.github.com/users/tomrijndorp/following{/other_user}","gists_url":"https://api.github.com/users/tomrijndorp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomrijndorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomrijndorp/subscriptions","organizations_url":"https://api.github.com/users/tomrijndorp/orgs","repos_url":"https://api.github.com/users/tomrijndorp/repos","events_url":"https://api.github.com/users/tomrijndorp/events{/privacy}","received_events_url":"https://api.github.com/users/tomrijndorp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-29T09:08:50Z","updated_at":"2016-03-30T07:46:07Z","closed_at":null,"body":"There is an issue with the `\\cite`, `\\ref` and related commands. I'm not able to isolate it completely, but in my case it seems to relate to using Tikz figures inside floats. When triggering autocomplete using e.g. `\\cite` or `\\ref`, the following error gets thrown: \r\n![screen shot 2016-03-29 at 10 43 38](https://cloud.githubusercontent.com/assets/15803419/14102475/214d3e58-f59b-11e5-986f-971e47aa2b3c.png)\r\n\r\nThe related Tikz code is included like this:\r\n\r\n\t\\begin{figure}\r\n\t\t\\centering\r\n\t\t\\input{tikz/boxplotOverallWorkload.tikz}\r\n\t\t\\caption{Work load}\r\n\t\t\\label{fig:boxplotOverallWorkload}\r\n\t\\end{figure}\r\n\r\nI should mention at this point that these Tikz files exist and that my document builds. This occurs when using autocomplete in the \"main\" file, as well as when being triggered from files that live inside an `Include` directory which are linked to the main file using `%!TEX root` comments.\r\n\r\nThere are two issues with this:\r\n1. I don't think an error should be reported since the files exist, and, in my opinion LatexTools shouldn't even be interested in the existence of the Tikz files. However, I do understand that files in `\\input` commands in general should be checked.\r\n2. The alert pops up for every for every \"missing\" file every time autocomplete is triggered, blocking any other user interaction than clicking the OK button. As autocomplete still works, blocking UI seems an excessive manner of reporting this error.\r\n\r\nFurthermore, after 7 files are reported not found, the package throws an error:\r\n![screen shot 2016-03-29 at 11 02 22](https://cloud.githubusercontent.com/assets/15803419/14102947/e7d3c8e2-f59d-11e5-8bed-94b60a0df6ed.png)\r\n\r\n(see below for error details)\r\n\r\nLastly, on a related note, consider this piece of code:\r\n\r\n    \\newcommand{\\qres}[3]{%\r\n    \t\\begin{figure}[H]\r\n    \t\t\\centering\r\n    \t\t\\input{tikz/qresults#1.tikz}\r\n    \t\t\\caption{#2}\r\n    \t\t\\label{fig:#3}\r\n    \t\\end{figure}\t\r\n    }\r\n\r\nThis will actually reported `tikz/qresults#1.tikz` as missing, showing that the file is being indexed. Anything inside command (re)definitions is not executed at that point and as a result should not be indexed, I suppose.\r\n\r\n# Error information\r\n\r\n**Atom Version**: 1.7.0-beta0\r\n**System**: Mac OS X 10.11\r\n**Thrown From**: [latextools](https://github.com/msiniscalchi/atom-latextools) package, v0.8.0\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught TypeError: Cannot read property 'split' of null\r\n\r\n```\r\nAt /Volumes/--volumename--/Users/--username--/.atom/packages/latextools/lib/completion-manager.coffee:89\r\n\r\nTypeError: Cannot read property 'split' of null\r\n    at CompletionManager.module.exports.CompletionManager.citeComplete (/Volumes/Macbook HD/Users/--username--/.atom/packages/latextools/lib/completion-manager.coffee:111:27)\r\n    at CompletionManager.module.exports.CompletionManager.refCiteComplete (/Volumes/Macbook HD/Users/--username--/.atom/packages/latextools/lib/completion-manager.coffee:49:8)\r\n    at /Volumes/Macbook HD/Users/--username--/.atom/packages/latextools/lib/latextools.coffee:280:28\r\n    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)\r\n    at Emitter.module.exports.Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)\r\n    at /Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1357:25\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n     -3:48.5.0 project-manager:list-projects (atom-text-editor.editor.is-focused)\r\n     -3:47.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n     -3:43.9.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)\r\n     -3:37.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n  4x -3:22.2.0 core:undo (atom-text-editor.editor.is-focused)\r\n  3x -3:21.3.0 core:redo (atom-text-editor.editor.is-focused)\r\n     -2:47.7.0 settings-view:open (atom-text-editor.editor.is-focused)\r\n     -2:42.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n  8x -2:12.4.0 editor:newline (atom-text-editor.editor.is-focused)\r\n  8x -2:11.4.0 core:move-up (atom-text-editor.editor.is-focused)\r\n  3x -2:10.3.0 editor:newline (atom-text-editor.editor.is-focused)\r\n     -1:52 core:copy (atom-text-editor.editor.is-focused)\r\n```\r\n\r\n### Config\r\n\r\n```json\r\n{\r\n  \"core\": {\r\n    \"disabledPackages\": [\r\n      \"markdown-writer\",\r\n      \"latex\",\r\n      \"atom-live-grammar-reload\",\r\n      \"dev-live-reload\",\r\n      \"livereload\"\r\n    ],\r\n    \"ignoredNames\": [\r\n      \".git\",\r\n      \".hg\",\r\n      \".svn\",\r\n      \".DS_Store\",\r\n      \"._*\",\r\n      \"Thumbs.db\",\r\n      \"*.acn\",\r\n      \"*.acr\",\r\n      \"*.alg\",\r\n      \"*.aux\",\r\n      \"*.bbl\",\r\n      \"*.blg\",\r\n      \"*.cb\",\r\n      \"*.cb2\",\r\n      \"*.dvi\",\r\n      \"*.fdb*\",\r\n      \"*.fls\",\r\n      \"*.glg\",\r\n      \"*.glg\",\r\n      \"*.glo\",\r\n      \"*.gls\",\r\n      \"*.gz\",\r\n      \"*.gz(busy)\",\r\n      \"*.ist\",\r\n      \"*.log\",\r\n      \"*.out\",\r\n      \"*.sbl\",\r\n      \"*.sym\",\r\n      \"*.thm\",\r\n      \"*.toc\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n### Installed Packages\r\n\r\n```coffee\r\n# User\r\ngit-log, v0.4.1\r\nlanguage-latex, v0.6.1\r\nlanguage-matlab, v0.2.1\r\nlatextools, v0.8.0\r\nmarkdown-scroll-sync, v2.1.2\r\nminimap, v4.21.0\r\nproject-manager, v2.7.6\r\n\r\n# Dev\r\nlanguage-matlab, v0.2.0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/comments/203298181","html_url":"https://github.com/msiniscalchi/atom-latextools/issues/70#issuecomment-203298181","issue_url":"https://api.github.com/repos/msiniscalchi/atom-latextools/issues/70","id":203298181,"user":{"login":"tomrijndorp","id":15803419,"avatar_url":"https://avatars.githubusercontent.com/u/15803419?v=3","gravatar_id":"","url":"https://api.github.com/users/tomrijndorp","html_url":"https://github.com/tomrijndorp","followers_url":"https://api.github.com/users/tomrijndorp/followers","following_url":"https://api.github.com/users/tomrijndorp/following{/other_user}","gists_url":"https://api.github.com/users/tomrijndorp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomrijndorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomrijndorp/subscriptions","organizations_url":"https://api.github.com/users/tomrijndorp/orgs","repos_url":"https://api.github.com/users/tomrijndorp/repos","events_url":"https://api.github.com/users/tomrijndorp/events{/privacy}","received_events_url":"https://api.github.com/users/tomrijndorp/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T07:46:07Z","updated_at":"2016-03-30T07:46:07Z","body":"Thanks for the swift reply. Adding `\".tikz\"` to the `texFileExtensions` is a good fix to prevent the modal dialogs from appearing. Looking forward to the update!"}}