From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: how to not change the working directory when opening a file Date: Tue, 15 Jan 2008 09:02:49 +0100 Message-ID: <87ve5vh5xy.fsf@ambire.localdomain> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200386022 27248 80.91.229.12 (15 Jan 2008 08:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2008 08:33:42 +0000 (UTC) Cc: gnu-emacs-help@gnu.org To: francis.moro@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 09:34:05 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JEhFC-0005Q3-Rr for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2008 09:34:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEhEo-0003pb-5c for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2008 03:33:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEhEW-0003pW-Ru for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 03:33:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEhEU-0003pJ-BR for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 03:33:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEhEU-0003pG-4W for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 03:33:18 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEhEU-0003oH-0R for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 03:33:18 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JEhET-0006Za-Jm for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 03:33:17 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JEhEQ-0003nv-M4 for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 03:33:17 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JEhEQ-0003kh-CM for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 03:33:14 -0500 Original-Received: from ppp-7-35.21-151.libero.it ([151.21.35.7] helo=ambire.localdomain) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEhDw-00081s-U8 for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 03:32:45 -0500 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1JEgkz-0001pz-Vj; Tue, 15 Jan 2008 09:02:50 +0100 In-Reply-To: (Francis Moreau's message of "Mon, 14 Jan 2008 16:15:54 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by mx20.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 1665 seconds by postgrey-1.27 at nadesico; Tue, 15 Jan 2008 03:32:15 EST X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50724 Archived-At: () "Francis Moreau" () Mon, 14 Jan 2008 16:15:54 +0100 This is useful when composing an email. I sometime need to include the output of a shell command but this shell command must be executed in the directory where emacs was launched. you can try something like: emacs --insert /tmp/foo.txt -f text-mode alternatively, you can try: emacs -f compose-mail and then `C-x i /tmp/foo.txt RET' at a later point. probably best if you invert your flow to live in emacs, in which case you can use `C-u M-! SHELL-COMMAND RET' as needed. thi