* making Emacs 22 startup like Emacs 21
@ 2007-11-09 23:03 Will Parsons
2007-11-10 7:56 ` Sven Joachim
0 siblings, 1 reply; 9+ messages in thread
From: Will Parsons @ 2007-11-09 23:03 UTC (permalink / raw)
To: help-gnu-emacs
I find the new Emacs 22 startup behaviour quite annoying in that it puts
up a splash screen even when Emacs is invoked with a file name. I've
found the inhibit-splash-screen variable to inhibit the splash screen
entirely, but I'd like to keep the splash screen if Emacs is invoked
without arguments - just inhibit it if a file is specified. Is there
any way to get this to work like Emacs 21?
- Will
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-09 23:03 making Emacs 22 startup like Emacs 21 Will Parsons
@ 2007-11-10 7:56 ` Sven Joachim
2007-11-10 19:19 ` Will Parsons
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sven Joachim @ 2007-11-10 7:56 UTC (permalink / raw)
To: help-gnu-emacs
Will Parsons <oudeis@nodomain.invalid> writes:
> I find the new Emacs 22 startup behaviour quite annoying in that it puts
> up a splash screen even when Emacs is invoked with a file name. I've
> found the inhibit-splash-screen variable to inhibit the splash screen
> entirely, but I'd like to keep the splash screen if Emacs is invoked
> without arguments - just inhibit it if a file is specified. Is there
> any way to get this to work like Emacs 21?
I've just put these 2¢ into my .emacs, which seem to do the trick:
(when (> (length command-line-args) 1)
(setq inhibit-splash-screen t))
Cheers,
Sven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-10 7:56 ` Sven Joachim
@ 2007-11-10 19:19 ` Will Parsons
2007-11-16 18:11 ` Kevin Rodgers
[not found] ` <mailman.3671.1195236694.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 9+ messages in thread
From: Will Parsons @ 2007-11-10 19:19 UTC (permalink / raw)
To: help-gnu-emacs
Sven Joachim wrote:
> Will Parsons <oudeis@nodomain.invalid> writes:
>
>> I find the new Emacs 22 startup behaviour quite annoying in that it puts
>> up a splash screen even when Emacs is invoked with a file name. I've
>> found the inhibit-splash-screen variable to inhibit the splash screen
>> entirely, but I'd like to keep the splash screen if Emacs is invoked
>> without arguments - just inhibit it if a file is specified. Is there
>> any way to get this to work like Emacs 21?
>
> I've just put these 2¢ into my .emacs, which seem to do the trick:
>
> (when (> (length command-line-args) 1)
> (setq inhibit-splash-screen t))
>
Thanks, that works for me.
- Will
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-10 7:56 ` Sven Joachim
2007-11-10 19:19 ` Will Parsons
@ 2007-11-16 18:11 ` Kevin Rodgers
[not found] ` <mailman.3671.1195236694.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 9+ messages in thread
From: Kevin Rodgers @ 2007-11-16 18:11 UTC (permalink / raw)
To: help-gnu-emacs
Sven Joachim wrote:
> Will Parsons <oudeis@nodomain.invalid> writes:
>
>> I find the new Emacs 22 startup behaviour quite annoying in that it puts
>> up a splash screen even when Emacs is invoked with a file name. I've
>> found the inhibit-splash-screen variable to inhibit the splash screen
>> entirely, but I'd like to keep the splash screen if Emacs is invoked
>> without arguments - just inhibit it if a file is specified. Is there
>> any way to get this to work like Emacs 21?
>
> I've just put these 2¢ into my .emacs, which seem to do the trick:
>
> (when (> (length command-line-args) 1)
That doesn't distinguish file names from other command line arguments
such as options. A better test might be
(> (length (buffer-list) 2)
assuming that with no file name arguments just the *scratch* and
*Messages* buffers exist.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
[not found] ` <mailman.3671.1195236694.18990.help-gnu-emacs@gnu.org>
@ 2007-11-16 18:57 ` Sven Joachim
2007-11-17 1:00 ` Johan Bockgård
0 siblings, 1 reply; 9+ messages in thread
From: Sven Joachim @ 2007-11-16 18:57 UTC (permalink / raw)
To: help-gnu-emacs
Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> Sven Joachim wrote:
>> I've just put these 2¢ into my .emacs, which seem to do the trick:
>>
>> (when (> (length command-line-args) 1)
>
> That doesn't distinguish file names from other command line arguments
> such as options.
True, but those options are already deleted from command-line-args when
the user's init file is processed.
> A better test might be
>
> (> (length (buffer-list) 2)
>
> assuming that with no file name arguments just the *scratch* and
> *Messages* buffers exist.
That assumption is mistaken, a freshly started Emacs has six buffers:
(buffer-list)
=> (#<buffer *scratch*> #<buffer *Minibuf-0*> #<buffer *Messages*>
#<buffer *Echo Area 0*> #<buffer *Echo Area 1*>
#<buffer *code-conversion-work*>)
So you'd need to test (> (length (buffer-list) 6).
Regards,
Sven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-16 18:57 ` Sven Joachim
@ 2007-11-17 1:00 ` Johan Bockgård
2007-11-22 7:14 ` Kevin Rodgers
0 siblings, 1 reply; 9+ messages in thread
From: Johan Bockgård @ 2007-11-17 1:00 UTC (permalink / raw)
To: help-gnu-emacs
Sven Joachim <svenjoac@gmx.de> writes:
> Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
>
>> Sven Joachim wrote:
>>> I've just put these 2¢ into my .emacs, which seem to do the trick:
>>>
>>> (when (> (length command-line-args) 1)
>>
>> That doesn't distinguish file names from other command line arguments
>> such as options.
>
> True, but those options are already deleted from command-line-args when
> the user's init file is processed.
Some options are deleted, some are not. (It's reasonable to have any
arguments disable the splash screen though.)
>> A better test might be
>>
>> (> (length (buffer-list) 2)
>>
>> assuming that with no file name arguments just the *scratch* and
>> *Messages* buffers exist.
>
> That assumption is mistaken, a freshly started Emacs has six buffers:
>
> (buffer-list)
> => (#<buffer *scratch*> #<buffer *Minibuf-0*> #<buffer *Messages*>
> #<buffer *Echo Area 0*> #<buffer *Echo Area 1*>
> #<buffer *code-conversion-work*>)
>
> So you'd need to test (> (length (buffer-list) 6).
Better test whether there are any file visiting buffers
(delq nil (mapcar 'buffer-file-name (buffer-list)))
--
Johan Bockgård
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-17 1:00 ` Johan Bockgård
@ 2007-11-22 7:14 ` Kevin Rodgers
2007-11-26 18:22 ` David Brodbeck
[not found] ` <mailman.4136.1196101342.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Kevin Rodgers @ 2007-11-22 7:14 UTC (permalink / raw)
To: help-gnu-emacs
Johan Bockgård wrote:
> Better test whether there are any file visiting buffers
>
> (delq nil (mapcar 'buffer-file-name (buffer-list)))
>
Indeed, I was looking at an old version of my ~/.emacs. Here's
what I have now:
(catch 'inhibit-splash-screen
(dolist (buffer (buffer-list) nil)
(when (buffer-file-name buffer)
(throw 'inhibit-splash-screen t))))
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
2007-11-22 7:14 ` Kevin Rodgers
@ 2007-11-26 18:22 ` David Brodbeck
[not found] ` <mailman.4136.1196101342.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: David Brodbeck @ 2007-11-26 18:22 UTC (permalink / raw)
To: help-gnu-emacs
On Nov 21, 2007, at 11:14 PM, Kevin Rodgers wrote:
> Johan Bockgård wrote:
>> Better test whether there are any file visiting buffers
>> (delq nil (mapcar 'buffer-file-name (buffer-list)))
>
> Indeed, I was looking at an old version of my ~/.emacs. Here's
> what I have now:
>
> (catch 'inhibit-splash-screen
> (dolist (buffer (buffer-list) nil)
> (when (buffer-file-name buffer)
> (throw 'inhibit-splash-screen t))))
Hmm, when I paste this into my .emacs I still get the splash screen,
even if I supply a filename on the command line. I must be doing
something wrong.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: making Emacs 22 startup like Emacs 21
[not found] ` <mailman.4136.1196101342.18990.help-gnu-emacs@gnu.org>
@ 2007-11-26 18:34 ` David Kastrup
0 siblings, 0 replies; 9+ messages in thread
From: David Kastrup @ 2007-11-26 18:34 UTC (permalink / raw)
To: help-gnu-emacs
David Brodbeck <brodbd@u.washington.edu> writes:
> On Nov 21, 2007, at 11:14 PM, Kevin Rodgers wrote:
>
>> Johan Bockgård wrote:
>>> Better test whether there are any file visiting buffers
>>> (delq nil (mapcar 'buffer-file-name (buffer-list)))
>>
>> Indeed, I was looking at an old version of my ~/.emacs. Here's
>> what I have now:
>>
>> (catch 'inhibit-splash-screen
>> (dolist (buffer (buffer-list) nil)
>> (when (buffer-file-name buffer)
>> (throw 'inhibit-splash-screen t))))
>
> Hmm, when I paste this into my .emacs I still get the splash screen,
> even if I supply a filename on the command line. I must be doing
> something wrong.
The above sequence only replaces the single line quoted above from the
previous recipe. The other parts of the recipe must stay around as
well.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-26 18:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 23:03 making Emacs 22 startup like Emacs 21 Will Parsons
2007-11-10 7:56 ` Sven Joachim
2007-11-10 19:19 ` Will Parsons
2007-11-16 18:11 ` Kevin Rodgers
[not found] ` <mailman.3671.1195236694.18990.help-gnu-emacs@gnu.org>
2007-11-16 18:57 ` Sven Joachim
2007-11-17 1:00 ` Johan Bockgård
2007-11-22 7:14 ` Kevin Rodgers
2007-11-26 18:22 ` David Brodbeck
[not found] ` <mailman.4136.1196101342.18990.help-gnu-emacs@gnu.org>
2007-11-26 18:34 ` David Kastrup
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).