Bug#365152: vim-latexsuite: F9 doesn't work: fixed?
Franz, vim 7.0-035+1 no longer has the F9 error with vim-latexsuite 365152 after using the patch http://bugs.debian.org/cgi-bin/bugreport.cgi/04_fname_outline.patch?bug=365152;msg=10;att=1 made for vim 6.4-007+1. Yigal
Bug#365152: vim-latexsuite: F9 doesn't work
Package: vim-latexsuite Version: 20060325-1 Severity: normal Hello! When pressing F9 inside a \ref, vim-latexsuite should offer the matches for the typed key. Instead, it durrently pours some Python errors on me: File string, line 1, in ? File /usr/share/vim/addons/ftplugin/latex-suite/outline.py, line 170, in main contents = getFileContents(root, ext) File /usr/share/vim/addons/ftplugin/latex-suite/outline.py, line 27, in getFileContents contents = re.sub(pat, lambda input: getFileContents(input, ext), contents) File /usr/lib/python2.3/sre.py, line 143, in sub return _compile(pattern, 0).sub(repl, string, count) File /usr/share/vim/addons/ftplugin/latex-suite/outline.py, line 27, in lambda contents = re.sub(pat, lambda input: getFileContents(input, ext), contents) File /usr/share/vim/addons/ftplugin/latex-suite/outline.py, line 23, in getFileContents contents = '\n'.join(open(fname).read().splitlines()) IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'kap1.tex.tex' Zeile 29: Traceback (most recent call last): File string, line 1, in ? NameError: name 'retval' is not defined Zeile 31: E121: Variable nicht definiert: retval The file I was editing is called kap1.tex and the Python script seems to append .tex to the filename, but kap1.tex.tex doesn't exist. Is there any other info I can provide? I can't remember seeing this error before a recent upgrade to version 20060325-1. Regards, Matthias -- Package-specific info: Vim related packages installed on this system: - vim-latexsuite -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15.4 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages vim-latexsuite depends on: ii python 2.3.5-5 An interactive high-level object-o ii vim 1:6.4-007+1 Vi IMproved - enhanced vi editor ii vim-common 1:6.4-007+1 Vi IMproved - Common files ii vim-full [gvim] 1:6.4-007+1 Vi IMproved - enhanced vi editor - ii vim-gnome [gvim] 1:6.4-007+1 Vi IMproved - enhanced vi editor - Versions of packages vim-latexsuite recommends: ii tetex-bin 3.0-16 The teTeX binary files -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#365152: vim-latexsuite: F9 doesn't work
On Fri, Apr 28, 2006 at 12:08:46PM +0200, Matthias Rosenkranz wrote: The file I was editing is called kap1.tex and the Python script seems to append .tex to the filename, but kap1.tex.tex doesn't exist. Is there any other info I can provide? I can't remember seeing this error before a recent upgrade to version 20060325-1. Hi Matthias, the problem is in ftplugin/latex-suite/outline.py. This script scans your included/inputed tex-files for labels and so on but, unfortunately, when opening the corresponding files an already given .tex extension is not recognized, so a .tex is always appended. I brewed up and attached a patch which fixes this behaviour. Please confirm that it works for you. The erroneous file is located at /usr/share/vim/addons/ftplugin/latex-suite/outline.py. If everything works as expected there will be a new revision soon as there's another patch pending, too. I'll also notify upstream about this issue. Thanks, Franz -- Franz Pletz \ The Internet treats censorship as www: http://franz-pletz.org/ \ damage and routes around it. email: [EMAIL PROTECTED] \ -- John Gilmore --- vim-latexsuite_20060325.orig/ftplugin/latex-suite/outline.py 2006-03-21 20:29:35.0 +0100 +++ vim-latexsuite/ftplugin/latex-suite/outline.py 2006-04-28 13:30:03.0 +0200 @@ -11,20 +11,28 @@ import sys import StringIO -# getFileContents {{{ -def getFileContents(argin, ext=''): -if type(argin) is str: -fname = argin + ext +# includeFile {{{ +def includeFile(fname): +if type(fname) is not str: +fname = fname.group(3) + +(root, ext) = os.path.splitext(fname) + +if not ext: +return getFileContents(fname + '.tex') else: -fname = argin.group(3) + ext +return getFileContents(fname) +# }}} +# getFileContents {{{ +def getFileContents(fname): # This longish thing is to make sure that all files are converted into # \n seperated lines. contents = '\n'.join(open(fname).read().splitlines()) # TODO what are all the ways in which a tex file can include another? pat = re.compile(r'^\\(@?)(include|input){(.*?)}', re.M) -contents = re.sub(pat, lambda input: getFileContents(input, ext), contents) +contents = re.sub(pat, includeFile, contents) return ('%% FILENAME: %s' % fname) + '\n' + contents @@ -166,8 +174,7 @@ if head: os.chdir(head) -[root, ext] = os.path.splitext(tail) -contents = getFileContents(root, ext) +contents = getFileContents(fname) nonempty = stripComments(contents) lineinfo = addFileNameAndNumber(nonempty) signature.asc Description: Digital signature
Bug#365152: vim-latexsuite: F9 doesn't work
Hello Franz, On 28.04.2006 um 13:56:51 +0200, Franz Pletz wrote: If everything works as expected there will be a new revision soon as there's another patch pending, too. I'll also notify upstream about this issue. Thanks for the patch. It works for me. Matthias signature.asc Description: Digital signature