From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: stromme@mi.uib.no (Stein A. Stromme) Newsgroups: gmane.emacs.help Subject: Re: Setting Group Ownership Date: 10 Dec 2002 15:56:45 +0100 Organization: Univ. of Bergen, Dept. of Mathematics Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1039532782 13988 80.91.224.249 (10 Dec 2002 15:06:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2002 15:06:22 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Llxj-0003dL-00 for ; Tue, 10 Dec 2002 16:06:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Lls9-0005Aa-0B for gnu-help-gnu-emacs@m.gmane.org; Tue, 10 Dec 2002 10:00:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.net.uni-c.dk!uninett.no!uio.no!nntp.uib.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: eliud.mi.uib.no Original-X-Trace: toralf.uib.no 1039532205 52091 129.177.61.66 (10 Dec 2002 14:56:45 GMT) Original-X-Complaints-To: abuse@uib.no Original-NNTP-Posting-Date: 10 Dec 2002 14:56:45 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:107947 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4487 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4487 [carlc@snowbd.com] | When a file is saved I would like to set the file's group owner to an | environment variable. This is on a Linux box. I know that I can use | after-save-hook. I assume that I would have to call a shell command to do | this. I don't know how access an environment variable and call the chgrp | command from emacs. Any help would be appreciated. Look into getenv: getenv is an interactive compiled Lisp function in `env'. (getenv VARIABLE) Get the value of environment variable VARIABLE. VARIABLE should be a string. Value is nil if VARIABLE is undefined in the environment. Otherwise, value is a string. This function consults the variable `process-environment' for its value. There is also dired-do-chgrp which perhaps could be used (or suitably modified for your purpose). -- Stein Arild Strømme +47 55584825, +47 95801887 Universitetet i Bergen Fax: +47 55589672 Matematisk institutt www.mi.uib.no/~stromme Johs Brunsg 12, N-5008 BERGEN stromme@mi.uib.no