Public bug reported:

The following line in ~/.xpdfrc makes xpdf run ls (with the output in
the console that xpdf was launched from):

bind b any run(ls)

This seems to be the correct behaviour.

However, the following lines in ~/.xpdfrc don't work:

bind c any run(ls -l)
bind d any run(ls %f)

For example, when I press c, xpdf says

Error: Invalid command syntax: 'run(ls'
Error: Invalid command syntax: '-l)'

Based on my reading of the man page for xpdf, I believe this is a bug:
xpdf should run ls -l when c is pressed, and run ls %f where %f is
replaced with the currently loaded pdf filename when d is pressed.

This is annoying, because I'd like to pass the currently loaded pdf
filename as an argument to a script, and I can't see how to do this
because of this bug.

Adding quotation marks and/or trying to backslash-escape the space
between ls and -l doesn't seem to help.

Version information:

$ apt-cache policy xpdf
xpdf:
  Installed: 3.02-21
  Candidate: 3.02-21
  Version table:
 *** 3.02-21 0
        500 http://ie.archive.ubuntu.com/ubuntu/ oneiric/universe i386 Packages
        100 /var/lib/dpkg/status

Complete ~/.xpdfrc:
$ cat .xpdfrc
bind b any run(ls) 
bind c any run(ls -l)
bind d any run(ls %f)

** Affects: xpdf (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/931976

Title:
  run in xpdfrc parsed incorrectly making arguments impossible

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xpdf/+bug/931976/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to