Skip to content
This repository
Browse code

Automatic/optional integration with shell.vim

I developed (parts of) my shell.vim plug-in after noticing the annoying
command prompt windows that pop up temporarily on Windows when the
easytags plug-in runs ctags. Because the shell.vim plug-in was a proof
of concept I hadn't published any integration between the two plug-ins.
Since then I've had several requests for this so here it is :-)
  • Loading branch information...
commit 7e8533fceefb4358444997bf3deda8c1812069c7 1 parent 89f9205
Peter Odding authored August 09, 2010
78  README.md
Source Rendered
... ...
@@ -1,14 +1,14 @@
1 1
 # Automated tag generation and syntax highlighting in Vim
2 2
 
3  
-[Vim] [vim] has long been my favorite text editor and combined with [Exuberant Ctags] [exuberant_ctags] it has the potential to provide most of what I expect from an [integrated development environment] [ide]. Exuberant Ctags is the latest incarnation of a [family of computer programs] [ctags] that scan source code files to create an index of identifiers (tags) and where they are defined. Vim uses this index (a so-called tags file) to enable you to jump to the definition of any identifier using the [Control-\]][jump_to_tag] mapping.
  3
+[Vim](http://www.vim.org/) has long been my favorite text editor and combined with [Exuberant Ctags] [exuberant_ctags] it has the potential to provide most of what I expect from an [integrated development environment](http://en.wikipedia.org/wiki/Integrated_development_environment). Exuberant Ctags is the latest incarnation of a [family of computer programs](http://en.wikipedia.org/wiki/Ctags) that scan source code files to create an index of identifiers (tags) and where they are defined. Vim uses this index (a so-called tags file) to enable you to jump to the definition of any identifier using the [Control-\]](http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#CTRL-]) mapping.
4 4
 
5  
-When you're familiar with integrated development environments you may recognize this feature as "Go-to definition". One advantage of the combination of Vim and Exuberant Ctags over integrated development environments is that Vim supports syntax highlighting for [over 500 file types] [vim_support] (!) and Exuberant Ctags can generate tags for [over 40 file types] [ctags_support] as well...
  5
+When you're familiar with integrated development environments you may recognize this feature as "Go-to definition". One advantage of the combination of Vim and Exuberant Ctags over integrated development environments is that Vim supports syntax highlighting for [over 500 file types](http://ftp.vim.org/vim/runtime/syntax/) (!) and Exuberant Ctags can generate tags for [over 40 file types](http://ctags.sourceforge.net/languages.html) as well...
6 6
 
7  
-There's just one problem: You have to manually keep your tags files up-to-date and this turns out to be a royal pain in the ass! So I set out to write a Vim plug-in that would do this boring work for me. When I finished the plug-in's basic functionality (one automatic command and a call to [system()][system] later) I became interested in dynamic syntax highlighting, so I added that as well to see if it would work -- surprisingly well I'm happy to report!
  7
+There's just one problem: You have to manually keep your tags files up-to-date and this turns out to be a royal pain in the ass! So I set out to write a Vim plug-in that would do this boring work for me. When I finished the plug-in's basic functionality (one automatic command and a call to [system()] [system] later) I became interested in dynamic syntax highlighting, so I added that as well to see if it would work -- surprisingly well I'm happy to report!
8 8
 
9 9
 ## Install & usage
10 10
 
11  
-Unzip the most recent [ZIP archive] [latest_zip] file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). Now try it out: Edit any file type supported by Exuberant Ctags and within ten seconds the plug-in should create/update your tags file (`~/.vimtags` on UNIX, `~/_vimtags` on Windows) with the tags defined in the file you just edited! This means that whatever file you're editing in Vim (as long as it's on the local file system), tags will always be available by the time you need them!
  11
