all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* shell-command-to-string results in error
@ 2012-10-28 11:20 Rainer Stengele
  2012-10-28 14:46 ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Stengele @ 2012-10-28 11:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi!

Doing a simple

(shell-command-to-string "/bin/ls")

I receive this

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   call-process(nil nil t nil "-c" "/bin/ls")
   shell-command-to-string("/bin/ls")
   eval((shell-command-to-string "/bin/ls"))
   eval-last-sexp-1(nil)
   eval-last-sexp(nil)
   call-interactively(eval-last-sexp nil nil)

Doing the same as root I get a correct result without error.

I do run:

GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 
on murphy, modified by Debian

I cannot find the problem. I aöready changed my login shell from zsh to 
sh but without success.

Can anybody help me please?

Cheers, Rainer




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

* Re: shell-command-to-string results in error
  2012-10-28 11:20 shell-command-to-string results in error Rainer Stengele
@ 2012-10-28 14:46 ` Peter Dyballa
  2012-10-28 15:31   ` Rainer Stengele
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Dyballa @ 2012-10-28 14:46 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: help-gnu-emacs


Am 28.10.2012 um 12:20 schrieb Rainer Stengele:

> Doing the same as root I get a correct result without error.


Can you launch GNU Emacs from your home directory or /tmp with the -Q option and try in *scratch* buffer

	(getenv "SHELL")

and also

	(shell-command-to-string "env | grep SHELL")

The first command will show you which value is set in the environment in which you GNU Emacs instance is running. The second command will be executed in a sub-shell – and return the same value plus any other disturbances your shell is producing at start-up. The draw your conclusions!

If the second command fails the same way as in your post, then it's possible that GNU Emacs has loaded inappropriate ELisp files…

--
Mit friedvollen Grüßen

  Pete

Clovis' Consideration of an Atmospheric Anomaly:
        The perversity of nature is nowhere better demonstrated than by the fact that, when exposed to the same atmosphere, bread becomes hard while crackers become soft




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

* Re: shell-command-to-string results in error
  2012-10-28 14:46 ` Peter Dyballa
@ 2012-10-28 15:31   ` Rainer Stengele
  2012-10-28 16:24     ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Stengele @ 2012-10-28 15:31 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Am 28.10.2012 15:46, schrieb Peter Dyballa:
> (shell-command-to-string "env | grep SHELL")

Peter, the second one fails in my environment.
Starting with -Q gives me:

For information about GNU Emacs and the GNU system, type C-h C-a.
"/bin/zsh"
Mark set
"SHELL=/bin/zsh
SHELL_SESSION_ID=dc8b4aa071e140008b2d832a5c6b3048
"

How can i find the files making problems?
The error occurs directly at the beginning of my .emacs.

Thanks!

Rainer



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

* Re: shell-command-to-string results in error
  2012-10-28 15:31   ` Rainer Stengele
@ 2012-10-28 16:24     ` Peter Dyballa
  2012-10-28 18:17       ` Rainer Stengele
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Dyballa @ 2012-10-28 16:24 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: help-gnu-emacs


Am 28.10.2012 um 16:31 schrieb Rainer Stengele:

> How can i find the files making problems?

Check whether EMACSLOADPATH is set! What values have the GNU Emacs variables load-path and exec-path? Do files exist that shadow the proper ones? The later question can be answered by invoking "Send Bug Report…" from the Help menu. The function behind it checks whether such files exist and reports it towards the end of its output.

You can also check what this "emacs" command you invoke in some shell (or from some menu) actually is.

--
Mit friedvollen Grüßen

  Pete

Computers are good at following instructions, but not at reading your mind.
	- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9




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

* Re: shell-command-to-string results in error
  2012-10-28 16:24     ` Peter Dyballa
