Re: [Orgmode] [PATCH] sexp can set its face (was: Including current time in agenda)

2010-12-12 Thread suvayu ali
Hi Łukasz,

2010/12/9 Łukasz Stelmach lukasz.stelm...@iem.pw.edu.pl:
 suvayu ali fatkasuvayu+li...@gmail.com writes:

 I actually tried to set the text properties for the string instead,
 but looks like org-agenda is ignoring that.

 (defun jd:org-current-time ()
   Return current-time if date is today.
   (when (equal date (calendar-current-date))
     (propertize (format-time-string %H:%M Current time) 'font-lock-face
               '(:weight bold :foreground DodgerBlue4 :background snow

 To accomplish this you'd have to apply the following patch and use 'face
 property rather than font-lock-face.

 Why can't a sexp choose its 'face after all?


Thanks for this patch. Works great. :)


 --8---cut here---start-8---
 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 20c901a..ba5eafc 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -4650,8 +4650,7 @@ the documentation of `org-diary'.
  (defun org-agenda-get-sexps ()
   Return the sexp information for agenda display.
   (require 'diary-lib)
 -  (let* ((props (list 'face nil
 -                     'mouse-face 'highlight
 +  (let* ((props (list 'mouse-face 'highlight
                      'help-echo
                      (format mouse-2 or RET jump to org file %s
                              (abbreviate-file-name buffer-file-name
 --8---cut here---end---8---


-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] sexp can set its face (was: Including current time in agenda)

2010-12-11 Thread Carsten Dominik

Patch accepted, thanks.

- Carsten

On Dec 9, 2010, at 12:46 AM, Łukasz Stelmach wrote:


suvayu ali fatkasuvayu+li...@gmail.com writes:


I actually tried to set the text properties for the string instead,
but looks like org-agenda is ignoring that.

(defun jd:org-current-time ()
 Return current-time if date is today.
 (when (equal date (calendar-current-date))
   (propertize (format-time-string %H:%M Current time) 'font-lock- 
face

'(:weight bold :foreground DodgerBlue4 :background snow


To accomplish this you'd have to apply the following patch and use  
'face

property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8---cut here---start-8---
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 20c901a..ba5eafc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4650,8 +4650,7 @@ the documentation of `org-diary'.
(defun org-agenda-get-sexps ()
  Return the sexp information for agenda display.
  (require 'diary-lib)
-  (let* ((props (list 'face nil
- 'mouse-face 'highlight
+  (let* ((props (list 'mouse-face 'highlight
  'help-echo
  (format mouse-2 or RET jump to org file %s
  (abbreviate-file-name buffer-file-name
--8---cut here---end---8---

--
Miłego dnia,
Łukasz Stelmach


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] sexp can set its face (was: Including current time in agenda)

2010-12-09 Thread Łukasz Stelmach
suvayu ali fatkasuvayu+li...@gmail.com writes:

 I actually tried to set the text properties for the string instead,
 but looks like org-agenda is ignoring that.

 (defun jd:org-current-time ()
   Return current-time if date is today.
   (when (equal date (calendar-current-date))
 (propertize (format-time-string %H:%M Current time) 'font-lock-face
   '(:weight bold :foreground DodgerBlue4 :background snow

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8---cut here---start-8---
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 20c901a..ba5eafc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4650,8 +4650,7 @@ the documentation of `org-diary'.
 (defun org-agenda-get-sexps ()
   Return the sexp information for agenda display.
   (require 'diary-lib)
-  (let* ((props (list 'face nil
- 'mouse-face 'highlight
+  (let* ((props (list 'mouse-face 'highlight
  'help-echo
  (format mouse-2 or RET jump to org file %s
  (abbreviate-file-name buffer-file-name
--8---cut here---end---8---

-- 
Miłego dnia,
Łukasz Stelmach


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode