From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#4399: 23.1; let a file know it was run with --script Date: Fri, 18 Sep 2009 23:19:09 -0400 Message-ID: References: Reply-To: Glenn Morris , 4399@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253330843 29422 80.91.229.12 (19 Sep 2009 03:27:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Sep 2009 03:27:23 +0000 (UTC) Cc: 4399@emacsbugs.donarmstrong.com To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 19 05:27:16 2009 Return-path: Envelope-to: geb-bug-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 1MoqbT-0006yk-P3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Sep 2009 05:27:16 +0200 Original-Received: from localhost ([127.0.0.1]:57511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoqbS-0006h4-TE for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Sep 2009 23:27:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoqbO-0006gz-QR for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2009 23:27:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoqbJ-0006gn-EE for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2009 23:27:09 -0400 Original-Received: from [199.232.76.173] (port=45905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoqbJ-0006gk-9B for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2009 23:27:05 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:51122) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MoqbI-0004NK-VA for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2009 23:27:05 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoqbI-0001hk-0S for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2009 23:27:04 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8J3R2SN000763; Fri, 18 Sep 2009 20:27:02 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8J3P5hA000427; Fri, 18 Sep 2009 20:25:05 -0700 Resent-Date: Fri, 18 Sep 2009 20:25:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Glenn Morris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 19 Sep 2009 03:25:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4399 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4399-submit@emacsbugs.donarmstrong.com id=B4399.125333035232059 (code B ref 4399); Sat, 19 Sep 2009 03:25:05 +0000 Original-Received: (at 4399) by emacsbugs.donarmstrong.com; 19 Sep 2009 03:19:12 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8J3JANC032055; Fri, 18 Sep 2009 20:19:11 -0700 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MoqTd-0002GL-K2; Fri, 18 Sep 2009 23:19:09 -0400 X-Spook: CDC csystems enigma fraud high security sniper Jiang X-Ran: jJ-PUY`j`\H|+j`[L4GyJEO"X=~i46sAwy9 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31277 Archived-At: reopen 4399 severity 4399 wishlist retitle 4399 simple way to identify top-level --script file stop Tom Tromey wrote: > I guess this will work as long as I don't mind hard-coding in the file's > name. Unless there's a way to also get this? On reflection, it seems a pretty poor solution, so I'll reopen this as a wishlist. Summary: When using --script, it would be nice if there was a simple way for the file so loaded to identify itself as the "main file", distinct from any libraries it might require. (I'd probably just use a hack like: #!/bin/sh exec emacs -batch -l test.el -f batch-run-test but I suppose this is against the spirit of --script)