emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Improve presentation of entry text lines
@ 2013-03-01 16:17 Sebastien Vauban
  2013-03-01 16:29 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2013-03-01 16:17 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

The following patch improves the entry-mode presentation (`E' in the agenda)
by adding a better leader on the side and one for a bottom corner.

The style is a bit like boxquote.

Best regards,
  Seb

From 606a57768d853cba427abd982e133f6b9bc20c94 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
Date: Fri, 1 Mar 2013 17:12:58 +0100
Subject: [PATCH] Improve presentation of entry text lines

2013-03-01  Sebastien Vauban  <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>

* org-agenda.el (org-agenda-entry-text-show-here): Improve
  presentation of entry text lines (in entry-mode) by adding two
  customizable vars (for side, and for bottom corner).

---
 lisp/org-agenda.el |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 3b6a005..242bb73 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -180,6 +180,16 @@ and `org-agenda-entry-text-maxlines'."
   :group 'org-agenda
   :type 'integer)

+(defcustom org-agenda-entry-text-side-leaders "    | "
+  "Text preceding the side of entry text lines in the agenda view."
+  :group 'org-agenda
+  :type 'string)
+
+(defcustom org-agenda-entry-text-bottom-corner-leaders "    `--"
+  "Text preceding the bottom corner of entry text lines in the agenda view."
+  :group 'org-agenda
+  :type 'string)
+
 (defcustom org-agenda-add-entry-text-descriptive-links t
   "Non-nil means export org-links as descriptive links in agenda added text.
 This variable applies to the text added to the agenda when
@@ -3853,7 +3863,9 @@ This check for agenda markers in all agenda buffers currently active."
       (error "No marker points to an entry here"))
     (setq txt (concat "\n" (org-no-properties
 			    (org-agenda-get-some-entry-text
-			     m org-agenda-entry-text-maxlines "    > "))))
+			     m org-agenda-entry-text-maxlines
+			     org-agenda-entry-text-side-leaders))
+		      "\n" org-agenda-entry-text-bottom-corner-leaders))
     (when (string-match "\\S-" txt)
       (setq o (make-overlay (point-at-bol) (point-at-eol)))
       (overlay-put o 'evaporate t)
--
1.7.9

-- 
Sebastien Vauban

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

* Re: [PATCH] Improve presentation of entry text lines
  2013-03-01 16:17 [PATCH] Improve presentation of entry text lines Sebastien Vauban
@ 2013-03-01 16:29 ` Bastien
  2013-03-01 22:31   ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-03-01 16:29 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: OrgMode ML

Hi Sébastien,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> The following patch improves the entry-mode presentation (`E' in the agenda)
> by adding a better leader on the side and one for a bottom corner.

Mhh.. two options is way two much for this, let's have just one.
Also, the output with your patch is wrong when the entry has no text.
I pushed a slightly "soberer" change, thanks for the idea!

-- 
 Bastien

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

* Re: [PATCH] Improve presentation of entry text lines
  2013-03-01 16:29 ` Bastien
@ 2013-03-01 22:31   ` Sebastien Vauban
  2013-03-02 10:02     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2013-03-01 22:31 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Bastien,

Bastien wrote:
> "Sebastien Vauban" writes:
>
>> The following patch improves the entry-mode presentation (`E' in the agenda)
>> by adding a better leader on the side and one for a bottom corner.
>
> Mhh.. two options is way two much for this, let's have just one.
> Also, the output with your patch is wrong when the entry has no text.
> I pushed a slightly "soberer" change, thanks for the idea!

OK.

FYI, there's a bug (not related to this change): if you filter out some events
(for example, a "work" meeting today, with an active timestamp) by tag (show
only "home" related things), you don't see the event headline, but well the 5
first entry text lines...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [PATCH] Improve presentation of entry text lines
  2013-03-01 22:31   ` Sebastien Vauban
@ 2013-03-02 10:02     ` Bastien
  2013-03-04  8:11       ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-03-02 10:02 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: OrgMode ML

Hi Sébastien,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> FYI, there's a bug (not related to this change): if you filter out some events
> (for example, a "work" meeting today, with an active timestamp) by tag (show
> only "home" related things), you don't see the event headline, but well the 5
> first entry text lines...

This is a limitation: you cannot show entries in filtered
agenda views.  It you can come up with a patch that allows
this, thanks in advance.

Best,

PS: Please report issues in separated threads.

-- 
 Bastien

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

* Re: [PATCH] Improve presentation of entry text lines
  2013-03-02 10:02     ` Bastien
@ 2013-03-04  8:11       ` Sebastien Vauban
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2013-03-04  8:11 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> "Sebastien Vauban" writes:
>
>> FYI, there's a bug (not related to this change): if you filter out some events
>> (for example, a "work" meeting today, with an active timestamp) by tag (show
>> only "home" related things), you don't see the event headline, but well the 5
>> first entry text lines...
>
> This is a limitation: you cannot show entries in filtered
> agenda views.  It you can come up with a patch that allows
> this, thanks in advance.

A pitty. But more coherent than before... So, a good trade-off, before better.

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2013-03-04  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 16:17 [PATCH] Improve presentation of entry text lines Sebastien Vauban
2013-03-01 16:29 ` Bastien
2013-03-01 22:31   ` Sebastien Vauban
2013-03-02 10:02     ` Bastien
2013-03-04  8:11       ` Sebastien Vauban

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