Gnus development mailing list
 help / color / mirror / Atom feed
* run agent in -batch mode reading a batch rc file instead of .gnus
@ 2002-09-10  8:11 Harry Putnam
  2002-09-10  8:58 ` Reiner Steib
  2002-09-10  9:53 ` Kai Großjohann
  0 siblings, 2 replies; 11+ messages in thread
From: Harry Putnam @ 2002-09-10  8:11 UTC (permalink / raw)


The following message is a courtesy copy of an article
that has been posted to gnu.emacs.gnus as well.

How can I run gnus in batch mode and force it to read some other rc
file instead of gnus.

I want a different setup for this batch run.
I know that if a file named ~/.gnus.el is present it will be read in
preference to .gnus, which comes pretty close, but then the file needs
deleting when batch is completed.

Seems like a sloppy way to do it, there could be moments when the
batch is running as webll as a live gnus.

Maybe a conditional at the start of .gnus that knows if its a batch
session reading .gnus.  If batch is found then a redirect to some
other file... Is that possible?

The easiest would be if I could tell gnus not to read ~/.gnus,
then I could just load what ever I wanted.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10  8:11 run agent in -batch mode reading a batch rc file instead of .gnus Harry Putnam
@ 2002-09-10  8:58 ` Reiner Steib
  2002-09-10 17:20   ` Harry Putnam
  2002-09-10  9:53 ` Kai Großjohann
  1 sibling, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2002-09-10  8:58 UTC (permalink / raw)


On Tue, Sep 10 2002, Harry Putnam wrote:

> The following message is a courtesy copy of an article
> that has been posted to gnu.emacs.gnus as well.

I couldn't find the article in g.e.g. on my server. I don't think it's
a good idea to do this, because the answers will be split between
g.e.g and the ding list.

> How can I run gnus in batch mode and force it to read some other rc
> file instead of gnus.

,----[ C-h v gnus-init-file RET ]
| gnus-init-file's value is "~/.gnus"
| 
| Documentation:
| Your Gnus Emacs-Lisp startup file name.
| If a file with the `.el' or `.elc' suffixes exists, it will be read instead.
`----

So I would try to use something similar to ...

$ emacs [...] -eval "(setq gnus-init-file \"foo.el\")" [-f gnus] [...]

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10  8:11 run agent in -batch mode reading a batch rc file instead of .gnus Harry Putnam
  2002-09-10  8:58 ` Reiner Steib
@ 2002-09-10  9:53 ` Kai Großjohann
  2002-09-10 17:17   ` Harry Putnam
  2002-12-29 17:46   ` Lars Magne Ingebrigtsen
  1 sibling, 2 replies; 11+ messages in thread
From: Kai Großjohann @ 2002-09-10  9:53 UTC (permalink / raw)
  Cc: ding

Harry Putnam <reader@newsguy.com> writes:

> The easiest would be if I could tell gnus not to read ~/.gnus,
> then I could just load what ever I wanted.

Maybe "emacs -q" should abstain from reading ~/.gnus, as it abstains
from reading ~/.emacs.

If this doesn't happen, then maybe it's a bug?  What do people think?

("emacs -batch" implies the "-q" option.)

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10  9:53 ` Kai Großjohann
@ 2002-09-10 17:17   ` Harry Putnam
  2002-12-29 17:46   ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 11+ messages in thread
From: Harry Putnam @ 2002-09-10 17:17 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 641 bytes --]

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>> The easiest would be if I could tell gnus not to read ~/.gnus,
>> then I could just load what ever I wanted.
>
> Maybe "emacs -q" should abstain from reading ~/.gnus, as it abstains
> from reading ~/.emacs.
>
> If this doesn't happen, then maybe it's a bug?  What do people think?
>
> ("emacs -batch" implies the "-q" option.)
>
Even when running gnus-agent-batch ~/.gnus is loaded
$ emacs -batch -no-site-file -f gnus-agent-batch 
hello world -- ~/.gnus

So maybe that is a bug.

Reiners solution fixed me up for what I wanted.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10  8:58 ` Reiner Steib
@ 2002-09-10 17:20   ` Harry Putnam
  2002-09-11 10:01     ` Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Harry Putnam @ 2002-09-10 17:20 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> On Tue, Sep 10 2002, Harry Putnam wrote:
