* Your way to quickstart Gnus?
@ 2011-08-15 15:17 XeCycle
2011-08-15 15:26 ` Richard Riley
2011-08-16 6:45 ` Tassilo Horn
0 siblings, 2 replies; 6+ messages in thread
From: XeCycle @ 2011-08-15 15:17 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Hello, I want to know if you have a way to start Gnus quickly when using
emacsclient.
I bind a key (in my WM) to execute `emacsclient -c -e '(gnus)'`, however
the *Group* buffer appeared read-only before I press a key --- for
example when I started it and press "Enter", Emacs will beep,
complaining this buffer read-only, then everything is fine. Another
problem is that the splash image won't be shown.
Well, these are all minor problems, but I'll be glad if I can solve it.
What's your way?
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Your way to quickstart Gnus?
2011-08-15 15:17 Your way to quickstart Gnus? XeCycle
@ 2011-08-15 15:26 ` Richard Riley
2011-08-16 6:20 ` XeCycle
2011-08-16 6:45 ` Tassilo Horn
1 sibling, 1 reply; 6+ messages in thread
From: Richard Riley @ 2011-08-15 15:26 UTC (permalink / raw)
To: ding
XeCycle <xecycle@gmail.com> writes:
> Hello, I want to know if you have a way to start Gnus quickly when using
> emacsclient.
>
> I bind a key (in my WM) to execute `emacsclient -c -e '(gnus)'`, however
> the *Group* buffer appeared read-only before I press a key --- for
> example when I started it and press "Enter", Emacs will beep,
> complaining this buffer read-only, then everything is fine. Another
> problem is that the splash image won't be shown.
>
> Well, these are all minor problems, but I'll be glad if I can solve it.
> What's your way?
not tested, but I use to use this:
,----
| (defun rgr/mailto (to)
| "Send an email to 'to' but prompting for a posting style if not configured. Starts Gnus if not already running."
| (unless gnus-active-hashtb (gnus)) ;; Better way??
| (let ((gnus-newsgroup-name
| (if gnus-default-mailto-group gnus-default-mailto-group (completing-read "Use posting style of group: "
| gnus-active-hashtb nil
| (gnus-read-active-file-p)))))
| (compose-mail to)))
`----
and a shell script
,----
| mailto=$(printf '%s\n' "$1" | sed -e 's/[\"]/\\&/g')
| elisp_expr=$(printf '(rgr/mailto "%s")' "$mailto")
|
| emacsclient --alternate-editor="" -c -n \
| --eval "$elisp_expr" \
| --eval '(set-window-dedicated-p (selected-window) t)'
`----
maybe it will help you get started if it doesnt work.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Your way to quickstart Gnus?
2011-08-15 15:26 ` Richard Riley
@ 2011-08-16 6:20 ` XeCycle
0 siblings, 0 replies; 6+ messages in thread
From: XeCycle @ 2011-08-16 6:20 UTC (permalink / raw)
To: ding
Richard Riley <rileyrg@googlemail.com> writes:
> XeCycle <xecycle@gmail.com> writes:
>
>> Hello, I want to know if you have a way to start Gnus quickly when using
>> emacsclient.
>>
>> I bind a key (in my WM) to execute `emacsclient -c -e '(gnus)'`, however
>> the *Group* buffer appeared read-only before I press a key --- for
>> example when I started it and press "Enter", Emacs will beep,
>> complaining this buffer read-only, then everything is fine. Another
>> problem is that the splash image won't be shown.
>>
>> Well, these are all minor problems, but I'll be glad if I can solve it.
>> What's your way?
>
> not tested, but I use to use this:
>
> ,----
> | (defun rgr/mailto (to)
> | "Send an email to 'to' but prompting for a posting style if not configured. Starts Gnus if not already running."
> | (unless gnus-active-hashtb (gnus)) ;; Better way??
> | (let ((gnus-newsgroup-name
> | (if gnus-default-mailto-group gnus-default-mailto-group (completing-read "Use posting style of group: "
> | gnus-active-hashtb nil
> | (gnus-read-active-file-p)))))
> | (compose-mail to)))
> `----
>
>
> and a shell script
>
> ,----
> | mailto=$(printf '%s\n' "$1" | sed -e 's/[\"]/\\&/g')
> | elisp_expr=$(printf '(rgr/mailto "%s")' "$mailto")
> |
> | emacsclient --alternate-editor="" -c -n \
> | --eval "$elisp_expr" \
> | --eval '(set-window-dedicated-p (selected-window) t)'
> `----
>
> maybe it will help you get started if it doesnt work.
Thank you, but this is not exactly what I want --- I only need to start
Gnus up, looking at the *Group* buffer.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Your way to quickstart Gnus?
2011-08-15 15:17 Your way to quickstart Gnus? XeCycle
2011-08-15 15:26 ` Richard Riley
@ 2011-08-16 6:45 ` Tassilo Horn
2011-08-16 12:25 ` Eric Abrahamsen
1 sibling, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2011-08-16 6:45 UTC (permalink / raw)
To: XeCycle; +Cc: ding
XeCycle <xecycle@gmail.com> writes:
Hi!
> I bind a key (in my WM) to execute `emacsclient -c -e '(gnus)'`,
> however the *Group* buffer appeared read-only before I press a key ---
> for example when I started it and press "Enter", Emacs will beep,
> complaining this buffer read-only, then everything is fine. Another
> problem is that the splash image won't be shown.
Executing
emacsclient -c -e '(gnus)'
in a terminal (with an emacs server already started) does the right
thing for me. If Gnus was already started, I'm put into *Group*, else
it starts as usual (indeed, without the splash screen).
Bye,
Tassilo
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Your way to quickstart Gnus?
2011-08-16 6:45 ` Tassilo Horn
@ 2011-08-16 12:25 ` Eric Abrahamsen
2011-08-16 15:19 ` Wes Hardaker
0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2011-08-16 12:25 UTC (permalink / raw)
To: ding
On Tue, Aug 16 2011, Tassilo Horn wrote:
> XeCycle <xecycle@gmail.com> writes:
>
> Hi!
>
>> I bind a key (in my WM) to execute `emacsclient -c -e '(gnus)'`,
>> however the *Group* buffer appeared read-only before I press a key ---
>> for example when I started it and press "Enter", Emacs will beep,
>> complaining this buffer read-only, then everything is fine. Another
>> problem is that the splash image won't be shown.
>
> Executing
>
> emacsclient -c -e '(gnus)'
I do something like this from within Emacs, but didn't want to fetch new
news when all I wanted was to go to the group buffer. I use this; I
don't know if it's totally according to Hoyle, but it seems pretty
foolproof.
--8<---------------cut here---------------start------------->8---
(defun my-goto-gnus ()
"Go to the gnus group buffer, starting gnus if necessary."
(interactive)
(if (or (not (fboundp 'gnus-alive-p))
(not (gnus-alive-p)))
(gnus)
(switch-to-buffer gnus-group-buffer t)))
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Your way to quickstart Gnus?
2011-08-16 12:25 ` Eric Abrahamsen
@ 2011-08-16 15:19 ` Wes Hardaker
0 siblings, 0 replies; 6+ messages in thread
From: Wes Hardaker @ 2011-08-16 15:19 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: ding
>>>>> On Tue, 16 Aug 2011 20:25:40 +0800, Eric Abrahamsen <eric@ericabrahamsen.net> said:
>> emacsclient -c -e '(gnus)'
EA> I do something like this from within Emacs, but didn't want to fetch
EA> new news when all I wanted was to go to the group buffer. I use
EA> this; I don't know if it's totally according to Hoyle, but it seems
EA> pretty foolproof.
One of these should work for you:
emacsclient -c -e '(gnus 5 t)'
emacsclient -c -e '(gnus 0)' (or maybe 1).
--
Wes Hardaker
My Pictures: http://capturedonearth.com/
My Thoughts: http://pontifications.hardakers.net/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-08-16 15:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 15:17 Your way to quickstart Gnus? XeCycle
2011-08-15 15:26 ` Richard Riley
2011-08-16 6:20 ` XeCycle
2011-08-16 6:45 ` Tassilo Horn
2011-08-16 12:25 ` Eric Abrahamsen
2011-08-16 15:19 ` Wes Hardaker
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).