From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chat Newsgroups: gmane.emacs.help Subject: Re: find the file name of the running function programatically Date: Thu, 28 Aug 2008 00:54:04 -0700 Organization: Noname Inc. Message-ID: References: <0a86f97f-2b15-4b07-8edd-688181d33d06@s9g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1219913242 29870 80.91.229.12 (28 Aug 2008 08:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2008 08:47:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 10:48:16 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 1KYdAt-0000xv-Hx for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2008 10:48:15 +0200 Original-Received: from localhost ([127.0.0.1]:36094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYd9v-0000wD-8m for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2008 04:47:15 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!flpi089.ffdc.sbc.com!prodigy.net!flpi088.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!nlpi065.nbdc.sbc.com.POSTED!1c384869!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Emacs Gnus Cancel-Lock: sha1:YxKhMvMbKeFEIxSfz6XccOuNERI= Original-Lines: 27 Original-NNTP-Posting-Host: 76.202.60.214 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: nlpi065.nbdc.sbc.com 1219910054 ST000 76.202.60.214 (Thu, 28 Aug 2008 03:54:14 EDT) Original-NNTP-Posting-Date: Thu, 28 Aug 2008 03:54:14 EDT X-UserInfo1: FKPO@MC@@S@UBRLYZBNNO_HJEHT@QDDMEPWXODMMHXMTWA]EPUW[AKK[J\]^HVKHG^EWZHBLO^[\NH_AZFWGN^\DHNVMX_DHHX[FSQKBOTS@@BP^]C@RHS_AGDDC[AJM_T[GZNRNZAY]GNCPBDYKOLK^_CZFWPGHZIXW@C[AFKBBQS@E@DAZ]VDFUNTQQ]FN Original-Xref: news.stanford.edu gnu.emacs.help:161705 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:57067 Xah writes: > how to find out the file name of the running function > programmatically? > > for example, i have: > > (defun command-frequency-write-file (file-name) > (with-temp-file file-name > (insert (command-frequency))) > (with-temp-message (format "Wrote %s" file-name))) > > i want to change this function so that it doesn't require any arg. > The file name will just be in the same dir but with a “.txt” suffix. > > Thanks. > > Xah > ∑ http://xahlee.org/ > > ☄ Doesn't look like there is a simple function that will work in all versions. However, given that not all libraries reside on writable file systens, doesn't it make sense to store it somewhere under HOME? Chat