Igor Sosa Mayor | 22 Mar 2012 08:09
Picon

Autoaway again: 2 issues

Hi,

unfortunately I have to write again about the autoaway issues I am
experiencing. There are two which maybe are related to each other.

At the moment, and following Evgenii's advice (thanks), I have this
config:

      jabber-default-show  ""
      jabber-autoaway-verbose t
      jabber-autoaway-timeout 7 
      jabber-autoaway-method 'jabber-current-idle-time 

(add-hook 'jabber-post-connect-hooks 'jabber-autoaway-start)

If I understand the help pages rightly, this should trigger autoaway
after 7 mins of no interaction with emacs. In this case I have the
problem that this is not working well. I'm observing the behaviour and
autoaway is triggered but not after 7 mins, but 14, 15, 16 mins... I
can't see any pattern.

The second issue is the following: I have this workflow:

1. connect in the morning [I want to be 'online']
2. begin of work [I want to be 'dnd']
3. coffee break [I wanto to be 'away'] <<<--- this is the problem
4. back to work [I want to be 'dnd'] <<<--- this is the problem
5. stop working [I want to be 'online']

The problem is that 'dnd' does not triggered an away status. Apparently
(Continue reading)

Terechkov Evgenii | 22 Mar 2012 09:25
Picon

Re: Autoaway again: 2 issues

On Thu, 22 Mar 2012 08:09:36 +0100, Igor Sosa Mayor <joseleopoldo1792 <at> gmail.com> wrote:

> If I understand the help pages rightly, this should trigger autoaway
> after 7 mins of no interaction with emacs. In this case I have the
> problem that this is not working well. I'm observing the behaviour and
> autoaway is triggered but not after 7 mins, but 14, 15, 16 mins... I
> can't see any pattern.

Show value of jabber-autoaway-methods variable, please (note final
-method_s_).

> The second issue is the following: I have this workflow:
> > 1. connect in the morning [I want to be 'online']
> 2. begin of work [I want to be 'dnd']
> 3. coffee break [I wanto to be 'away'] <<<--- this is the problem
> 4. back to work [I want to be 'dnd'] <<<--- this is the problem
> 5. stop working [I want to be 'online']
> The problem is that 'dnd' does not triggered an away status. Apparently
> this is a feature, Evgenii says. But: can I reproduce the workflow I
> have (and which is, as far as I see, the default one in gtalk) without
> manually have to set the status?

Nope. Not whithout patching, at least. Alternatively, you can describe
all presense's relationships to each other and ask someone to make a
patch.

--

-- 
                                                WBR, Terechkov
                                                Evgenii.

(Continue reading)

Igor Sosa Mayor | 22 Mar 2012 09:35
Picon

Re: Autoaway again: 2 issues


> > The problem is that 'dnd' does not triggered an away status. Apparently
> > this is a feature, Evgenii says. But: can I reproduce the workflow I
> > have (and which is, as far as I see, the default one in gtalk) without
> > manually have to set the status?
> 
> Nope. Not whithout patching, at least. Alternatively, you can describe
> all presense's relationships to each other and ask someone to make a
> patch.

good, thx for the answer in any case... Which function should I look at
in the source? I dont think i'm able to patch it (for me  at least), but
maybe I can learn some elisp at least...

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Emacs-jabber-general mailing list
Emacs-jabber-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emacs-jabber-general
(Continue reading)

Igor Sosa Mayor | 22 Mar 2012 10:02
Picon

Re: Autoaway again: 2 issues

[sorry, I wrote to Evgenii instead of to the list; please answers to the
list!]

> Nope. Not whithout patching, at least. Alternatively, you can describe
> all presense's relationships to each other and ask someone to make a
> patch.

and in any case, what is the reason for such a feature? is this a xmpp
standard?

For me there are basically 2 status:
1. 'im there'
2. 'i'm not there'

and inside 'i'm there' there are 2 main status:
1. i'm there and you can chat with me
2. i'm there and you can not chat with me

But maybe i'm wrong...

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
(Continue reading)

Igor Sosa Mayor | 22 Mar 2012 12:17
Picon

Re: Autoaway again: 2 issues [solved]


> > If I understand the help pages rightly, this should trigger autoaway
> > after 7 mins of no interaction with emacs. In this case I have the
> > problem that this is not working well. I'm observing the behaviour and
> > autoaway is triggered but not after 7 mins, but 14, 15, 16 mins... I
> > can't see any pattern.

following Evgenii's advice I remove the setq configuration and put it in
the following way:

(custom-set-variables
 '(jabber-autoaway-method (quote jabber-xprintidle-get-idle-time))
 '(jabber-autoaway-timeout 20)
 '(jabber-autoaway-priority 2)
 '(jabber-autoaway-status "Ich bin kurz weg")
 '(jabber-autoaway-xa-priority 1)                                                                                              
 '(jabber-autoaway-xa-status "Ich bin lange weg")
 '(jabber-autoaway-xa-timeout 30))

And now it's working perfectly.

Thank you very much.

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
------------------------------------------------------------------------------
(Continue reading)

Igor Sosa Mayor | 22 Mar 2012 12:22
Picon

Re: Autoaway again: 2 issues


> Nope. Not whithout patching, at least. Alternatively, you can describe
> all presense's relationships to each other and ask someone to make a
> patch.

I have tried to make a patch myself. 

1. there are 2 new variables (*jabber-last-show* and
*jabber-last-status*)
2. I changed a little bit 2 functions
 2.1 jabber-autoaway-set-idle
 2.2 jabber-autoaway-maybe-unidle

Be aware:
1. i'm not a elisp expert
2. this is the first time a send/make a patch for other people than me
3. i'm not saying i want the patch integrated. In any case: for me it is
working perfectly.

This patch apply to commit: 7c3e8e98ce458539efe2dd30b3051fbbed06cd01

Again, thanks a lot to the developers of emacs-jabber.

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
diff --git a/jabber-autoaway.el b/jabber-autoaway.el
(Continue reading)

Terechkov Evgenii | 22 Mar 2012 12:56
Picon

Re: Autoaway again: 2 issues

On Thu, 22 Mar 2012 12:22:21 +0100, Igor Sosa Mayor <joseleopoldo1792 <at> gmail.com> wrote:

> > Nope. Not whithout patching, at least. Alternatively, you can describe
> > all presense's relationships to each other and ask someone to make a
> > patch.
> I have tried to make a patch myself. 
> 1. there are 2 new variables (*jabber-last-show* and
> *jabber-last-status*)
> 2. I changed a little bit 2 functions
>  2.1 jabber-autoaway-set-idle
>  2.2 jabber-autoaway-maybe-unidle
> Be aware:
> 1. i'm not a elisp expert
> 2. this is the first time a send/make a patch for other people than me
> 3. i'm not saying i want the patch integrated. In any case: for me it is
> working perfectly.

This patch breaks online->away->xa->online transition on unidle (it will
do online->away->xa->away instead).

--

-- 
                                                WBR, Terechkov
                                                Evgenii.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Igor Sosa Mayor | 22 Mar 2012 13:35
Picon

Re: Autoaway again: 2 issues


> This patch breaks online->away->xa->online transition on unidle (it will
> do online->away->xa->away instead).

you're right... i will think on a solution, although i can live with
this problem and use my own git branch for this issue (i have seldom an
xa status). 

If you have any suggestions... I have the impression the solution is not
trivial. Thx in any case.

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Emacs-jabber-general mailing list
Emacs-jabber-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emacs-jabber-general
Igor Sosa Mayor | 23 Mar 2012 08:23
Picon

Re: Autoaway again: 2 issues


> This patch breaks online->away->xa->online transition on unidle (it will
> do online->away->xa->away instead).

and this one? It's maybe not very elegant... thanks for your help!

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::
diff --git a/jabber-autoaway.el b/jabber-autoaway.el
index 9e4cbdc..2d727bc 100644
--- a/jabber-autoaway.el
+++ b/jabber-autoaway.el
 <at>  <at>  -140,8 +140,12  <at>  <at>  Return nil on error."

 (defun jabber-autoaway-set-idle (&optional xa)
   (jabber-autoaway-message "Autoaway triggered")
-  ;; Send presence, unless the user has set a custom presence
-  (unless (member *jabber-current-show* '("xa" "dnd"))
+  ;; Send presence
+  (unless (string= *jabber-current-show* "xa")
+    ; store last status	if away
+    (unless (member *jabber-current-show* '("xa", "away"))
+	  (setq *jabber-last-show* *jabber-current-show*
+		*jabber-last-status* *jabber-current-status*))
     (jabber-send-presence
      (if xa "xa" "away")
(Continue reading)


Gmane