[MacPorts] #43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax ----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: tmux ----------------------+-------------------------------- The wrong file is being written to /opt/local/share/vim/vimfiles/ftdetect/tmux.vim . What is currently being written is a copy of the syntax file located at: /opt/local/share/vim/vimfiles/syntax/tmux.vim. What should be writtent to that file is: {{{ autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux }}} As it is, this breaks syntax for EVERY file that does not have a filetype (e.g. anything without an extension- README, etc.). -- Ticket URL: <https://trac.macports.org/ticket/43351> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Changes (by ryandesign@…): * cc: tessarek@…, ryandesign@… (added) Comment: Replying to [ticket:43351 vergus@…]:
The wrong file is being written to /opt/local/share/vim/vimfiles/ftdetect/tmux.vim . What is currently being written is a copy of the syntax file located at: /opt/local/share/vim/vimfiles/syntax/tmux.vim.
This change was made in r118741, as requested and provided as part of #43309. I'm Cc'ing the provider of that patch for comment.
What should be writtent to that file is: {{{ autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux }}}
What we had in the file before was: {{{ autocmd BufRead,BufNewFile .tmux.conf setf tmux }}} We can go back to that, or to your version, if we need to. I don't know tmux so I don't know what's appropriate. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): I only updated the tmux version. The post-destroot is basically the same as before. I just changed the line {{{ xinstall -m 0644 ${filespath}/tmux.vim ${destroot}${prefix}/share/vim/vimfiles/ftdetect }}} because it resulted in an error. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by ryandesign@…): What error did it result in? -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): File not found. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by ryandesign@…): During destroot? I can't reproduce that. The directory being copied into is created a few lines up, and the file being copied is right there in the files directory (or was, until I removed it in r118742 because it was no longer being used). Shall I change it back to the way it was before? Or to vergus' new version? -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): I'm a little bit confused. 2 lines up, the file tmux.vim is copied from ./examples/tmux.vim into the syntax directory: {{{ xinstall -m 0755 -d ${destroot}${prefix}/share/vim/vimfiles/syntax xinstall -m 0644 ${worksrcpath}/examples/tmux.vim ${destroot}${prefix}/share/vim/vimfiles/syntax }}} So the file is never copied to `${filespath}`, so how can the file be there? Maybe I'm missing something here, but the tmux.vim file is a syntax file. So something is off. Or is there another file on the server that has the same name, but a different content? As I said, I'm confused. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by ryandesign@…): Yes, there are two different files named tmux.vim. One is in the source distribution in the examples directory and gets copied to /opt/local/share/vim/vimfiles/syntax/tmux.vim. The other is (was) in the [browser:trunk/dports/sysutils/tmux/files?rev=118741 files directory] and gets (got) copied to /opt/local/share/vim/vimfiles/ftdetect/tmux.vim (until your change). Do you not have this files directory on your system, in the same directory where you have the tmux Portfile? If not, why not? -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): This is strange. I only had 3 files in my directory: `tmux.1.diff, tmux.h.diff, osdep-darwin.c.diff`. These patches were unnecessary with 1.9a and therefore I removed them. Maybe there was a glitch in svn when I checkout the Port. In any case it seems that this was my fault. Can you please restore the previous file `tmux.vim` into a new file called 'tmux.ftdetect` and change the line to: {{{ xinstall -m 0644 ${filespath}/tmux.ftdetect ${destroot}${prefix}/share/vim/vimfiles/ftdetect }}} If the OP prefers `autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux`, please change the content as well. I'm sorry to put this on you. I'd do it myseslf, but I don't have commit privilege. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by ryandesign@…): The filename extension is immaterial? I'll wait to hear back from the OP regarding which version of the file we should use, since I don't know tmux and don't know what effect any of these directives have. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): Argh. Of course you are right. (*Too many shells open and too much cut and paste*) Yes, it should be: {{{ xinstall -m 0644 ${filespath}/tmux.ftdetect ${destroot}${prefix}/share/vim/vimfiles/ftdetect/tmux.vim }}} I don't like it, if an ambiguous file is located in a 'root' dir, because you can't know just by looking at the file, if it's a syntax or a ftdetect file. We can solve this by either creating a directory `ftdetect` and write: {{{ xinstall -m 0644 ${filespath}/ftdetect/tmux.vim ${destroot}${prefix}/share/vim/vimfiles/ftdetect }}} or by naming the file differently and write: {{{ xinstall -m 0644 ${filespath}/tmux.ftdetect ${destroot}${prefix}/share/vim/vimfiles/ftdetect/tmux.vim }}} -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): Additional info: the 2 files in question are not tmux files. They are vim files for tmux. The one is the syntax file that allows vim to highlight tmux commands. The other file just tells vim, which files are tmux files and which syntax file vim should use for highlighting. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by vergus@…): tmux.ftdetect is plain wrong. And a ftdect file at the root level is bad, either because vim won't use it (haven't tested), or something else will want to write there. It should be /opt/local/share/vim/vimfiles/ftdetect/tmux.vim See http://vimdoc.sourceforge.net/htmldoc/filetype.html#ftdetect But maybe the files should just be deleted. They are not essential to tmux and are provided in tmux's example directory. Vim users can install separately from https://github.com/tejr/vim-tmux if they really want it. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): @vergus: You misunderstood. We were talking about where to put (or how to name) the file in the Port source tree. You are talking about the target location. And yes, it will be in `/opt/local/share/vim/vimfiles/ftdetect/tmux.vim`. We just need to know, if you rather like the content of the ftdetect file tmux.vim to be: {{{ autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux }}} or {{{ autocmd BufRead,BufNewFile .tmux.conf setf tmux }}} -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by ryandesign@…): Replying to [comment:12 vergus@…]:
But maybe the files should just be deleted. They are not essential to tmux and are provided in tmux's example directory. Vim users can install separately from https://github.com/tejr/vim-tmux if they really want it.
Installing the files with the port seems useful. Is there any detriment to doing so? If not, we should continue to do so. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): I agree, we should install these 2 files with tmux. There is no harm in doing so. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by vergus@…): Replying to [comment:13 tessarek@…]:
We just need to know, if you rather like the content of the ftdetect file tmux.vim to be:
{{{ autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux }}}
I vote for this one since it doesn't limit itself to a single tmux conf file. It will accept tmux.conf, .tmux.conf, tmux.conf.osx, osx.tmux.conf, etc. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): I agree. {{{ autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux }}} matches all files that include the string `tmux.conf`. @ryan: can you please make the necessary changes? You can also give me commit right to the tmux repository and I make the changes myself. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): Additional info: I'm willing to maintain this port. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:18> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------------- Reporter: vergus@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: tmux | -----------------------+-------------------------------- Comment (by tessarek@…): Any update on this? -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:19> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------- Reporter: vergus@… | Owner: ryandesign@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: haspatch Port: tmux | -----------------------+-------------------------- Changes (by ryandesign@…): * status: new => assigned * owner: macports-tickets@… => ryandesign@… * keywords: => haspatch * cc: ryandesign@… (removed) Comment: I'll address it today. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:20> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------- Reporter: vergus@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: haspatch Port: tmux | -----------------------+-------------------------- Changes (by ryandesign@…): * status: assigned => closed * resolution: => fixed Comment: tessarek, I've committed the fix in r119136, and I've made you the maintainer. I appreciate your enthusiasm about MacPorts, but since this is the first port you will be maintaining, commit access to the MacPorts repository would be premature. See the guide for more information on the [https://guide.macports.org/chunked/project.membership.html prerequisites for commit access]. For now, please file tickets and attach patches for any changes you'd like made to the port. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:21> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------- Reporter: vergus@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: haspatch Port: tmux | -----------------------+-------------------------- Comment (by tessarek@…): sure, will do. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:22> MacPorts <http://www.macports.org/> Ports system for OS X
#43351: tmux @1.9a; wrong file is copied to vim's ftdetect, breaking vim syntax -----------------------+-------------------------- Reporter: vergus@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: haspatch Port: tmux | -----------------------+-------------------------- Comment (by tessarek@…): I didn't know that the commit access would be for the entire repo. I'm used to a much stricter access control. If that were the case, you could give me access to just a directory or even a file. -- Ticket URL: <https://trac.macports.org/ticket/43351#comment:23> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts