emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Give possibility to start gnus with gnus-no-server
@ 2012-09-24 13:57 Jarmo Hurri
  2012-09-25  1:50 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Jarmo Hurri @ 2012-09-24 13:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]


Greetings.

I tried to use org today together with gnus, but was unable to access
gnus via org, because I always start gnus with gnus-no-server. The
attached patch enables this through a customizeable variable.

--

Jarmo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-no-server --]
[-- Type: text/x-patch, Size: 1222 bytes --]

From 02e2822e733122b94adbe622b6945c6bca516c3d Mon Sep 17 00:00:00 2001
From: Jarmo Hurri <jarmo.hurri@syk.fi>
Date: Mon, 24 Sep 2012 16:10:06 +0300
Subject: [PATCH] Give possibility to start gnus with gnus-no-server

* lisp/org-gnus.el: Added a new customizable boolean variable
  org-gnus-no-server and support for it in function
  org-gnus-no-new-news.
---
 lisp/org-gnus.el |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 8ae41ee..2e0b5b7 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -66,6 +66,12 @@ this variable to `t'."
   :version "24.1"
   :type 'boolean)
 
+(defcustom org-gnus-no-server nil
+  "If non-nil, gnus is started in org using the function 'org-gnus-no-server'
+instead of 'gnus'."
+  :group 'org-gnus
+  :type 'boolean)
+
 
 ;; Install the link type
 (org-add-link-type "gnus" 'org-gnus-open)
@@ -287,7 +293,7 @@ If `org-store-link' was called with a prefix arg the meaning of
 
 (defun org-gnus-no-new-news ()
   "Like `M-x gnus' but doesn't check for new news."
-  (if (not (gnus-alive-p)) (gnus)))
+  (if (not (gnus-alive-p)) (if org-gnus-no-server (gnus-no-server) (gnus))))
 
 (provide 'org-gnus)
 
-- 
1.7.7.6


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

* Re: [PATCH] Give possibility to start gnus with gnus-no-server
  2012-09-24 13:57 [PATCH] Give possibility to start gnus with gnus-no-server Jarmo Hurri
@ 2012-09-25  1:50 ` Bastien
  2012-09-25  4:29   ` Jarmo Hurri
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-09-25  1:50 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Hi Jarmo,

Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> I tried to use org today together with gnus, but was unable to access
> gnus via org, because I always start gnus with gnus-no-server. 

(defalias 'gnus 'gnus-no-alias)

in your .emacs.el should do, no?

-- 
 Bastien

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

* Re: [PATCH] Give possibility to start gnus with gnus-no-server
  2012-09-25  1:50 ` Bastien
@ 2012-09-25  4:29   ` Jarmo Hurri
  2012-09-25  9:57     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Jarmo Hurri @ 2012-09-25  4:29 UTC (permalink / raw)
  To: emacs-orgmode


Bastien <bzg@altern.org> writes:
>> I tried to use org today together with gnus, but was unable to access
>> gnus via org, because I always start gnus with gnus-no-server. 
>
> (defalias 'gnus 'gnus-no-alias)
>
> in your .emacs.el should do, no?

Greetings.

You probably mean

(defalias 'gnus 'gnus-no-server)

which, to my ashtonishment, did not do it. I don't know why. It did not
matter whether I defined the alias before or after requiring org.

It is also possible for a user to run both gnus and gnus-no-server
(e.g., the latter when there is no connection to the news server).

--

Jarmo

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

* Re: [PATCH] Give possibility to start gnus with gnus-no-server
  2012-09-25  4:29   ` Jarmo Hurri
@ 2012-09-25  9:57     ` Bastien
  2012-09-26  8:02       ` Jarmo Hurri
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-09-25  9:57 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Hi Jarmo,

Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> You probably mean
>
> (defalias 'gnus 'gnus-no-server)

Er.. yes.

> which, to my ashtonishment, did not do it. I don't know why. It did not
> matter whether I defined the alias before or after requiring org.

This looks like a Gnus bug.  Please report it to the Gnus developers.

> It is also possible for a user to run both gnus and gnus-no-server
> (e.g., the latter when there is no connection to the news server).

Okay.  I've pushed a slightly edited version of your patch, please 
check the ChangeLog here:

  http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=1086895

Thanks,

-- 
 Bastien

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

* Re: [PATCH] Give possibility to start gnus with gnus-no-server
  2012-09-25  9:57     ` Bastien
@ 2012-09-26  8:02       ` Jarmo Hurri
  0 siblings, 0 replies; 5+ messages in thread
From: Jarmo Hurri @ 2012-09-26  8:02 UTC (permalink / raw)
  To: emacs-orgmode


Bastien <bzg@altern.org> writes:
> Okay.  I've pushed a slightly edited version of your patch, please
> check the ChangeLog here:
>
>   http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=1086895

Thanks!

--

Jarmo (one happy gnus user)

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

end of thread, other threads:[~2012-09-26  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 13:57 [PATCH] Give possibility to start gnus with gnus-no-server Jarmo Hurri
2012-09-25  1:50 ` Bastien
2012-09-25  4:29   ` Jarmo Hurri
2012-09-25  9:57     ` Bastien
2012-09-26  8:02       ` Jarmo Hurri

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).