@ 2012-10-28 18:17       ` Rainer Stengele
  2012-10-28 18:47         ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Stengele @ 2012-10-28 18:17 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: help-gnu-emacs

Am 28.10.2012 17:24, schrieb Peter Dyballa:
>
> Am 28.10.2012 um 16:31 schrieb Rainer Stengele:
>
>> How can i find the files making problems?
>
> Check whether EMACSLOADPATH is set! What values have the GNU Emacs variables load-path and exec-path? Do files exist that shadow the proper ones? The later question can be answered by invoking "Send Bug Report…" from the Help menu. The function behind it checks whether such files exist and reports it towards the end of its output.
>
> You can also check what this "emacs" command you invoke in some shell (or from some menu) actually is.
>
> --
> Mit friedvollen Grüßen
>
>    Pete
>
> Computers are good at following instructions, but not at reading your mind.
> 	- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9
>
>
>
shadowing (see below) is no problem as far as I understand.

I cannot see a problem, I still for example have:


Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   call-process(nil nil nil nil "-c" "command -v x11idle")
   call-process-shell-command("command" nil nil nil "-v" "x11idle")
   (eq (call-process-shell-command "command" nil nil nil "-v" "x11idle") 0)
   (and (eq window-system (quote x)) (eq (call-process-shell-command 
"command" nil nil nil "-v" "x11idle") 0) (eq (call-process-shell-command 
"x11idle" nil nil nil) 0))
   (defvar org-x11idle-exists-p (and (eq window-system ...) (eq ... 0) 
(eq ... 0)))
   eval-buffer(#<buffer  *load*> nil 
"/home/rainer/.emacs.d/org/lisp/org-clock.el" nil t)  ; Reading at 
buffer position 37221
 
load-with-code-conversion("/home/rainer/.emacs.d/org/lisp/org-clock.el" 
"/home/rainer/.emacs.d/org/lisp/org-clock.el" nil t)
   require(org-clock)
   org-clock-persistence-insinuate()
   eval((org-clock-persistence-insinuate))
   eval-last-sexp-1(nil)
   eval-last-sexp(nil)
   call-interactively(eval-last-sexp nil nil)



exec-path is a variable defined in `C source code'.
Its value is
("/usr/local/bin" "/usr/bin" "/bin" "/usr/bin/X11" "/usr/games" 
"/usr/lib/emacs/23.4/i486-linux-gnu")




==================================================================================
In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10)
  of 2012-09-09 on murphy, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
