* [PATCH] Add customisable face for inlinetasks
@ 2011-08-20 11:18 Suvayu Ali
2011-08-24 8:39 ` Bastien
2011-11-30 21:02 ` Implement a new emphasis style to hide text Stefan Janik
0 siblings, 2 replies; 6+ messages in thread
From: Suvayu Ali @ 2011-08-20 11:18 UTC (permalink / raw)
To: Org mode mailing list
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
Hi,
Attached is a small patch that defines a customisable face for
inlinetasks.
--
Suvayu
Open source is the future. It sets us free.
[-- Attachment #2: 0001-Define-org-inlinetask-face.patch --]
[-- Type: text/plain, Size: 1347 bytes --]
From 16359dd0352baa0e636aec6bf6573fbbb913bef4 Mon Sep 17 00:00:00 2001
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Date: Tue, 2 Aug 2011 00:24:50 +0200
Subject: [PATCH] Define org-inlinetask face
---
lisp/org-inlinetask.el | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index 7d0d691..33a8abd 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -405,6 +405,12 @@ Either remove headline and meta data, or do special formatting."
(current-column)))
(defvar org-indent-indentation-per-level) ; defined in org-indent.el
+
+(defface org-inlinetask
+ (org-compatible-face 'org-level-8 '((t (:bold t))))
+ "Face for inlinetask headlines."
+ :group 'org-faces)
+
(defun org-inlinetask-fontify (limit)
"Fontify the inline tasks."
(let* ((nstars (if org-odd-levels-only
@@ -425,7 +431,7 @@ Either remove headline and meta data, or do special formatting."
(add-text-properties (match-beginning 2) (match-end 2)
'(face org-hide font-lock-fontified t))
(add-text-properties (match-beginning 3) (match-end 3)
- '(face shadow font-lock-fontified t)))))
+ '(face org-inlinetask font-lock-fontified t)))))
(defun org-inlinetask-toggle-visibility ()
"Toggle visibility of inline task at point."
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Add customisable face for inlinetasks
2011-08-20 11:18 [PATCH] Add customisable face for inlinetasks Suvayu Ali
@ 2011-08-24 8:39 ` Bastien
2011-08-24 11:38 ` Suvayu Ali
2011-11-30 21:02 ` Implement a new emphasis style to hide text Stefan Janik
1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2011-08-24 8:39 UTC (permalink / raw)
To: Suvayu Ali; +Cc: Org mode mailing list
Hi Suvayu,
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> Attached is a small patch that defines a customisable face for
> inlinetasks.
Thanks for this patch.
Can you improve it with two small changes?
- use `shadow' as the inherited face for the new defface;
- add a ChangeLog message to the patch (see
http://orgmode.org/worg/org-contribute.html#sec-5)
Thanks again!
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add customisable face for inlinetasks
2011-08-24 8:39 ` Bastien
@ 2011-08-24 11:38 ` Suvayu Ali
2011-08-24 13:23 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2011-08-24 11:38 UTC (permalink / raw)
To: Bastien; +Cc: Org mode mailing list
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
Hi Bastien,
On Wed, 24 Aug 2011 10:39:12 +0200
Bastien <bzg@altern.org> wrote:
> Can you improve it with two small changes?
>
> - use `shadow' as the inherited face for the new defface;
>
> - add a ChangeLog message to the patch (see
> http://orgmode.org/worg/org-contribute.html#sec-5)
I have made the changes. Let me know if they are up to your
expectations.
--
Suvayu
Open source is the future. It sets us free.
[-- Attachment #2: 0001-Define-org-inlinetask-face.patch --]
[-- Type: text/plain, Size: 1391 bytes --]
From 006046bd20758c387e9cb2340e1d97610365b060 Mon Sep 17 00:00:00 2001
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Date: Tue, 2 Aug 2011 00:24:50 +0200
Subject: [PATCH] Define org-inlinetask face
* org-inlinetask.el (org-inlinetask): New customisable face
for inlinetasks
---
lisp/org-inlinetask.el | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c743423..a186517 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -405,6 +405,12 @@ (defun org-inlinetask-get-current-indentation ()
(current-column)))
(defvar org-indent-indentation-per-level) ; defined in org-indent.el
+
+(defface org-inlinetask
+ (org-compatible-face 'shadow '((t (:bold t))))
+ "Face for inlinetask headlines."
+ :group 'org-faces)
+
(defun org-inlinetask-fontify (limit)
"Fontify the inline tasks down to LIMIT."
(let* ((nstars (if org-odd-levels-only
@@ -425,7 +431,7 @@ (defun org-inlinetask-fontify (limit)
(add-text-properties (match-beginning 2) (match-end 2)
'(face org-hide font-lock-fontified t))
(add-text-properties (match-beginning 3) (match-end 3)
- '(face shadow font-lock-fontified t)))))
+ '(face org-inlinetask font-lock-fontified t)))))
(defun org-inlinetask-toggle-visibility ()
"Toggle visibility of inline task at point."
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Add customisable face for inlinetasks
2011-08-24 11:38 ` Suvayu Ali
@ 2011-08-24 13:23 ` Bastien
0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2011-08-24 13:23 UTC (permalink / raw)
To: Suvayu Ali; +Cc: Org mode mailing list
Hi Suvayu,
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> I have made the changes.
Applied, thanks a lot!
> Let me know if they are up to your expectations.
That's perfect. I've just added the "TINYCHANGE" tag at the bottom
of the commit message, I forgot to mention this again.
Thanks again,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Implement a new emphasis style to hide text
2011-08-20 11:18 [PATCH] Add customisable face for inlinetasks Suvayu Ali
2011-08-24 8:39 ` Bastien
@ 2011-11-30 21:02 ` Stefan Janik
2011-12-01 10:29 ` Eric S Fraga
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Janik @ 2011-11-30 21:02 UTC (permalink / raw)
To: emacs-orgmode
Hello,
for some purposes I need to hide some words. (It would help to memorize these
words). In the enriched mode I can do this just by marking the words and
choosing M-x facemenu-set-background and then typing "black" for the "Background
color".
In the org-mode the enriched mode doesn't work.
A perfect solution for me would be a new emphasis style:
Maybe something like $a hidden text.$ --> $JUSTABLACKBOX$
(like the _underline style_ ).
How can I do that? (Or any other suggestions?)
Thanks.
Best regard, Stephan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Implement a new emphasis style to hide text
2011-11-30 21:02 ` Implement a new emphasis style to hide text Stefan Janik
@ 2011-12-01 10:29 ` Eric S Fraga
0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2011-12-01 10:29 UTC (permalink / raw)
To: Stefan Janik; +Cc: emacs-orgmode
Stefan Janik <sjanjal@web.de> writes:
> Hello,
> for some purposes I need to hide some words. (It would help to memorize these
> words). In the enriched mode I can do this just by marking the words and
> choosing M-x facemenu-set-background and then typing "black" for the "Background
> color".
>
> In the org-mode the enriched mode doesn't work.
>
> A perfect solution for me would be a new emphasis style:
> Maybe something like $a hidden text.$ --> $JUSTABLACKBOX$
> (like the _underline style_ ).
> How can I do that? (Or any other suggestions?)
>
> Thanks.
>
> Best regard, Stephan
Have a look at
,----[ C-h v org-emphasis-alist RET ]
| org-emphasis-alist is a variable defined in `org.el'.
| Its value is shown below.
|
| Documentation:
| Special syntax for emphasized text.
| Text starting and ending with a special character will be emphasized, for
| example *bold*, _underlined_ and /italic/. This variable sets the marker
| characters, the face to be used by font-lock for highlighting in Org-mode
| Emacs buffers, and the HTML tags to be used for this.
| For LaTeX export, see the variable `org-export-latex-emphasis-alist'.
| For DocBook export, see the variable `org-export-docbook-emphasis-alist'.
| Use customize to modify this, or restart Emacs after changing it.
|
| You can customize this variable.
|
| Value: (("*" bold "<b>" "</b>")
| ("/" italic "<i>" "</i>")
| ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
| ("=" org-code "<code>" "</code>" verbatim)
| ("~" org-verbatim "<code>" "</code>" verbatim)
| ("+"
| (:strike-through t)
| "<del>" "</del>")
| ("@" org-warning "<b>" "</b>"))
|
| Original value was
| (("*" bold "<b>" "</b>")
| ("/" italic "<i>" "</i>")
| ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
| ("=" org-code "<code>" "</code>" verbatim)
| ("~" org-verbatim "<code>" "</code>" verbatim)
| ("+"
| (:strike-through t)
| "<del>" "</del>"))
`----
You can define your own syntax (see my addition for @) with an
associated face (second term in each list). The face could be one which
/hides/ the text, as you desire.
HTH,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.7 (release_7.7.615.g02c26)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-01 10:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20 11:18 [PATCH] Add customisable face for inlinetasks Suvayu Ali
2011-08-24 8:39 ` Bastien
2011-08-24 11:38 ` Suvayu Ali
2011-08-24 13:23 ` Bastien
2011-11-30 21:02 ` Implement a new emphasis style to hide text Stefan Janik
2011-12-01 10:29 ` Eric S Fraga
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).