emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-mobile agenda title
@ 2012-01-25 21:21 Henning Weiss
  2012-01-28 14:41 ` Bastien
  2012-12-05 13:10 ` Henning Weiss
  0 siblings, 2 replies; 8+ messages in thread
From: Henning Weiss @ 2012-01-25 21:21 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi everyone,

I have been working on a patch for
mobileorg-android<https://github.com/matburt/mobileorg-android>that
improves the displaying of the generated
agendas.org file. The problem I'm having is that TITLE: fields of all
entries are generated by concatenating the name and the matching criterion
of an entry. The issue is discussed in further details
here<https://github.com/matburt/mobileorg-android/issues/114#issuecomment-3658654>
.

I have tried to create a patch that removes the match criterions from the
generated title entry and attached it below. This could potentially break
other org-mobile clients and might not be the best way to solve this.

What would it take to include this in orgmode?

best regards,
Henning Weiss

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 541ccc8..82320c7 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -592,7 +592,7 @@ The table of checksums is written to the file
mobile-checksums."
  (cons (list 'org-agenda-title-append
     (concat "<after>KEYS=" gkey "#" (number-to-string
       (setq cnt (1+ cnt)))
-    " TITLE: " gdesc " " match "</after>"))
+    " TITLE: " gdesc "</after>"))
       settings))
   (push (list type match settings) new)))))
     (and new (list "X" "SUMO" (reverse new)

[-- Attachment #2: Type: text/html, Size: 2181 bytes --]

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

* Re: [PATCH] org-mobile agenda title
  2012-01-25 21:21 [PATCH] org-mobile agenda title Henning Weiss
@ 2012-01-28 14:41 ` Bastien
  2012-01-28 20:05   ` Henning Weiss
  2012-12-05 13:10 ` Henning Weiss
  1 sibling, 1 reply; 8+ messages in thread
From: Bastien @ 2012-01-28 14:41 UTC (permalink / raw)
  To: Henning Weiss; +Cc: emacs-orgmode, Richard Moreland

Hi Henning,

Henning Weiss <hdweiss@gmail.com> writes:

> I have been working on a patch for mobileorg-android that improves
> the displaying of the generated agendas.org file. The problem I'm
> having is that TITLE: fields of all entries are generated
> by concatenating the name and the matching criterion of an entry. The
> issue is discussed in further details here. 
>
> I have tried to create a patch that removes the match criterions from
> the generated title entry and attached it below. This could
> potentially break other org-mobile clients and might not be the best
> way to solve this.
>
> What would it take to include this in orgmode?

The patch looks okay to me (I read the discussion you pointed to.)

Richard, would this patch break anything on your side?

Thanks,

-- 
 Bastien

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

* Re: [PATCH] org-mobile agenda title
  2012-01-28 14:41 ` Bastien
@ 2012-01-28 20:05   ` Henning Weiss
  2012-03-20 15:30     ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Weiss @ 2012-01-28 20:05 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Richard Moreland

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

On Sat, Jan 28, 2012 at 3:41 PM, Bastien <bzg@altern.org> wrote:

> Hi Henning,
>
> Henning Weiss <hdweiss@gmail.com> writes:
>
> > I have been working on a patch for mobileorg-android that improves
> > the displaying of the generated agendas.org file. The problem I'm
> > having is that TITLE: fields of all entries are generated
> > by concatenating the name and the matching criterion of an entry. The
> > issue is discussed in further details here.
> >
> > I have tried to create a patch that removes the match criterions from
> > the generated title entry and attached it below. This could
> > potentially break other org-mobile clients and might not be the best
> > way to solve this.
> >
> > What would it take to include this in orgmode?
>
> The patch looks okay to me (I read the discussion you pointed to.)
>
> Richard, would this patch break anything on your side?
>
> Thanks,
>
> --
>  Bastien
>

Hi again,

I have a little revision to the patch to remove the matching criterion from
"normal" (ie. non-block) agendas as well. See below.

best regards,
Henning Weiss

--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -574,7 +574,7 @@ The table of checksums is written to the file
mobile-checksums."
                          (concat "<after>KEYS=" key " TITLE: "
                                  (if (and (stringp desc) (> (length desc)
0))
                                      desc (symbol-name type))
-                                 " " match "</after>"))
+                                 "</after>"))
                    settings))
        (push (list type match settings) new))
        ((or (functionp (nth 2 e)) (symbolp (nth 2 e)))
@@ -592,7 +592,7 @@ The table of checksums is written to the file
mobile-checksums."
                (cons (list 'org-agenda-title-append
                            (concat "<after>KEYS=" gkey "#"
(number-to-string
                                                      (setq cnt (1+ cnt)))
-                                   " TITLE: " gdesc " " match "</after>"))
+                                   " TITLE: " gdesc "</after>"))
                      settings))
          (push (list type match settings) new)))))
     (and new (list "X" "SUMO" (reverse new)

[-- Attachment #2: Type: text/html, Size: 3276 bytes --]

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

* Re: [PATCH] org-mobile agenda title
  2012-01-28 20:05   ` Henning Weiss
@ 2012-03-20 15:30     ` Bastien
  0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2012-03-20 15:30 UTC (permalink / raw)
  To: Henning Weiss; +Cc: emacs-orgmode, Richard Moreland

Hi Henning,

Henning Weiss <hdweiss@gmail.com> writes:

> I have a little revision to the patch to remove the matching
> criterion from "normal" (ie. non-block) agendas as well. See below.

Applied in master, thanks.

-- 
 Bastien

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

* Re: [PATCH] org-mobile agenda title
  2012-01-25 21:21 [PATCH] org-mobile agenda title Henning Weiss
  2012-01-28 14:41 ` Bastien
@ 2012-12-05 13:10 ` Henning Weiss
  2012-12-30  8:55   ` Bastien
  1 sibling, 1 reply; 8+ messages in thread
From: Henning Weiss @ 2012-12-05 13:10 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1561 bytes --]

Hi,

I was wondering why this patch was reversed in master. An updated version
of the patch is attached, and a discussion of what it does is below.

Henning

On Wed, Jan 25, 2012 at 10:21 PM, Henning Weiss <hdweiss@gmail.com> wrote:

> Hi everyone,
>
> I have been working on a patch for mobileorg-android<https://github.com/matburt/mobileorg-android>that improves the displaying of the generated
> agendas.org file. The problem I'm having is that TITLE: fields of all
> entries are generated by concatenating the name and the matching criterion
> of an entry. The issue is discussed in further details here<https://github.com/matburt/mobileorg-android/issues/114#issuecomment-3658654>
> .
>
> I have tried to create a patch that removes the match criterions from the
> generated title entry and attached it below. This could potentially break
> other org-mobile clients and might not be the best way to solve this.
>
> What would it take to include this in orgmode?
>
> best regards,
> Henning Weiss
>
> diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
> index 541ccc8..82320c7 100644
> --- a/lisp/org-mobile.el
> +++ b/lisp/org-mobile.el
> @@ -592,7 +592,7 @@ The table of checksums is written to the file
> mobile-checksums."
>   (cons (list 'org-agenda-title-append
>      (concat "<after>KEYS=" gkey "#" (number-to-string
>        (setq cnt (1+ cnt)))
> -    " TITLE: " gdesc " " match "</after>"))
> +    " TITLE: " gdesc "</after>"))
>        settings))
>    (push (list type match settings) new)))))
>      (and new (list "X" "SUMO" (reverse new)
>

[-- Attachment #1.2: Type: text/html, Size: 2755 bytes --]

[-- Attachment #2: 0001-Removed-match-from-agendas-title.patch --]
[-- Type: application/octet-stream, Size: 843 bytes --]

From 635332fb49637463bfe3f58e780ad3ee1a7ea9b3 Mon Sep 17 00:00:00 2001
From: Henning Weiss <hdweiss@gmail.com>
Date: Sun, 23 Sep 2012 02:36:41 +0200
Subject: [PATCH] Removed match from agendas title

---
 lisp/org-mobile.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index ffdd665..906ff26 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -593,7 +593,7 @@ The table of checksums is written to the file mobile-checksums."
 		(cons (list 'org-agenda-title-append
 			    (concat "<after>KEYS=" gkey "#" (number-to-string
 							     (setq cnt (1+ cnt)))
-				    " TITLE: " gdesc " " match "</after>"))
+				    " TITLE: " gdesc "</after>"))
 		      settings))
 	  (push (list type match settings) new)))))
     (and new (list "X" "SUMO" (reverse new)
-- 
1.7.10


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

* Re: [PATCH] org-mobile agenda title
  2012-12-05 13:10 ` Henning Weiss
@ 2012-12-30  8:55   ` Bastien
  2013-01-04 15:29     ` Henning Weiss
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-12-30  8:55 UTC (permalink / raw)
  To: Henning Weiss; +Cc: emacs-orgmode

Hi Henning,

Henning Weiss <hdweiss@gmail.com> writes:

> I was wondering why this patch was reversed in master. 

I think the line didn't change since 4a49e40d but I might be wrong.

> An updated version of the patch is attached, and a discussion of what
> it does is below.

Looks like the "updated" version is the same than the one you sent
first: http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00938.html

... and there is an updated one in the same thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg01073.html

Which one should I apply?  

Could you add a commit message with an Emacs changelog to your patch?

Thanks!

-- 
 Bastien

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

* Re: [PATCH] org-mobile agenda title
  2012-12-30  8:55   ` Bastien
@ 2013-01-04 15:29     ` Henning Weiss
  2013-01-04 16:22       ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Weiss @ 2013-01-04 15:29 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 847 bytes --]

Hi Bastien,

sorry for the late reply.

On Sun, Dec 30, 2012 at 9:55 AM, Bastien <bzg@altern.org> wrote:

> Hi Henning,
>
> Henning Weiss <hdweiss@gmail.com> writes:
>
> > I was wondering why this patch was reversed in master.
>
> I think the line didn't change since 4a49e40d but I might be wrong.
>
> > An updated version of the patch is attached, and a discussion of what
> > it does is below.
>
> Looks like the "updated" version is the same than the one you sent
> first:
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00938.html
>
> ... and there is an updated one in the same thread:
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg01073.html
>
> Which one should I apply?
>
> Could you add a commit message with an Emacs changelog to your patch?


I have attached a better version of the patch instead.

Henning

[-- Attachment #1.2: Type: text/html, Size: 1519 bytes --]

[-- Attachment #2: 0001-Removed-match-from-agendas-title.patch --]
[-- Type: application/octet-stream, Size: 1323 bytes --]

From 50c4fb8da9cbb0debc4ccca21ba6ee248e41263c Mon Sep 17 00:00:00 2001
From: Henning Weiss <hdweiss@gmail.com>
Date: Fri, 04 Jan 2013 16:14:41 +0200
Subject: [PATCH] Removed match from agendas title

* lisp/org-mobile.el (org-mobile-sumo-agenda-command): Removed match
description from block agendas when they have a title.

This makes the generated agendas.org file more readable, as complicated block
agendas otherwise have long titles.

TINYCHANGE
---
 lisp/org-mobile.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 2a083f0..b83db6a 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -598,12 +598,13 @@ The table of checksums is written to the file mobile-checksums."
 	(setq cnt 0)
 	(while (setq e (pop cmds))
 	  (setq type (car e) match (nth 1 e) settings (nth 2 e))
+	  (setq atitle (if (string= "" gdesc) match gdesc))
 	  (setq settings (append gsettings settings))
 	  (setq settings
 		(cons (list 'org-agenda-title-append
 			    (concat "<after>KEYS=" gkey "#" (number-to-string
 							     (setq cnt (1+ cnt)))
-				    " TITLE: " gdesc " " match "</after>"))
+				    " TITLE: " atitle "</after>"))
 		      settings))
 	  (push (list type match settings) new)))))
     (and new (list "X" "SUMO" (reverse new)
-- 
1.7.10


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

* Re: [PATCH] org-mobile agenda title
  2013-01-04 15:29     ` Henning Weiss
@ 2013-01-04 16:22       ` Bastien
  0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2013-01-04 16:22 UTC (permalink / raw)
  To: Henning Weiss; +Cc: emacs-orgmode

Hi Henning,

Henning Weiss <hdweiss@gmail.com> writes:

> I have attached a better version of the patch instead.

Thanks, I've applied a version that does not produce
compilation warnings.

Best,

-- 
 Bastien

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

end of thread, other threads:[~2013-01-04 16:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 21:21 [PATCH] org-mobile agenda title Henning Weiss
2012-01-28 14:41 ` Bastien
2012-01-28 20:05   ` Henning Weiss
2012-03-20 15:30     ` Bastien
2012-12-05 13:10 ` Henning Weiss
2012-12-30  8:55   ` Bastien
2013-01-04 15:29     ` Henning Weiss
2013-01-04 16:22       ` Bastien

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).