>
>> The following message is a courtesy copy of an article
>> that has been posted to gnu.emacs.gnus as well.
>
> I couldn't find the article in g.e.g. on my server. I don't think it's
> a good idea to do this, because the answers will be split between
> g.e.g and the ding list.

Not sure I see why that is a bad thing.

>> How can I run gnus in batch mode and force it to read some other rc
>> file instead of gnus.
>
> ,----[ C-h v gnus-init-file RET ]
> | gnus-init-file's value is "~/.gnus"
> | 
> | Documentation:
> | Your Gnus Emacs-Lisp startup file name.
> | If a file with the `.el' or `.elc' suffixes exists, it will be read instead.
> `----
>
> So I would try to use something similar to ...
>
> $ emacs [...] -eval "(setq gnus-init-file \"foo.el\")" [-f gnus] [...]

Thanks, that fixed me up.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10 17:20   ` Harry Putnam
@ 2002-09-11 10:01     ` Reiner Steib
  2002-09-15  1:43       ` Harry Putnam
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2002-09-11 10:01 UTC (permalink / raw)


On Tue, Sep 10 2002, Harry Putnam wrote:

> Reiner Steib <4uce.02.r.steib@gmx.net> writes:
>
>> On Tue, Sep 10 2002, Harry Putnam wrote:
>>
>>> The following message is a courtesy copy of an article
>>> that has been posted to gnu.emacs.gnus as well.
>>
>> I couldn't find the article in g.e.g. on my server. I don't think it's
>> a good idea to do this, because the answers will be split between
>> g.e.g and the ding list.
>
> Not sure I see why that is a bad thing.

,----[ in gnu.emacs.gnus ]
| John Paul Wallington <jpw@shootybangbang.com> writes:
| 
| > Harry Putnam <reader@newsguy.com> wrote:
| >
| >> How can I run gnus in batch mode and force it to read some other rc
| >> file instead of gnus.
| >
| > Have you tried changing the value of `gnus-init-file'?  (untested)
| 
| I hadn't tried that no, but it turned out to be the right tool.
| A solution was posted on the ding list from Reiner Steib:
| [...]
`----

Is it more clear now? John probably doesn't read ding, so he couldn't
see that the problem is already solved and he possibly wasted some
time needlessly. This is annoying. Crossposting between ding and g.e.g
isn't really possible (unlike e.g. between g.e.gnus and g.e.help). I'd
recommend to ask in g.e.g unless the question is specific to Oort.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-11 10:01     ` Reiner Steib
@ 2002-09-15  1:43       ` Harry Putnam
  2002-09-15  3:09         ` John Paul Wallington
  0 siblings, 1 reply; 11+ messages in thread
From: Harry Putnam @ 2002-09-15  1:43 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> ,----[ in gnu.emacs.gnus ]
> | John Paul Wallington <jpw@shootybangbang.com> writes:
> | 
> | > Harry Putnam <reader@newsguy.com> wrote:
> | >
> | >> How can I run gnus in batch mode and force it to read some other rc
> | >> file instead of gnus.
> | >
> | > Have you tried changing the value of `gnus-init-file'?  (untested)
> | 
> | I hadn't tried that no, but it turned out to be the right tool.
> | A solution was posted on the ding list from Reiner Steib:
> | [...]
> `----
>
> Is it more clear now? John probably doesn't read ding, so he couldn't
> see that the problem is already solved and he possibly wasted some
> time needlessly. This is annoying. Crossposting between ding and g.e.g
> isn't really possible (unlike e.g. between g.e.gnus and g.e.help). I'd
> recommend to ask in g.e.g unless the question is specific to Oort.

The fact that John (or others) doesn't read ding is exactly why I
posted to both.  That is the only time it makes sense to do so.  If
everyone read the same lists, it would never be smart.

I'd be very surprised if John were put out.  It was not a big time
sink for me to provide your posted solution from ding.  Its not been
posted to two forums where as by your reasoning only one would have
it.

That seems less beneficial to all, not more of pita for anyone.

I still don't see this as a problem, but as beneficial... sorry.
Anyway, thank for the answer.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-15  1:43       ` Harry Putnam
@ 2002-09-15  3:09         ` John Paul Wallington
  2002-09-15  3:35           ` Harry Putnam
  0 siblings, 1 reply; 11+ messages in thread
