VM

vm-run-command-on-region attempts improper change-directory

Bug #1253977 reported by Uday Reddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Committed
Medium
Uday Reddy

Bug Description

Attempting to display a MIME-encoded html message in a virtual folder produced produced the following series of errors, when the supposed current directory of the folder buffer is inaccessible:

(gmail): Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/
Error in writing c:/DOCUME~1/login/LOCALS~1/Temp/vm29622935483.html: (file-error Setting current directory no such file or directory y:/)
Launching cmd /c...
apply: Setting current directory: no such file or directory, y:/

Even though we get a complaint from emacs-w3m, the error is actually happening well before it, in attempting to do qp-decode. The backtrace is below. Perhaps call-process-region is being used inappropriately? Or, the Windows path name is incorrectly parsed by some part of call-process-region, so that it is assuming it to be a relative path name? This is happening on Emacs24.

Apparently, call-process-region attempts to first cd to the `default-directory'. Why is the default-directory of the virtual folder set to some random directory?

* (byte-code "\301\302\"\207" [tempfile vm-error-free-call delete-file] 3)
* call-process-region(1 6513 "qp-decode" "c:/Cygwin/tmp/ema03640" (#<buffer *vm-workbuf*<2>> "c:/DOCUME~1/login/LOCALS~1/Temp/vm30080565050") nil)
* apply(call-process-region 1 6513 "qp-decode" "c:/Cygwin/tmp/ema03640" (#<buffer *vm-workbuf*<2>> "c:/DOCUME~1/login/LOCALS~1/Temp/vm30080565050") nil nil)
* #[(start end output-buffer command &rest arg-list).... 10](1 6513 #<buffer *vm-workbuf*<2>> "qp-decode")
* apply(#[(start end output-buffer command &rest arg-list)... 10] 1 6513 #<buffer *vm-workbuf*<2>> "qp-decode" nil)
* vm-run-command-on-region(1 6513 #<buffer *vm-workbuf*<2>> "qp-decode")
  apply(vm-run-command-on-region 1 6513 #<buffer *vm-workbuf*<2>> "qp-decode" nil)
  vm-mime-qp-decode-region(1 6513)
  vm-mime-transfer-decode-region([("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil] 1 6513)
  byte-code(... 6)
  vm-mime-send-body-to-file([("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil] nil "c:/DOCUME~1/login/LOCALS~1/Temp/vm29919577330.html" t)
  vm-mime-display-external-generic([("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil])
  vm-decode-mime-layout([("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil])
  vm-mime-display-internal-show-multipart/alternative([("multipart/alternative" "boundary=-857615871-1604707733-1385072466=:64608") ("multipart/alternative" "boundary=\"-857615871-1604707733-1385072466=:64608\"") "7bit" nil nil nil nil #<marker at 2672773 in gmail> #<marker at 2679334 in gmail> #<marker at 2679335 in gmail> #<marker at 2689810 in gmail> ([("text/plain" "charset=ISO-8859-1") ("text/plain" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2679377 in gmail> #<marker at 2679466 in gmail> #<marker at 2679467 in gmail> #<marker at 2683120 in gmail> nil <<c>> <<m>> nil nil nil] [("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil]) <<c>> <<m>> nil nil nil])
  vm-mime-display-internal-multipart/alternative([("multipart/alternative" "boundary=-857615871-1604707733-1385072466=:64608") ("multipart/alternative" "boundary=\"-857615871-1604707733-1385072466=:64608\"") "7bit" nil nil nil nil #<marker at 2672773 in gmail> #<marker at 2679334 in gmail> #<marker at 2679335 in gmail> #<marker at 2689810 in gmail> ([("text/plain" "charset=ISO-8859-1") ("text/plain" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2679377 in gmail> #<marker at 2679466 in gmail> #<marker at 2679467 in gmail> #<marker at 2683120 in gmail> nil <<c>> <<m>> nil nil nil] [("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil]) <<c>> <<m>> nil nil nil])
  vm-mime-display-internal([("multipart/alternative" "boundary=-857615871-1604707733-1385072466=:64608") ("multipart/alternative" "boundary=\"-857615871-1604707733-1385072466=:64608\"") "7bit" nil nil nil nil #<marker at 2672773 in gmail> #<marker at 2679334 in gmail> #<marker at 2679335 in gmail> #<marker at 2689810 in gmail> ([("text/plain" "charset=ISO-8859-1") ("text/plain" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2679377 in gmail> #<marker at 2679466 in gmail> #<marker at 2679467 in gmail> #<marker at 2683120 in gmail> nil <<c>> <<m>> nil nil nil] [("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil]) <<c>> <<m>> nil nil nil] "multipart/alternative" "multipart")
  vm-decode-mime-layout([("multipart/alternative" "boundary=-857615871-1604707733-1385072466=:64608") ("multipart/alternative" "boundary=\"-857615871-1604707733-1385072466=:64608\"") "7bit" nil nil nil nil #<marker at 2672773 in gmail> #<marker at 2679334 in gmail> #<marker at 2679335 in gmail> #<marker at 2689810 in gmail> ([("text/plain" "charset=ISO-8859-1") ("text/plain" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2679377 in gmail> #<marker at 2679466 in gmail> #<marker at 2679467 in gmail> #<marker at 2683120 in gmail> nil <<c>> <<m>> nil nil nil] [("text/html" "charset=ISO-8859-1") ("text/html" "charset=ISO-8859-1") "quoted-printable" nil nil nil nil #<marker at 2683163 in gmail> #<marker at 2683251 in gmail> #<marker at 2683252 in gmail> #<marker at 2689764 in gmail> nil <<c>> <<m>> "Inline text/html by emacs-w3m display failed: Setting current directory: no such file or directory, y:/" nil nil]) <<c>> <<m>> nil nil nil])
  ad-Orig-vm-decode-mime-message(nil)
  vm-decode-mime-message()
  call-interactively(vm-decode-mime-message nil nil)

Related branches

Uday Reddy (reddyuday)
description: updated
Uday Reddy (reddyuday)
tags: added: virtual
removed: emacsen
Revision history for this message
Uday Reddy (reddyuday) wrote :

Revision 1497 adds a new variable `vm-virtual-default-directory' which can be set to something so that the default-directories of virtual folders remain sensible.

description: updated
information type: Private → Public
Changed in vm:
status: Triaged → Fix Committed
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.2a → 8.2.1a
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.1a → 8.2.90a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.