rzyns / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Print menu item results in E172: Only one file name allowed #471

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?

Type CMD-P or go to the File menu, item Print.

What is the expected output? What do you see instead?

I should get a PDF of the file, instead I get 'E172: Only one file name 
allowed' at the bottom line, nothing else.

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?

MacVim 7.4 snapshot 70
(7.4 (2013 Aug 10, compiled Aug 10 2013 18:40:52) )

Mac OS X 10.8.4

Please provide any additional information below.

I have tried to :set verbose=15 but that did not yield any output when typing 
CMD-P.
Interestingly, the :hardcopy command works just fine.

The issue might be caused by the way the print command is implemented in the 
menu.
Here is how it is currently defined:
:menu File.Print
--- Menus ---
510 &Print
    n    :update !a2ps -1 --portrait --tabsize=4 --borders=no<CR>
    v    :update !a2ps -1 --portrait --tabsize=4 --borders=no<CR>
    s    :update !a2ps -1 --portrait --tabsize=4 --borders=no<CR>
    o    <C-C>:update !a2ps -1 --portrait --tabsize=4 --borders=no<CR><C-\><C-G>

However, on my system, there is no a2ps installed.
If this is the reason, then at least the error message should be changed 
somehow.

Perhaps it is better, to define these printing menu commands by mapping them to 
the :hardcopy command.

BTW: the same problem also existed with MacVim version 7.3

Original issue reported on code.google.com by snoopy.6...@googlemail.com on 20 Aug 2013 at 8:42

GoogleCodeExporter commented 9 years ago
You must have a plugin that is changing the File.Print menu item.  This is what 
it says on my machine:

:menu File.Print
--- Menus ---
510 &Print
    n*   :hardcopy<CR>
    v*   :hardcopy<CR>
    s*   :hardcopy<CR>
    o*   <C-C>:hardcopy<CR><C-\><C-G>

Try something like "grep -r 'Print' *" inside your ~/.vim folder to find the 
offending plugin (and check your .vimrc and .gvimrc as well).

Original comment by bjorn.winckler@gmail.com on 20 Aug 2013 at 9:36

GoogleCodeExporter commented 9 years ago
Argh - you are right. Sorry for the trouble!

Original comment by snoopy.6...@googlemail.com on 20 Aug 2013 at 9:47

GoogleCodeExporter commented 9 years ago
No worries.

Original comment by bjorn.winckler@gmail.com on 20 Aug 2013 at 9:50