From: John Paul Wallington @ 2002-09-15  3:09 UTC (permalink / raw)


Harry Putnam <reader@newsguy.com> wrote:

> I'd be very surprised if John were put out.  It was not a big time
> sink for me to provide your posted solution from ding.  Its not been
> posted to two forums where as by your reasoning only one would have
> it.

I wasn't put out.  Of course, had I seen Reiner's post I wouldn't have
toiled for hours carefully crafting my answer ;-)

But I think Reiner is right that posting to both g.e.g and ding isn't
really possible, and also that it wasn't really suitable in this
particular case.  I think it is better to ask general Gnus questions
on g.e.g.

-- 
John Paul Wallington





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-15  3:09         ` John Paul Wallington
@ 2002-09-15  3:35           ` Harry Putnam
  0 siblings, 0 replies; 11+ messages in thread
From: Harry Putnam @ 2002-09-15  3:35 UTC (permalink / raw)


John Paul Wallington <jpw@shootybangbang.com> writes:

> Harry Putnam <reader@newsguy.com> wrote:
>
>> I'd be very surprised if John were put out.  It was not a big time
>> sink for me to provide your posted solution from ding.  Its not been
>> posted to two forums where as by your reasoning only one would have
>> it.
>
> I wasn't put out.  Of course, had I seen Reiner's post I wouldn't have
> toiled for hours carefully crafting my answer ;-)

He he....probably missed the first 2 days of a week vacation editing
and rewriting eh?

> But I think Reiner is right that posting to both g.e.g and ding isn't
> really possible, and also that it wasn't really suitable in this
> particular case.  I think it is better to ask general Gnus questions
> on g.e.g.

Not always so easy to know what is general.  I haven't run released
versions for years.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-09-10  9:53 ` Kai Großjohann
  2002-09-10 17:17   ` Harry Putnam
@ 2002-12-29 17:46   ` Lars Magne Ingebrigtsen
  2002-12-29 18:31     ` Kai Großjohann
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-12-29 17:46 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Maybe "emacs -q" should abstain from reading ~/.gnus, as it abstains
> from reading ~/.emacs.

(defun gnus-read-init-file (&optional inhibit-next)
  ;; Don't load .gnus if the -q option was used.
  (when init-file-user
    ...))

So does this mean that `init-file-user' is non-nil when Emacs is
started with -q these days?
    
-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: run agent in -batch mode reading a batch rc file instead of .gnus
  2002-12-29 17:46   ` Lars Magne Ingebrigtsen
@ 2002-12-29 18:31     ` Kai Großjohann
  0 siblings, 0 replies; 11+ messages in thread
From: Kai Großjohann @ 2002-12-29 18:31 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> So does this mean that `init-file-user' is non-nil when Emacs is
> started with -q these days?

Oops.  A quick test on the CVS Emacs shows that init-file-user is
indeed nil in that case.
-- 
Ambibibentists unite!



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-12-29 18:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-10  8:11 run agent in -batch mode reading a batch rc file instead of .gnus Harry Putnam
2002-09-10  8:58 ` Reiner Steib
2002-09-10 17:20   ` Harry Putnam
2002-09-11 10:01     ` Reiner Steib
2002-09-15  1:43       ` Harry Putnam
2002-09-15  3:09         ` John Paul Wallington
2002-09-15  3:35           ` Harry Putnam
2002-09-10  9:53 ` Kai Großjohann
2002-09-10 17:17   ` Harry Putnam
2002-12-29 17:46   ` Lars Magne Ingebrigtsen
2002-12-29 18:31     ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).