From: martin rudalics <rudalics@gmx.at>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Info-insert-dir
Date: Thu, 22 Mar 2007 08:19:53 +0100 [thread overview]
Message-ID: <46022E19.803@gmx.at> (raw)
In-Reply-To: <E1HUFQf-0006bt-Rq@fencepost.gnu.org>
> complete.el does not seem to use call-process,
> at least not that I can see.
`PC-expand-many-files' has this
(with-current-buffer (generate-new-buffer " *Glob Output*")
(erase-buffer)
(when (and (file-name-absolute-p name)
(not (file-directory-p default-directory)))
;; If the current working directory doesn't exist `shell-command'
;; signals an error. So if the file names we're looking for don't
;; depend on the working directory, switch to a valid directory first.
(setq default-directory "/"))
(shell-command (concat "echo " name) t)
which should be OK (`with-temp-buffer' would be probably simpler).
> man.el has handled it in a different way, but it is ot clear that it
> has handled the job completely. Would you like to check?
- The first two calls are OK:
(defun Man-init-defvars ()
...
(let ((default-directory "/"))
...
((eq 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script))
...
((eq 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script))
...
- The next is handled by `with-temp-buffer':
(defun Man-support-local-filenames ()
...
(with-temp-buffer
(and (equal (condition-case nil
(call-process manual-program nil t nil "--help")
(error nil))
...
- The final ones should be OK too:
(defun Man-getpage-in-background (topic)
...
(let ((process-environment (copy-sequence process-environment))
...
;; Avoid possible error by using a directory that always exists.
(default-directory
(if (and (file-directory-p default-directory)
(not (find-file-name-handler default-directory
'file-directory-p)))
default-directory
"/")))
...
(start-process manual-program buffer
...
(call-process shell-file-name nil (list buffer nil) nil
...
next prev parent reply other threads:[~2007-03-22 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 19:44 Info-insert-dir martin rudalics
[not found] ` <E1HSuLw-0005So-CU@fencepost.gnu.org>
[not found] ` <45FD35C4.7060207@gmx.at>
2007-03-19 5:15 ` Info-insert-dir Richard Stallman
2007-03-19 9:50 ` Info-insert-dir martin rudalics
2007-03-19 21:57 ` Info-insert-dir Richard Stallman
2007-03-20 9:56 ` Info-insert-dir martin rudalics
2007-03-21 0:42 ` Info-insert-dir Richard Stallman
2007-03-21 0:42 ` Info-insert-dir Richard Stallman
2007-03-21 7:38 ` Info-insert-dir martin rudalics
2007-03-22 5:01 ` Info-insert-dir Richard Stallman
2007-03-22 7:19 ` martin rudalics [this message]
2007-03-22 22:50 ` Info-insert-dir Richard Stallman
2007-03-23 9:01 ` Info-insert-dir martin rudalics
2007-03-23 18:00 ` Info-insert-dir Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46022E19.803@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.