+Unzip the most recent [ZIP archive](http://peterodding.com/code/vim/downloads/easytags) file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). Now try it out: Edit any file type supported by Exuberant Ctags and within ten seconds the plug-in should create/update your tags file (`~/.vimtags` on UNIX, `~/_vimtags` on Windows) with the tags defined in the file you just edited! This means that whatever file you're editing in Vim (as long as it's on the local file system), tags will always be available by the time you need them!
12 12
 
13 13
 Additionally if the file you just opened is a C, C++, Objective-C, Java, Lua, Python, PHP or Vim source file you should also notice that the function and type names defined in the file have been syntax highlighted.
14 14
 
@@ -18,6 +18,24 @@ Note that if the plug-in warns you `ctags` isn't installed you'll have to downlo
18 18
 
19 19
     $ sudo apt-get install exuberant-ctags
20 20
 
  21
+### If you're using Windows
  22
+
  23
+On Windows the [system()] [system] function used by `easytags.vim` causes a command prompt window to pop up while Exuberant Ctags is executing. If this bothers you then you can install my [shell.vim](http://peterodding.com/code/vim/shell/) plug-in which includes a [DLL](http://en.wikipedia.org/wiki/Dynamic-link_library) that works around this issue. Once you've installed both plug-ins it should work out of the box! Please let me know if this doesn't work for you.
  24
+
  25
+### The `:UpdateTags` command
  26
+
  27
+This command executes [Exuberant Ctags] [exuberant_ctags] from inside Vim to update the global tags file defined by `g:easytags_file`. When no arguments are given the tags for the current file are updated, otherwise the arguments are passed on to `ctags`. For example when you execute the Vim command `:UpdateTags -R ~/.vim` (or `:UpdateTags -R ~\vimfiles` on Windows) the plug-in will execute `ctags -R ~/.vim` for you (with some additional arguments).
  28
+
  29
+When you execute this command like `:UpdateTags!` (including the bang!) then all tags whose files are missing will be filtered from the global tags file.
  30
+
  31
+Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
  32
+
  33
+### The `:HighlightTags` command
  34
+
  35
+When you execute this command while editing one of the supported file types (see above) the relevant tags in the current file are highlighted. The tags to highlight are gathered from all tags files known to Vim (through the ['tags' option](http://vimdoc.sourceforge.net/htmldoc/options.html#'tags')).
  36
+
  37
+Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
  38
+
21 39
 ### The `g:easytags_cmd` option
22 40
 
23 41
 The plug-in will try to determine the location where Exuberant Ctags is installed on its own but this might not always work because any given executable named `ctags` in your `$PATH` might not in fact be Exuberant Ctags but some older, more primitive `ctags` implementation which doesn't support the same command-line options and thus breaks the `easytags.vim` plug-in. If this is the case you can set the global variable `g:easytags_cmd` to the location where you've installed Exuberant Ctags, e.g.:
@@ -34,11 +52,11 @@ A leading `~` in the `g:easytags_file` variable is expanded to your current home
34 52
 
35 53
 ### The `g:easytags_always_enabled` option
36 54
 
37  
-By default the plug-in automatically generates and highlights tags when you stop typing for a few seconds (this works using the [CursorHold][cursorhold] automatic command). This means that when you edit a file, the dynamic highlighting won't appear until you pause for a moment. If you don't like this you can configure the plug-in to always enable dynamic highlighting:
  55
+By default the plug-in automatically generates and highlights tags when you stop typing for a few seconds (this works using the [CursorHold](http://vimdoc.sourceforge.net/htmldoc/autocmd.html#CursorHold) automatic command). This means that when you edit a file, the dynamic highlighting won't appear until you pause for a moment. If you don't like this you can configure the plug-in to always enable dynamic highlighting:
38 56
 
39 57
     :let g:easytags_always_enabled = 1
40 58
 
41  
-Be warned that after setting this option you'll probably notice why it's disabled by default: Every time you edit a file in Vim, the plug-in will first run Exuberant Ctags and then highlight the tags, and this slows Vim down quite a lot. I have some ideas on how to improve this latency by running Exuberant Ctags in the background (see my [shell.vim][shell] plug-in) so stay tuned!
  59
+Be warned that after setting this option you'll probably notice why it's disabled by default: Every time you edit a file in Vim, the plug-in will first run Exuberant Ctags and then highlight the tags, and this slows Vim down quite a lot. I have some ideas on how to improve this latency by running Exuberant Ctags in the background so stay tuned!
42 60
 
43 61
 Note: If you change this option it won't apply until you restart Vim, so you'll have to set this option in your [vimrc script][vimrc].
44 62
 
@@ -52,24 +70,10 @@ Note: Like the `g:easytags_always_enabled` option, if you change this option it
52 70
 
53 71
 ### The `g:easytags_resolve_links` option
54 72
 
55  
-UNIX has [symbolic links] [symlinks] and [hard links] [hardlinks], both of which conflict with the concept of having one unique location for every identifier. With regards to hard links there's not much anyone can do, but because I use symbolic links quite a lot I've added this option. It's disabled by default since it has a small performance impact and might not do what unknowing users expect it to: When you enable this option the plug-in will resolve symbolic links in pathnames, which means your tags file will only contain entries with [canonical pathnames] [canon]. To enable this option (which I strongly suggest doing when you run UNIX and use symbolic links) execute the following Vim command:
  73
+UNIX has [symbolic links](http://en.wikipedia.org/wiki/Symbolic_link) and [hard links](http://en.wikipedia.org/wiki/Hard_link), both of which conflict with the concept of having one unique location for every identifier. With regards to hard links there's not much anyone can do, but because I use symbolic links quite a lot I've added this option. It's disabled by default since it has a small performance impact and might not do what unknowing users expect it to: When you enable this option the plug-in will resolve symbolic links in pathnames, which means your tags file will only contain entries with [canonical pathnames](http://en.wikipedia.org/wiki/Canonicalization). To enable this option (which I strongly suggest doing when you run UNIX and use symbolic links) execute the following Vim command:
56 74
 
57 75
     :let g:easytags_resolve_links = 1
58 76
 
59  
-### The `:UpdateTags` command
60  
-
61  
-This command executes [Exuberant Ctags] [exuberant_ctags] from inside Vim to update the global tags file defined by `g:easytags_file`. When no arguments are given the tags for the current file are updated, otherwise the arguments are passed on to `ctags`. For example when you execute the Vim command `:UpdateTags -R ~/.vim` (or `:UpdateTags -R ~\vimfiles` on Windows) the plug-in will execute `ctags -R ~/.vim` for you (with some additional arguments).
62  
-
63  
-When you execute this command like `:UpdateTags!` (including the bang!) then all tags whose files are missing will be filtered from the global tags file.
64  
-
65  
-Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
66  
-
67  
-### The `:HighlightTags` command
68  
-
69  
-When you execute this command while editing one of the supported file types (see above) the relevant tags in the current file are highlighted. The tags to highlight are gathered from all tags files known to Vim (through the ['tags' option](http://vimdoc.sourceforge.net/htmldoc/options.html#'tags')).
70  
-
71  
-Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
72  
-
73 77
 ## Troubleshooting
74 78
 
75 79
 ### The plug-in complains that Exuberant Ctags isn't installed
@@ -92,7 +96,7 @@ If this doesn't print the location where you installed Exuberant Ctags it means
92 96
 
93 97
 ### Vim locks up while the plug-in is running
94 98
 
95  
-Once or twice now in several years I've experienced Exuberant Ctags getting into an infinite loop when given garbage input. In my case this happened by accident a few days ago :-|. Because my plug-in executes `ctags` in the foreground this will block Vim indefinitely! If this happens you might be able to kill `ctags` by pressing [Control-C][control_c] but if that doesn't work you can also kill it without stopping Vim using a task manager or the `pkill` command (available on most UNIX systems):
  99
+Once or twice now in several years I've experienced Exuberant Ctags getting into an infinite loop when given garbage input. In my case this happened by accident a few days ago :-|. Because my plug-in executes `ctags` in the foreground this will block Vim indefinitely! If this happens you might be able to kill `ctags` by pressing [Control-C](http://vimdoc.sourceforge.net/htmldoc/pattern.html#CTRL-C) but if that doesn't work you can also kill it without stopping Vim using a task manager or the `pkill` command (available on most UNIX systems):
96 100
 
97 101
     $ pkill -KILL ctags
98 102
 
@@ -100,13 +104,13 @@ If Vim seems very slow and you suspect this plug-in might be the one to blame, i
100 104
 
101 105
     :set vbs=1
102 106
 
103  
-Every time the plug-in executes it will time how long the execution takes and add the results to Vim's message history, which you can view by executing the [:messages][messages] command.
  107
+Every time the plug-in executes it will time how long the execution takes and add the results to Vim's message history, which you can view by executing the [:messages](http://vimdoc.sourceforge.net/htmldoc/message.html#:messages) command.
104 108
 
105 109
 ### Failed to highlight tags because pattern is too big!
106 110
 
107  
-If the `easytags.vim` plug-in fails to highlight your tags and the error message mentions that the pattern is too big, your tags file has grown too large for Vim to be able to highlight all tagged identifiers! I've had this happen to me with 50 KB patterns because I added most of the headers in `/usr/include/` to my tags file. Internally Vim raises the error [E339: Pattern too long] [E339] and unfortunately the only way to avoid this problem once it occurs is to reduce the number of tagged identifiers...
  111
+If the `easytags.vim` plug-in fails to highlight your tags and the error message mentions that the pattern is too big, your tags file has grown too large for Vim to be able to highlight all tagged identifiers! I've had this happen to me with 50 KB patterns because I added most of the headers in `/usr/include/` to my tags file. Internally Vim raises the error [E339: Pattern too long](http://vimdoc.sourceforge.net/htmldoc/message.html#E339) and unfortunately the only way to avoid this problem once it occurs is to reduce the number of tagged identifiers...
108 112
 
109  
-In my case the solution was to move most of the tags from `/usr/include/` over to project specific tags files which are automatically loaded by Vim when I edit files in different projects because I've set the ['tags' option] [tags_option] as follows:
  113
+In my case the solution was to move most of the tags from `/usr/include/` over to project specific tags files which are automatically loaded by Vim when I edit files in different projects because I've set the ['tags' option](http://vimdoc.sourceforge.net/htmldoc/options.html#'tags') as follows:
110 114
 
111 115
     :set tags=./.tags;,~/.vimtags
112 116
 
@@ -114,32 +118,14 @@ Once you've executed the above command, Vim will automatically look for a file n
114 118
 
115 119
 ## Contact
116 120
 
117  
-If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/easytags/> and <http://github.com/xolox/vim-easytags>. If you like this plug-in please vote for it on [www.vim.org] [vim_scripts_entry].
  121
+If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/easytags/> and <http://github.com/xolox/vim-easytags>. If you like this plug-in please vote for it on [www.vim.org](http://www.vim.org/scripts/script.php?script_id=3114).
118 122
 
119 123
 ## License
120 124
 
121  
-This software is licensed under the [MIT license] [mit_license].  
  125
+This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).  
122 126
 © 2010 Peter Odding &lt;<peter@peterodding.com>&gt;.
123 127
 
124 128
 
125  
-[canon]: http://en.wikipedia.org/wiki/Canonicalization
126  
-[control_c]: http://vimdoc.sourceforge.net/htmldoc/pattern.html#CTRL-C
127  
-[ctags]: http://en.wikipedia.org/wiki/Ctags
128  
-[ctags_support]: http://ctags.sourceforge.net/languages.html
129  
-[cursorhold]: http://vimdoc.sourceforge.net/htmldoc/autocmd.html#CursorHold
130  
-[E339]: http://vimdoc.sourceforge.net/htmldoc/message.html#E339
131 129
 [exuberant_ctags]: http://ctags.sourceforge.net/
132  
-[hardlinks]: http://en.wikipedia.org/wiki/Hard_link
133  
-[ide]: http://en.wikipedia.org/wiki/Integrated_development_environment
134  
-[jump_to_tag]: http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#CTRL-]
135  
-[latest_zip]: http://peterodding.com/code/vim/downloads/easytags
136  
-[messages]: http://vimdoc.sourceforge.net/htmldoc/message.html#:messages
137  
-[mit_license]: http://en.wikipedia.org/wiki/MIT_License
138  
-[shell]: http://peterodding.com/code/vim/shell/
139  
-[symlinks]: http://en.wikipedia.org/wiki/Symbolic_link
140  
-[system]: http://vimdoc.sourceforge.net/htmldoc/eval.html#system()
141  
-[tags_option]: http://vimdoc.sourceforge.net/htmldoc/options.html#'tags'
142  
-[vim]: http://www.vim.org/
143  
-[vim_scripts_entry]: http://www.vim.org/scripts/script.php?script_id=3114
144  
-[vim_support]: http://ftp.vim.org/vim/runtime/syntax/
  130
+[system]: http://vimdoc.sourceforge.net/htmldoc/eval.html#system%28%29
145 131
 [vimrc]: http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
58  autoload.vim
@@ -106,13 +106,19 @@ function! s:prep_cmdline(cfile, tagsfile, firstrun, arguments) " {{{3
106 106
 endfunction
107 107
 
108 108
 function! s:run_ctags(starttime, cfile, tagsfile, firstrun, cmdline) " {{{3
109  
-  let output = ''
  109
+  let output = []
110 110
   if a:cmdline != ''
111  
-    let output = system(a:cmdline)
112  
-    if v:shell_error
113  
-      let msg = "Failed to update tags file %s: %s!"
114  
-      throw printf(msg, fnamemodify(a:tagsfile, ':~'), strtrans(output))
115  
-    elseif a:firstrun
  111
+    try
  112
+      let output = xolox#shell#execute(a:cmdline, 1)
  113
+    catch /^Vim\%((\a\+)\)\=:E117/
  114
+      " Ignore missing shell.vim plug-in.
  115
+      let output = split(system(a:cmdline), "\n")
  116
+      if v:shell_error
  117
+        let msg = "Failed to update tags file %s: %s!"
  118
+        throw printf(msg, fnamemodify(a:tagsfile, ':~'), strtrans(join(output, "\n")))
  119
+      endif
  120
+    endtry
  121
+    if a:firstrun
116 122
       if a:cfile != ''
117 123
         call easytags#add_tagged_file(a:cfile)
118 124
         call xolox#timer#stop("%s: Created tags for %s in %s.", s:script, expand('%:p:~'), a:starttime)
@@ -129,8 +135,7 @@ function! s:filter_merge_tags(filter_tags, tagsfile, output) " {{{3
129 135
   call s:set_tagged_files(entries)
130 136
   let filters = []
131 137
   let s:cached_filenames = {}
132  
-  let new_entries = split(a:output, "\n")
133  
-  let tagged_files = s:find_tagged_files(new_entries)
  138
+  let tagged_files = s:find_tagged_files(a:output)
134 139
   if !empty(tagged_files)
135 140
     call add(filters, '!has_key(tagged_files, s:canonicalize(get(v:val, 1)))')
136 141
   endif
@@ -144,7 +149,7 @@ function! s:filter_merge_tags(filter_tags, tagsfile, output) " {{{3
144 149
   unlet s:cached_filenames
145 150
   let num_filtered = num_old_entries - len(entries)
146 151
   call map(entries, 'join(v:val, "\t")')
147  
-  call extend(entries, new_entries)
  152
+  call extend(entries, a:output)
148 153
   if !easytags#write_tagsfile(a:tagsfile, headers, entries)
149 154
     let msg = "Failed to write filtered tags file %s!"
150 155
     throw printf(msg, fnamemodify(a:tagsfile, ':~'))
@@ -173,7 +178,7 @@ endfunction
173 178
 function! easytags#highlight() " {{{2
174 179
   try
175 180
     if exists('g:syntax_on') && has_key(s:tagkinds, &ft) && !exists('b:easytags_nohl')
176  
-      let start = xolox#timer#start()
  181
+      let starttime = xolox#timer#start()
177 182
       if !has_key(s:aliases, &ft)
178 183
         let taglist = filter(taglist('.'), "get(v:val, 'language', '') ==? &ft")
179 184
       else
@@ -207,7 +212,7 @@ function! easytags#highlight() " {{{2
207 212
         let bufname = 'unnamed buffer #' . bufnr('%')
208 213
       endif
209 214
       let msg = "%s: Highlighted tags in %s in %s."
210  
-      call xolox#timer#stop(msg, s:script, bufname, start)
  215
+      call xolox#timer#stop(msg, s:script, bufname, starttime)
211 216
       return 1
212 217
     endif
213 218
   catch
@@ -219,20 +224,33 @@ endfunction
219 224
 
220 225
 function! easytags#supported_filetypes() " {{{2
221 226
   if !exists('s:supported_filetypes')
222  
-    let start = xolox#timer#start()
223  
-    let listing = system(g:easytags_cmd . ' --list-languages')
224  
-    if v:shell_error
225  
-      let msg = "Failed to get supported languages! (output: %s)"
226  
-      throw printf(msg, strtrans(listing))
227  
-    endif
228  
-    let s:supported_filetypes = split(listing, '\n')
229  
-    call map(s:supported_filetypes, 'easytags#to_vim_ft(v:val)')
  227
+    let starttime = xolox#timer#start()
  228
+    let command = g:easytags_cmd . ' --list-languages'
  229
+    try
  230
+      let listing = xolox#shell#execute(command, 1)
  231
+    catch /^Vim\%((\a\+)\)\=:E117/
  232
+      " Ignore missing shell.vim plug-in.
  233
+      let listing = split(system(command), "\n")
  234
+      if v:shell_error
  235
+        let msg = "Failed to get supported languages! (output: %s)"
  236
+        throw printf(msg, strtrans(join(listing, "\n")))
  237
+      endif
  238
+    endtry
  239
+    let s:supported_filetypes = map(copy(listing), 's:check_filetype(listing, v:val)')
230 240
     let msg = "%s: Retrieved %i supported languages in %s."
231  
-    call xolox#timer#stop(msg, s:script, len(s:supported_filetypes), start)
  241
+    call xolox#timer#stop(msg, s:script, len(s:supported_filetypes), starttime)
232 242
   endif
233 243
   return s:supported_filetypes
234 244
 endfunction
235 245
 
  246
+function! s:check_filetype(listing, cline)
  247
+  if a:cline !~ '^\w\S*$'
  248
+    let msg = "Failed to get supported languages! (output: %s)"
  249
+    throw printf(msg, strtrans(join(a:listing, "\n")))
  250
+  endif
  251
+  return easytags#to_vim_ft(a:cline)
  252
+endfunction
  253
+
236 254
 function! easytags#read_tagsfile(tagsfile) " {{{2
237 255
   " I'm not sure whether this is by design or an implementation detail but
238 256
   " it's possible for the "!_TAG_FILE_SORTED" header to appear after one or
13  easytags.vim
@@ -64,7 +64,18 @@ function! s:CheckCtags(name, version)
64 64
   " This function makes sure it is because the easytags plug-in requires the
65 65
   " --list-languages option.
66 66
   if executable(a:name)
67  
-    let listing = system(a:name . ' --version')
  67
+    let command = a:name . ' --version'
  68
+    try
  69
+      let listing = join(xolox#shell#execute(command, 1), '\n')
  70
+    catch /^Vim\%((\a\+)\)\=:E117/
  71
+      " Ignore missing shell.vim plug-in.
  72
+      let listing = system(command)
  73
+    catch
  74
+      " xolox#shell#execute() converts shell errors to exceptions and since
  75
+      " we're checking whether one of several executables exists we don't want
  76
+      " to throw an error when the first one doesn't!
  77
+      return
  78
+    endtry
68 79
     let pattern = 'Exuberant Ctags \zs\d\+\(\.\d\+\)*'
69 80
     let g:easytags_ctags_version = matchstr(listing, pattern)
70 81
     return s:VersionToNumber(g:easytags_ctags_version) >= a:version

0 notes on commit 7e8533f

Please sign in to comment.
Something went wrong with that request. Please try again.