configured using `configure  '--build' 'i486-linux-gnu' '--build' 
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var/lib' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' 
'--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' 
'--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall 
-DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

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: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: de_DE.utf8
   value of $XMODIFIERS: nil
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
   display-battery-mode: t
   minibuffer-depth-indicate-mode: t
   icicle-mode: t
   shell-dirtrack-mode: t
   show-paren-mode: t
   recentf-mode: t
   iswitchb-mode: t
   display-time-mode: t
   delete-selection-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t
   abbrev-mode: t

Recent input:
<C-f11> q <C-f12> <down> <down> <down> <return> <down>
<down> <down> C-e C-x C-e <down> C-x C-e q <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <up> <up> <up> <up> <up> <up> <up> <up> C-e
C-x C-e q <help-echo> <help-echo> <C-down-mouse-3>
<C-mouse-3> <C-down-mouse-3> <C-mouse-3> <down> <up>
<up> <up> <up> <up> C-x 1 <C-down-mouse-3> <help-menu>
<send-emacs-bug-report>

Recent messages:
Open /home/rainer/.breadcrumb
OVERVIEW
CONTENTS...done
history
Entering debugger...
Back to top level.
call-interactively: Beginning of buffer [8 times]
sama linux - hui!?
Entering debugger...
Back to top level.

Load-path shadows:
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides 
/usr/share/emacs/23.4/lisp/textmodes/flyspell
~/.emacs.d/remember/remember hides 
/usr/share/emacs/23.4/lisp/textmodes/remember
~/.emacs.d/css-mode hides /usr/share/emacs/23.4/lisp/textmodes/css-mode
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides 
/usr/share/emacs/23.4/lisp/textmodes/ispell
~/.emacs.d/ruby-mode hides /usr/share/emacs/23.4/lisp/progmodes/ruby-mode
~/.emacs.d/org/lisp/org-html hides /usr/share/emacs/23.4/lisp/org/org-html
~/.emacs.d/org/lisp/org-archive hides 
/usr/share/emacs/23.4/lisp/org/org-archive
~/.emacs.d/org/lisp/org-jsinfo hides 
/usr/share/emacs/23.4/lisp/org/org-jsinfo
~/.emacs.d/org/lisp/org-w3m hides /usr/share/emacs/23.4/lisp/org/org-w3m
~/.emacs.d/org/lisp/org-vm hides /usr/share/emacs/23.4/lisp/org/org-vm
~/.emacs.d/org/lisp/org-habit hides /usr/share/emacs/23.4/lisp/org/org-habit
~/.emacs.d/org/lisp/org-indent hides 
/usr/share/emacs/23.4/lisp/org/org-indent
~/.emacs.d/org/lisp/org hides /usr/share/emacs/23.4/lisp/org/org
~/.emacs.d/org/lisp/org-remember hides 
/usr/share/emacs/23.4/lisp/org/org-remember
~/.emacs.d/org/lisp/org-exp hides /usr/share/emacs/23.4/lisp/org/org-exp
~/.emacs.d/org/lisp/org-mobile hides 
/usr/share/emacs/23.4/lisp/org/org-mobile
~/.emacs.d/org/lisp/org-crypt hides /usr/share/emacs/23.4/lisp/org/org-crypt
~/.emacs.d/org/lisp/org-feed hides /usr/share/emacs/23.4/lisp/org/org-feed
~/.emacs.d/org/lisp/org-xoxo hides /usr/share/emacs/23.4/lisp/org/org-xoxo
~/.emacs.d/org/lisp/org-protocol hides 
/usr/share/emacs/23.4/lisp/org/org-protocol
~/.emacs.d/org/lisp/org-gnus hides /usr/share/emacs/23.4/lisp/org/org-gnus
~/.emacs.d/org/lisp/org-mhe hides /usr/share/emacs/23.4/lisp/org/org-mhe
~/.emacs.d/org/lisp/org-mouse hides /usr/share/emacs/23.4/lisp/org/org-mouse
~/.emacs.d/org/lisp/org-table hides /usr/share/emacs/23.4/lisp/org/org-table
~/.emacs.d/org/lisp/org-attach hides 
/usr/share/emacs/23.4/lisp/org/org-attach
~/.emacs.d/org/lisp/org-inlinetask hides 
/usr/share/emacs/23.4/lisp/org/org-inlinetask
~/.emacs.d/org/lisp/org-publish hides 
/usr/share/emacs/23.4/lisp/org/org-publish
~/.emacs.d/org/lisp/org-freemind hides 
/usr/share/emacs/23.4/lisp/org/org-freemind
~/.emacs.d/org/lisp/org-faces hides /usr/share/emacs/23.4/lisp/org/org-faces
~/.emacs.d/org/lisp/org-bibtex hides 
/usr/share/emacs/23.4/lisp/org/org-bibtex
~/.emacs.d/org/lisp/org-wl hides /usr/share/emacs/23.4/lisp/org/org-wl
~/.emacs.d/org/lisp/org-icalendar hides 
/usr/share/emacs/23.4/lisp/org/org-icalendar
~/.emacs.d/org/lisp/org-agenda hides 
/usr/share/emacs/23.4/lisp/org/org-agenda
~/.emacs.d/org/lisp/org-info hides /usr/share/emacs/23.4/lisp/org/org-info
~/.emacs.d/org/lisp/org-footnote hides 
/usr/share/emacs/23.4/lisp/org/org-footnote
~/.emacs.d/org/lisp/org-plot hides /usr/share/emacs/23.4/lisp/org/org-plot
~/.emacs.d/org/lisp/org-clock hides /usr/share/emacs/23.4/lisp/org/org-clock
~/.emacs.d/org/lisp/org-rmail hides /usr/share/emacs/23.4/lisp/org/org-rmail
~/.emacs.d/org/lisp/org-install hides 
/usr/share/emacs/23.4/lisp/org/org-install
~/.emacs.d/org/lisp/org-latex hides /usr/share/emacs/23.4/lisp/org/org-latex
~/.emacs.d/org/lisp/org-docbook hides 
/usr/share/emacs/23.4/lisp/org/org-docbook
~/.emacs.d/org/lisp/org-ascii hides /usr/share/emacs/23.4/lisp/org/org-ascii
~/.emacs.d/org/lisp/org-id hides /usr/share/emacs/23.4/lisp/org/org-id
~/.emacs.d/org/lisp/org-list hides /usr/share/emacs/23.4/lisp/org/org-list
~/.emacs.d/org/lisp/org-mac-message hides 
/usr/share/emacs/23.4/lisp/org/org-mac-message
~/.emacs.d/org/lisp/org-mew hides /usr/share/emacs/23.4/lisp/org/org-mew
~/.emacs.d/org/lisp/org-compat hides 
/usr/share/emacs/23.4/lisp/org/org-compat
~/.emacs.d/org/lisp/org-timer hides /usr/share/emacs/23.4/lisp/org/org-timer
~/.emacs.d/org/lisp/org-datetree hides 
/usr/share/emacs/23.4/lisp/org/org-datetree
~/.emacs.d/org/lisp/org-colview hides 
/usr/share/emacs/23.4/lisp/org/org-colview
~/.emacs.d/org/lisp/org-bbdb hides /usr/share/emacs/23.4/lisp/org/org-bbdb
~/.emacs.d/org/lisp/org-irc hides /usr/share/emacs/23.4/lisp/org/org-irc
~/.emacs.d/org/lisp/org-src hides /usr/share/emacs/23.4/lisp/org/org-src
~/.emacs.d/org/lisp/org-macs hides /usr/share/emacs/23.4/lisp/org/org-macs

Features:
(shadow sort mail-extr emacsbug debug battery maxframe key-chord
iy-go-to-char face-remap+ face-remap ido buff-menu+ zenburn color-theme
reporter bubble-buffer org-latex org-export-latex org-beamer footnote
server breadcrumb mb-depth two-column eldoc cal-china lunar solar
cal-dst cal-hebrew cal-julian holidays hol-loaddefs vc-dispatcher vc-svn
disp-table appt diary-lib diary-loaddefs icicles icicles-mode
icicles-cmd2 anything woman man assoc compile imenu icicles-cmd1
cus-edit yow etags cookie1 dabbrev icicles-mcmd image-dired help-fns+
info doremi ring+ filesets icicles-fn icicles-var icicles-opt ffap
icicles-face hexrgb icicles-mac icicles-install url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-util
url-parse url-vars boxquote rect bookmark+ bookmark+-key crosshairs
col-highlight vline hl-line+ hl-line bookmark+-1 thingatpt+ thingatpt
bookmark+-bmu help-mode view bookmark+-lit bookmark+-mac bookmark pp
dired+ dired-x ediff-merg ediff-diff ediff-wind ediff-mult ediff-help
ediff-init ediff-util dired-aux dired bs erin ascii-table dired-sort-map
dired-view browse-kill-ring hippie-exp ace-jump-mode htmlize fuzzy-match
ispell edmacro kmacro saveplace uniquify org2rem org-special-blocks
org-jsinfo org-infojs org-html org-exp ob-exp org-agenda org-id ob-dot
ob-sh shell paren recentf tree-widget iswitchb time desktop delsel
cua-base cus-start cus-load org-exp-blocks org byte-opt warnings
bytecomp byte-compile advice help-fns advice-preload derived ob-tangle
ob-ref ob-lob ob-table org-footnote org-src ob-keys org-pcomplete
pcomplete org-list org-faces org-entities noutline outline easy-mmode
org-version ob-emacs-lisp ob-comint comint ring ob org-compat org-macs
ob-eval org-loaddefs find-func cal-menu calendar cal-loaddefs gnus-sum
nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start
gnus-spec gnus-int gnus-range message sendmail regexp-opt ecomplete
rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode
mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev
gmm-utils mailheader canlock sha1 hex-util hashcash gnus-win gnus
gnus-ems nnheader gnus-util netrc time-date mail-utils mm-util
mail-prsvr wid-edit cl cl-19 tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag 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 loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)







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

* Re: shell-command-to-string results in error
  2012-10-28 18:17       ` Rainer Stengele
