Skip to content
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

Skim forward search not working on macOS 12.1 #2279

Closed
Zeta611 opened this issue Dec 14, 2021 · 18 comments
Closed

Skim forward search not working on macOS 12.1 #2279

Zeta611 opened this issue Dec 14, 2021 · 18 comments
Labels

Comments

@Zeta611
Copy link

Zeta611 commented Dec 14, 2021

Description

I recently got an M1 Mac (if relevant) and setup Neovim + vimtex almost identically to my previous intel Mac.
However, forward search does not work anymore.

I installed both Neovim and Skim via Homebrew.

Steps to reproduce

I invoked neovim with NVIM_LISTEN_ADDRESS=/tmp/nvimsocket nvim -u minimal.vim minimal.tex.

set nocompatible

let &runtimepath  = '~/.local/share/nvim/plugged/vimtex,' . &runtimepath
let &runtimepath .= ',~/.local/share/nvim/plugged/vimtex/after'

filetype plugin indent on
syntax on

let g:vimtex_view_method = 'skim'
\documentclass{article}

\begin{document}
Hello, \TeX!
\end{document}

Expected behavior

Forward search should work with \ll or :VimtexView.

Actual behavior

Skim does not get focused nor 'forward-search'ed.

Initial \ll does wake Skim and open the document (without current line being focused).

Backward search does work properly.

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: macOS 12.1 (21C52)
  Vim version: NVIM v0.6.0
  Has clientserver: true
  Servername: /tmp/nvimsocket

VimTeX project: test
  base: test.tex
  root: /Users/jay/Developer/TeXProjects/test
  tex: /Users/jay/Developer/TeXProjects/test/test.tex
  main parser: current file verified
  document class: article
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: Skim
  qf method: LaTeX logfile
@Zeta611 Zeta611 added the bug label Dec 14, 2021
@Zeta611 Zeta611 changed the title Skim forward search not working Skim forward search not working on M1 Mac Dec 14, 2021
@clason
Copy link
Contributor

clason commented Dec 14, 2021

That was quick :) Yes, macOS 12.1 broke Skim's forward search functionality, see https://sourceforge.net/p/skim-app/bugs/1438/

There's unfortunately nothing that can be done about it right now; we'll have to wait for the Skim dev to release a new version to work around these changes (if that is possible).

@Zeta611
Copy link
Author

Zeta611 commented Dec 14, 2021

So is it broken regardless of the CPU architecture in macOS 12.1?

@Zeta611 Zeta611 changed the title Skim forward search not working on M1 Mac Skim forward search not working on macOS 12.1 Dec 14, 2021
@lervag
Copy link
Owner

lervag commented Dec 14, 2021

Yes. CPU architecture does not have any thing to do with this, I think - it is a software regression. And as @clason implies, there is nothing I can do currently from the VimTeX side except wait for updates on Skim. I believe @clason plans to submit a PR when Skim is updated, so stay tuned. :)

@lervag lervag closed this as completed Dec 14, 2021
@clason
Copy link
Contributor

clason commented Dec 14, 2021

@lervag maybe leave it open or pin it? I expect this will get asked a lot in the coming days...

@lervag lervag reopened this Dec 14, 2021
@lervag lervag pinned this issue Dec 14, 2021
@pbrosnan
Copy link

I can't even get Skim to open now on macOS 12.1. Thinking of switching to zathura while this is getting fixed. BTW, Thanks for writing vimtex levrag!

@lervag
Copy link
Owner

lervag commented Dec 16, 2021

Thanks, @pbrosnan (and sorry about the state of Skim... of course, you could just move over to the light side and use Linux 😃 )

@clason
Copy link
Contributor

clason commented Dec 17, 2021

Short update: On the linked Skim issue, there is now a prerelease that restores functionality on macOS 12.1 (go to the end of page 3), so the next release will Just Work again (without any changes in VimTeX).

@lervag
Copy link
Owner

lervag commented Dec 17, 2021

That's great news! :)

@clason
Copy link
Contributor

clason commented Dec 17, 2021

Unfortunately, the 1.6.7 that was just released is apparently not the same as the last test version -- forward search is again not working 😞

@lervag
Copy link
Owner

lervag commented Dec 18, 2021

That's not so great news. :(

But do you mean that the fix is not really a fix, or that the fix will simply be part of a later release?

@clason
Copy link
Contributor

clason commented Dec 18, 2021

Unclear. There was a (test) version that was working, so a fix is possible; the fact that the actual release based on this test didn't work anymore means that actual problem is still unclear. So it might take a bit longer, but I expect that a later release will indeed fix that (unless macOS 12.2, which is currently in beta, adds new breakages...)

@lervag
Copy link
Owner

lervag commented Dec 19, 2021

Ok; I'll keep my fingers crossed, then.

@uthpalaherath
Copy link

Probably irrelevant, but I downgraded to skim version 1.6.4 to see if that did anything but it didn't. So I guess it's solely due to updating to MacOS 12.1.

Thanks again @lervag for vimtex! Hopefully, we get the vimtex-skim integration working again.

Cheers!

@clason
Copy link
Contributor

clason commented Dec 28, 2021

Apparently, you can also use JavaScript to control macOS apps -- which a) is a marginally less unpleasant language than AppleScript and b) doesn't seem to suffer from the same bug in macOS 12.1.

@sbryngelson
Copy link

sbryngelson commented Dec 29, 2021

Can confirm this same issue on my macOS 12.1 machine as well. Using the latest, Skim 1.6.7

Update: Followed the above links and found that the "test" version of Skim does indeed fix this problem for me https://sourceforge.net/p/skim-app/bugs/1438/?page=3#f4c2/897c

@lervag
Copy link
Owner

lervag commented Dec 29, 2021

I'll close this issue as it is now addressed in #2289. I will review the PR as soon as I have time!

@lervag lervag closed this as completed Dec 29, 2021
lervag pushed a commit that referenced this issue Dec 31, 2021
Refactor the Skim viewer backend to
* use JavaScript instead of AppleScript (nicer, and should fix #2279)
* make the initial start respect `g:vimtex_view_skim_activate`
  (alternative to #2286)
* factor out common script parts into script function
* correct off-by-one line number for forward search
* introduce new option `g:vimtex_view_skim_sync` to perform forward
  search after compilation (syncing viewer and editor), default false
* change default for `g:vimtex_view_skim_reading_bar` to false (location
  is highlighted anyway on sync)
lervag added a commit that referenced this issue Dec 31, 2021
@clason
Copy link
Contributor

clason commented Jan 22, 2022

@lervag I think that issue can be un-pinned now?

@lervag lervag unpinned this issue Jan 22, 2022
@lervag
Copy link
Owner

lervag commented Jan 22, 2022

Thanks, I forgot about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants