all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12423: 24.2; call-process doesn't take a default-directory into account
@ 2012-09-12 15:37 Dmitry Neverov
  2012-09-12 16:07 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Neverov @ 2012-09-12 15:37 UTC (permalink / raw)
  To: 12423

Hi!

It seems like call-process doesn't take default-directory into account
although documentation says it should. The following always lists files
in the root, not in the /home:

(let ((default-directory "/home"))
  (call-process "ls" nil t t))

In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-03 on unit-424
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Message

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  mml-mode: t
  shell-dirtrack-mode: t
  jabber-activity-mode: t
  openwith-mode: t
  diff-auto-refine-mode: t
  recentf-mode: t
  display-time-mode: t
  global-hl-line-mode: t
  show-paren-mode: t
  cua-mode: t
  savehist-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
SPC i n SPC t h e SPC r o o t , SPC n o t SPC i t n
C-h C-h n SPC t h e SPC h o m e M-b / C-e : C-n C-n
C-n C-e <return> C-SPC M-> C-w C-l M-< M-f C-f C-f
d m i t r y . n e v e r o v @ g m a i l . c o m C-k
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n <return> C-c C-c y s m p t
<return> C-M-h m a i l SPC c l i e n t <return> C-x
C-o C-x o C-x b <return> C-x o C-x b m a i l C-s <return>
C-c C-c y y C-x b <return> C-x b m a i l C-s <return>
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-e M-b M-b M-b M-b
a SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-c C-g C-u C-c C-c y y C-n C-n C-n C-n
C-n C-p C-x k <return> C-x b <return> C-x b m a i l
<return> C-x b m a i l <return> C-n M-b C-SPC C-e M-w
C-w C-/ C-SPC C-a C-f C-g C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-SPC M-< M-w C-x RET M-p <return>
C-g C-n C-n M-f M-f C-f C-f C-f C-f C-SPC C-e M-w C-x
o RET C-x o C-x RET M-p <return>

Recent messages:
Already sent message via mail; resend? (y or n)  y
Sending via mail...
Sending...done
Mark set
Undo!
Mark set
byte-code: End of buffer [10 times]
Mark set
Quit
Mark set

Load-path shadows:
~/.emacs.d/vendor/emms/lisp/tq hides
/usr/local/share/emacs/24.2/lisp/emacs-lisp/tq

Features:
(mailalias mailclient cus-edit shadow sort mail-extr emacsbug sendmail
rcirc erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button erc-fill erc-stamp erc-netsplit org-table
erc-goodies erc erc-backend erc-compat whitespace cus-start cus-load
cl-specs edebug apropos info wdired disp-table woman man cua-rect rect
etags nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok pp
message rfc822 mml mml-sec mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils timezone parse-time network-stream
url-cache url-http mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw
url-auth url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-handlers tramp-sh find-dired arc-mode archive-mode
sh-script executable vc-hg vc-git conf-mode newcomment quail browse-url
goto-addr misearch multi-isearch dired-aux tramp-cache tramp
tramp-compat shell tramp-loaddefs jabber-keepalive jabber-ping
jabber-bookmarks jabber-private help-mode view debug org-wl org-w3m
org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html
org-exp ob-exp org-exp-blocks find-func org-agenda org-info org-gnus
org-docview org-bibtex bibtex org-bbdb org warnings ob-emacs-lisp
ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys
ob ob-eval org-pcomplete pcomplete org-list org-faces org-compat
org-entities org-macs noutline outline cal-menu calendar cal-loaddefs
vc-dispatcher vc-svn cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs jka-compr nroff-mode
nd-tc-log-settings tc-log nd-hsql-settings hsql sql thingatpt
nd-teamcity-settings teamcity nd-thread-dump-settings thread-dump
nd-youtrack-settings nd-jabber-settings jabber jabber-libnotify dbus
jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival
jabber-sawfish jabber-ratpoison jabber-screen jabber-socks5
jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common
jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate
jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates
jabber-events jabber-vcard jabber-avatar mailcap jabber-activity
jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc
jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp
jabber-browse jabber-search jabber-register jabber-roster format-spec
jabber-presence jabber-muc jabber-muc-nick-coloring hexrgb
jabber-newdisco jabber-widget jabber-disco jabber-chat jabber-history
jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-console
sgml-mode jabber-keymap jabber-sasl sasl sasl-anonymous sasl-login
sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls jabber-xml
xml jabber-menu jabber-autoloads jabber-util jb nd-browse-settings
nd-haskell-settings nd-openwith-settings openwith nd-emms-settings
url-util url-parse auth-source eieio byte-opt bytecomp byte-compile
cconv macroexp assoc gnus-util password-cache url-vars mm-util
mail-prsvr emms-volume emms-volume-amixer emms-cache emms-info-ogginfo
emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-vlc
emms-player-mplayer emms-player-simple emms-source-playlist
emms-source-file locate emms-setup emms emms-compat nd-hg-settings ahg
generic dired grep compile comint regexp-opt ansi-color cl ewoc
nd-git-settings magit-bisect magit-key-mode magit diff-mode log-edit
easy-mmode ring pcvs-util add-log nd-startup-settings nd-server-settings
server nd-gpg-settings epa-file epa derived epg epg-config
nd-nxml-settings nd-environment-settings cyril-util nd-woman-settings
nd-dired-settings nd-shell-settings nd-ido-settings recentf tree-widget
wid-edit easymenu ido nd-decorations time hl-line paren nd-global-keys
cua-base edmacro kmacro nd-common-settings uniquify savehist desktop
advice help-fns advice-preload avoid delsel time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#12423: 24.2; call-process doesn't take a default-directory into account
  2012-09-12 15:37 bug#12423: 24.2; call-process doesn't take a default-directory into account Dmitry Neverov
@ 2012-09-12 16:07 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2012-09-12 16:07 UTC (permalink / raw)
  To: Dmitry Neverov; +Cc: 12423

Dmitry Neverov wrote:

> It seems like call-process doesn't take default-directory into account
> although documentation says it should. The following always lists files
> in the root, not in the /home:
>
> (let ((default-directory "/home"))
>   (call-process "ls" nil t t))

You've fallen afoul of this:

  C-h v default-directory -> "Should end with slash."

So:

 (let ((default-directory (file-name-as-directory "/home")))
   (call-process "ls" nil t t))





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-12 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 15:37 bug#12423: 24.2; call-process doesn't take a default-directory into account Dmitry Neverov
2012-09-12 16:07 ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.