unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12791: 24.2; An option to load user init file with -batch
@ 2012-11-03  7:54 Leo
  2012-11-03 10:02 ` Eli Zaretskii
  2012-11-04 17:17 ` Juanma Barranquero
  0 siblings, 2 replies; 7+ messages in thread
From: Leo @ 2012-11-03  7:54 UTC (permalink / raw)
  To: 12791

-batch implies -q and I cannot find an option to negate it. For example,
I want to add some tests to my emacs init files and be able to run
`ert-run-tests-batch' in batch mode.

Any objection if I add an option such as '--load-init-file'?

Leo





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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03  7:54 bug#12791: 24.2; An option to load user init file with -batch Leo
@ 2012-11-03 10:02 ` Eli Zaretskii
  2012-11-03 14:41   ` Leo
  2012-11-04 17:17 ` Juanma Barranquero
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2012-11-03 10:02 UTC (permalink / raw)
  To: Leo; +Cc: 12791

> From: Leo <sdl.web@gmail.com>
> Date: Sat, 03 Nov 2012 15:54:44 +0800
> 
> -batch implies -q and I cannot find an option to negate it. For example,
> I want to add some tests to my emacs init files and be able to run
> `ert-run-tests-batch' in batch mode.
> 
> Any objection if I add an option such as '--load-init-file'?

What's wrong with "-l ~/.emacs"?  The difference in the loading order
is a non-issue in batch mode anyway.





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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03 10:02 ` Eli Zaretskii
@ 2012-11-03 14:41   ` Leo
  2012-11-03 15:32     ` Eli Zaretskii
  2021-12-04  4:49     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Leo @ 2012-11-03 14:41 UTC (permalink / raw)
  To: 12791

On 2012-11-03 18:02 +0800, Eli Zaretskii wrote:
> What's wrong with "-l ~/.emacs"?  The difference in the loading order
> is a non-issue in batch mode anyway.

not portable.

Leo






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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03 14:41   ` Leo
@ 2012-11-03 15:32     ` Eli Zaretskii
  2012-11-03 19:01       ` Glenn Morris
  2021-12-04  4:49     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2012-11-03 15:32 UTC (permalink / raw)
  To: Leo; +Cc: 12791

> From: Leo <sdl.web@gmail.com>
> Date: Sat, 03 Nov 2012 22:41:41 +0800
> 
> On 2012-11-03 18:02 +0800, Eli Zaretskii wrote:
> > What's wrong with "-l ~/.emacs"?  The difference in the loading order
> > is a non-issue in batch mode anyway.
> 
> not portable.

Sorry, I don't understand.  Please elaborate: when does it not work
and why?





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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03 15:32     ` Eli Zaretskii
@ 2012-11-03 19:01       ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2012-11-03 19:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 12791, Leo

Eli Zaretskii wrote:

>> > What's wrong with "-l ~/.emacs"? The difference in the loading
>> > order is a non-issue in batch mode anyway.
>> 
>> not portable.
>
> Sorry, I don't understand.  Please elaborate: when does it not work
> and why?

One possibility: maybe the init file is actually ~/.emacs.el, or
~/.emacs.d/init.el, etc. So the caller would have to do (a small amount
of) actual work to locate it, rather than just letting Emacs handle it
transparently as normal.

(It sure would waste less time if reports were less vague, particularly
when asking for new features to be implemented.)





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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03  7:54 bug#12791: 24.2; An option to load user init file with -batch Leo
  2012-11-03 10:02 ` Eli Zaretskii
@ 2012-11-04 17:17 ` Juanma Barranquero
  1 sibling, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2012-11-04 17:17 UTC (permalink / raw)
  To: Leo; +Cc: 12791

On Sat, Nov 3, 2012 at 8:54 AM, Leo <sdl.web@gmail.com> wrote:

> -batch implies -q and I cannot find an option to negate it. For example,
> I want to add some tests to my emacs init files and be able to run
> `ert-run-tests-batch' in batch mode.

Another small difference between runing an interactive emacs and doing
"emacs -batch" and loading your .emacs is that under "emacs -batch" it
is possible that the directory pointed out by user-emacs-directory
does not exist, and locate-user-emacs-file quite deliberately takes
steps not to create it (because otherwise you'll end with .emacs.d/
directories at unexpected places, while bootstrapping,etc.)

    Juanma





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

* bug#12791: 24.2; An option to load user init file with -batch
  2012-11-03 14:41   ` Leo
  2012-11-03 15:32     ` Eli Zaretskii
@ 2021-12-04  4:49     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-04  4:49 UTC (permalink / raw)
  To: Leo; +Cc: 12791

Leo <sdl.web@gmail.com> writes:

> On 2012-11-03 18:02 +0800, Eli Zaretskii wrote:
>> What's wrong with "-l ~/.emacs"?  The difference in the loading order
>> is a non-issue in batch mode anyway.
>
> not portable.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I think people know where their ~/.emacs files are, so "-Q -l ~/.emacs"
covers virtually all use cases.  I don't think adding a --load-init-file
option would be sufficiently useful as a feature (and it's ambiguous
what init file we're referring to), so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-12-04  4:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-03  7:54 bug#12791: 24.2; An option to load user init file with -batch Leo
2012-11-03 10:02 ` Eli Zaretskii
2012-11-03 14:41   ` Leo
2012-11-03 15:32     ` Eli Zaretskii
2012-11-03 19:01       ` Glenn Morris
2021-12-04  4:49     ` Lars Ingebrigtsen
2012-11-04 17:17 ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).