From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: how to not change the working directory when opening a file Date: Tue, 15 Jan 2008 16:11:10 +0100 Message-ID: <87lk6razu9.fsf@thievol.homelinux.org> References: <87ve5vh5xy.fsf@ambire.localdomain> <38b2ab8a0801150129k2b9c8561md95a1c385f608044@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200409459 10402 80.91.229.12 (15 Jan 2008 15:04:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2008 15:04:19 +0000 (UTC) Cc: gnu-emacs-help@gnu.org, Thien-Thi Nguyen To: "Francis Moreau" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 16:04:40 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 1JEnLD-0004yC-OK for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2008 16:04:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEnKp-0002Sf-Bu for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2008 10:04:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEnKT-0002PQ-J8 for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 10:03:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEnKS-0002Ot-EF for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 10:03:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEnKS-0002Op-Bf for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 10:03:52 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEnKS-0005rA-1m for help-gnu-emacs@gnu.org; Tue, 15 Jan 2008 10:03:52 -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 1JEnKR-0001sp-Nu for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 10:03:51 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JEnKO-0005qm-MH for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 10:03:51 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.155]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEnKO-0005qa-DH for gnu-emacs-help@gnu.org; Tue, 15 Jan 2008 10:03:48 -0500 Original-Received: by fg-out-1718.google.com with SMTP id d23so3623775fga.30 for ; Tue, 15 Jan 2008 07:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=Nz+abLaTb5qtPDzG+HcRod9G6RkZCgPcwpFt0t2ME7M=; b=e5fXaEEtNRdNh8PO8AVjjXAIzzFMr8hOrfKbdCEK0X2QRTa8Vz2Q+vD9R8CZ3pybP3v1OJuZKEZ59yaA8wNxTruPojMDaYIzVKC42OcHi+SmogTWZFF2d2ZwelgY0NedK///dgMA5hw+VrUGGEP7yHAfoXk7alTIAzcCHkDmJ88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=OlNoPLuRz8FUZcjxRD6FFXS0/nr1b+yS9G76H/0SG/Zik1hmPC+06IiQWbGugNPOpplRCs2jdYcf5T3w5HnuftXreXKBKM2ivzv2xAT0in5n9jverRjjD+2QsEX4UGiyK62hXq1jfcoBrl7stjPODIeOYwPPVvoGPJ4zi4JtT3A= Original-Received: by 10.82.162.14 with SMTP id k14mr13249176bue.32.1200409426576; Tue, 15 Jan 2008 07:03:46 -0800 (PST) Original-Received: from thievol.homelinux.org ( [88.141.102.43]) by mx.google.com with ESMTPS id e9sm25420109muf.0.2008.01.15.07.03.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Jan 2008 07:03:45 -0800 (PST) In-Reply-To: <38b2ab8a0801150129k2b9c8561md95a1c385f608044@mail.gmail.com> (Francis Moreau's message of "Tue, 15 Jan 2008 10:29:41 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:50730 Archived-At: "Francis Moreau" writes: > Hello, > > On Jan 15, 2008 9:02 AM, Thien-Thi Nguyen wrote: >> () "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. >> > > Yes but once I need to really save /tmp/foo.txt after composing my > email, I need to specify /tmp/foo.txt. It's not convenient and foo.txt > is a temporary file so its name is rather complex to remember. > >> 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. > > I prefer using mutt as MUA. How do you use mutt ? if you set your env variable EDITOR to emacsclient (or a script launching emacsclient) you can edit your mail in an existing session of emacs (or open emacs if it's not already launched) and use all the features of emacs when editing mails. -- A + Thierry Pub key: http://pgp.mit.edu