mcgrath@paris.Berkeley.EDU (Roland McGrath) (03/20/89)
This replaces gnus-inews-organization in gnus.el to be a little better. If you didn't get my mods to add this in the first place, you also need to make gnus-inews-insert-headers use it by making the let set organization to (gnus-inews-organization). I also suggest that you define gnus-your-organization to nil so that this function will actually be used. (defun gnus-inews-organization () "Return the user's organization. If gnus-your-domain is defined, its value is used; if not, and the environment variable ORGANIZATION is defined, that is used. If one of these is defined, and the value begins with a slash, it is taken as the name of a file whose contents are read for the value. If neither of these is defined, and a file `.organization' or `.organization-DISTRIBUTION' exists in the directory containing gnus-startup-file, the contents of that file are used." (let ((value (or gnus-your-organization (getenv "ORGANIZATION"))) distribution) (or value (progn (setq value (expand-file-name (concat (file-name-directory gnus-startup-file) ".organization"))) (setq distribution (mail-fetch-field "Distribution")) (and distribution (file-exists-p (concat value "-" distribution)) (setq value (concat value "-" distribution))) (or (file-exists-p value) (setq value "/usr/lib/news/.organization")) )) (and value (and (eq (elt value 0) ?/) (setq value (expand-file-name value)) (if (file-exists-p value) (save-excursion (let ((buf (generate-new-buffer " *GNUS Organization*"))) (set-buffer buf) (insert-file-contents value) (setq value (buffer-string)) (and (eq (elt value (1- (length value))) ?\n) (setq value (substring value 0 (1- (length value))))) (kill-buffer buf) )) (setq value "") ))) value )) -- Roland McGrath Free Software Foundation, Inc. roland@wheaties.ai.mit.edu, mit-eddie!wheaties.ai.mit.edu!roland
umerin@photon.stars.flab.fujitsu.junet (Masanobu UMEDA) (03/22/89)
Date: 20 Mar 89 03:19:09 GMT From: flab!fgw!uunet!paris.Berkeley.EDU!mcgrath (Roland McGrath) Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) This replaces gnus-inews-organization in gnus.el to be a little better. (defun gnus-inews-organization () "Return the user's organization. If gnus-your-domain is defined, its value is used; if not, and the environment variable ORGANIZATION is defined, that is used. If one of these is defined, and the value begins with a slash, it is taken as the name of a file whose contents are read for the value. If neither of these is defined, and a file `.organization' or `.organization-DISTRIBUTION' exists in the directory containing gnus-startup-file, the contents of that file are used." ... ) Your changes will be included in the next version of GNUS as a part of user contributed software, named gnus-user-roland.el (do you prefer *-mcgraph.el?). Anyway, the following files are planned to be distributed as user contributed software: (1) gnus-user-detlefs.el Author: David.Detlefs@DLD.AVALON.CS.CMU.EDU Content: Newsgroup editing commands (2) gnus-user-hattori.el Author: hattori@kaba.junet Content: Newsgroup editing commands (3) gnus-user-roland.el Author: roland@wheaties.ai.mit.edu Content: gnus-inews-organization extention (4) gnus-user-tale.el Author: tale@pawl.rpi.edu Content: A different style of the mode line of Article Mode Masanobu UMEDA umerin@flab.Fujitsu.JUNET umerin%flab.Fujitsu.JUNET@uunet.uu.NET