@ 2012-10-28 18:47         ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2012-10-28 18:47 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: help-gnu-emacs


Am 28.10.2012 um 19:17 schrieb Rainer Stengele:

> shadowing (see below) is no problem as far as I understand.

Over 50 hidings are no problem? This is a bit more than the famous DeuBa peanuts! Did you see that GNU Emacs cannot load one of these shadows ("/home/rainer/.emacs.d/org/lisp/org-clock.el")? It's probably best to use that emacs binary which also byte-compiled the Elisp files in your ~/.emacs.d branch during the make process.

And don't use the configure argument

	--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp

but first read the output of

	./configure --help

and compare the values (or settings) this output implies with what you do! And what you have! The --enable-locallisppath option takes only places outside the regular ones, which are those set during the configure process. You should not tell GNU Emacs to use whatever init files for which ever Emacs versions it can find on your system. (And there is only one site-start.el file it loads.) You might then also be able to leave out the many *dir settings for the configure script.


Putting this in your site init file will enable you to see in *Messages* buffer which files GNU Emacs loads:

	(defadvice load (before debug-log activate)
	  (message "(Tipp von Kai G) Lade jetzt: %s" (ad-get-arg 0)))

--
Mit friedvollen Grüßen

  Pete

Ich bin dafür, die Dinge so weit wie möglich zu vereinfachen.
Aber nicht weiter.
				(Albert Einstein)




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

end of thread, other threads:[~2012-10-28 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-28 11:20 shell-command-to-string results in error Rainer Stengele
2012-10-28 14:46 ` Peter Dyballa
2012-10-28 15:31   ` Rainer Stengele
2012-10-28 16:24     ` Peter Dyballa
2012-10-28 18:17       ` Rainer Stengele
2012-10-28 18:47         ` Peter Dyballa

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.