emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* multiline description list, partial patch
@ 2009-09-09 19:59 Eric Schulte
  2009-09-10 16:40 ` Carsten Dominik
  2009-09-11  3:49 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Schulte @ 2009-09-09 19:59 UTC (permalink / raw)
  To: Org Mode

Hi,

I've noticed that the bold face isn't applied to multiline description
lists.  This patch [1] partially fixes the problem, but for some reason
I keep losing the bold.  Any thoughts/ideas?

On a related topic, I'd like to consistently indent my decision list
text, rather than sometimes moving back to the depth of the bold
portion, does anyone else feel similarly and is this supported?

thanks -- Eric

Footnotes: 
[1]  
diff --git a/lisp/org.el b/lisp/org.el
index 39ef466..ed8d776 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4703,7 +4703,7 @@ between words."
 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
 		 (0 (org-get-checkbox-statistics-face) t)))
 	   ;; Description list items
-	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*? ::\\)"
+	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*?\n?.*? ::\\)"
 	     2 'bold prepend)
 	   ;; ARCHIVEd headings
 	   (list (concat "^\\*+ \\(.*:" org-archive-tag ":.*\\)")
@@ -16272,7 +16272,7 @@ which make use of the date at the cursor."
 	  (setq column (current-column)))
        ((org-in-item-p)
 	(org-beginning-of-item)
-	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*? :: \\)?")
+	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*?\n?.*? :: \\)?")
 	(setq bpos (match-beginning 1) tpos (match-end 0)
 	      bcol (progn (goto-char bpos) (current-column))
 	      tcol (progn (goto-char tpos) (current-column))
@@ -16372,7 +16372,7 @@ In particular, this makes sure hanging paragraphs for hand-formatted lists
 work correctly."
   (cond ((looking-at "#[ \t]+")
 	 (match-string 0))
-	((looking-at "[ \t]*\\([-*+] .*? :: \\)")
+	((looking-at "[ \t]*\\([-*+] .*?\n?.*? :: \\)")
 	 (save-excursion
 	   (if (> (match-end 1) (+ (match-beginning 1)
 				   org-description-max-indent))

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

* Re: multiline description list, partial patch
  2009-09-09 19:59 multiline description list, partial patch Eric Schulte
@ 2009-09-10 16:40 ` Carsten Dominik
  2009-09-11 22:12   ` Sebastian Rose
  2009-09-11  3:49 ` Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-09-10 16:40 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode


On Sep 9, 2009, at 9:59 PM, Eric Schulte wrote:

> Hi,
>
> I've noticed that the bold face isn't applied to multiline description
> lists.

What exactly do you mean here?

>  This patch [1] partially fixes the problem, but for some reason
> I keep losing the bold.  Any thoughts/ideas?

Maybe you need to add a fontilock-multiline text property?

>
> On a related topic, I'd like to consistently indent my decision list
> text, rather than sometimes moving back to the depth of the bold
> portion, does anyone else feel similarly and is this supported?

Have you had a look at the variable org-description-max-indent ?
But maybe I am again not clearly understanding what you mean?

- Carsten

>
> thanks -- Eric
>
> Footnotes:
> [1]
> diff --git a/lisp/org.el b/lisp/org.el
> index 39ef466..ed8d776 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4703,7 +4703,7 @@ between words."
> 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
> 		 (0 (org-get-checkbox-statistics-face) t)))
> 	   ;; Description list items
> -	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*? ::\\)"
> +	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*?\n?.*? ::\\)"
> 	     2 'bold prepend)
> 	   ;; ARCHIVEd headings
> 	   (list (concat "^\\*+ \\(.*:" org-archive-tag ":.*\\)")
> @@ -16272,7 +16272,7 @@ which make use of the date at the cursor."
> 	  (setq column (current-column)))
>        ((org-in-item-p)
> 	(org-beginning-of-item)
> -	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*? :: \ 
> \)?")
> +	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*? 
> \n?.*? :: \\)?")
> 	(setq bpos (match-beginning 1) tpos (match-end 0)
> 	      bcol (progn (goto-char bpos) (current-column))
> 	      tcol (progn (goto-char tpos) (current-column))
> @@ -16372,7 +16372,7 @@ In particular, this makes sure hanging  
> paragraphs for hand-formatted lists
> work correctly."
>   (cond ((looking-at "#[ \t]+")
> 	 (match-string 0))
> -	((looking-at "[ \t]*\\([-*+] .*? :: \\)")
> +	((looking-at "[ \t]*\\([-*+] .*?\n?.*? :: \\)")
> 	 (save-excursion
> 	   (if (> (match-end 1) (+ (match-beginning 1)
> 				   org-description-max-indent))
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: multiline description list, partial patch
  2009-09-09 19:59 multiline description list, partial patch Eric Schulte
  2009-09-10 16:40 ` Carsten Dominik
@ 2009-09-11  3:49 ` Carsten Dominik
  2009-09-11  6:03   ` Eric Schulte
  1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-09-11  3:49 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Hi Eric,

I am assuming you are trying to do something like this:

  - a very long
    description item :: here is the explanation

This is not going to work properly with export.

- Carsten

On Sep 9, 2009, at 9:59 PM, Eric Schulte wrote:

> Hi,
>
> I've noticed that the bold face isn't applied to multiline description
> lists.  This patch [1] partially fixes the problem, but for some  
> reason
> I keep losing the bold.  Any thoughts/ideas?
>
> On a related topic, I'd like to consistently indent my decision list
> text, rather than sometimes moving back to the depth of the bold
> portion, does anyone else feel similarly and is this supported?
>
> thanks -- Eric
>
> Footnotes:
> [1]
> diff --git a/lisp/org.el b/lisp/org.el
> index 39ef466..ed8d776 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4703,7 +4703,7 @@ between words."
> 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
> 		 (0 (org-get-checkbox-statistics-face) t)))
> 	   ;; Description list items
> -	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*? ::\\)"
> +	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(.*?\n?.*? ::\\)"
> 	     2 'bold prepend)
> 	   ;; ARCHIVEd headings
> 	   (list (concat "^\\*+ \\(.*:" org-archive-tag ":.*\\)")
> @@ -16272,7 +16272,7 @@ which make use of the date at the cursor."
> 	  (setq column (current-column)))
>        ((org-in-item-p)
> 	(org-beginning-of-item)
> -	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*? :: \ 
> \)?")
> +	(looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\[[- X]\\][ \t]*\\|.*? 
> \n?.*? :: \\)?")
> 	(setq bpos (match-beginning 1) tpos (match-end 0)
> 	      bcol (progn (goto-char bpos) (current-column))
> 	      tcol (progn (goto-char tpos) (current-column))
> @@ -16372,7 +16372,7 @@ In particular, this makes sure hanging  
> paragraphs for hand-formatted lists
> work correctly."
>   (cond ((looking-at "#[ \t]+")
> 	 (match-string 0))
> -	((looking-at "[ \t]*\\([-*+] .*? :: \\)")
> +	((looking-at "[ \t]*\\([-*+] .*?\n?.*? :: \\)")
> 	 (save-excursion
> 	   (if (> (match-end 1) (+ (match-beginning 1)
> 				   org-description-max-indent))
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: multiline description list, partial patch
  2009-09-11  3:49 ` Carsten Dominik
@ 2009-09-11  6:03   ` Eric Schulte
  2009-09-11 21:09     ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2009-09-11  6:03 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Eric,
>
> I am assuming you are trying to do something like this:
>
>  - a very long
>    description item :: here is the explanation
>
> This is not going to work properly with export.
>

Exactly, when description items line-wrap I'd like to preserve their
bold face, but your export point is well take.

also, thanks for pointing out the `org-description-max-indent' variable,
that will greatly help my sense of org-aesthetic. Thanks -- Eric

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

* Re: multiline description list, partial patch
  2009-09-11  6:03   ` Eric Schulte
@ 2009-09-11 21:09     ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-09-11 21:09 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode


On Sep 11, 2009, at 8:03 AM, Eric Schulte wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi Eric,
>>
>> I am assuming you are trying to do something like this:
>>
>> - a very long
>>   description item :: here is the explanation
>>
>> This is not going to work properly with export.
>>
>
> Exactly, when description items line-wrap I'd like to preserve their
> bold face, but your export point is well take.
>
> also, thanks for pointing out the `org-description-max-indent'  
> variable,
> that will greatly help my sense of org-aesthetic. Thanks -- Eric

The easiest fix for the export problem would be modifying
auto-fill-inhibit-regexp to include lines are description
items.  But it is also a hack....

- Carsten

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

* Re: multiline description list, partial patch
  2009-09-10 16:40 ` Carsten Dominik
@ 2009-09-11 22:12   ` Sebastian Rose
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Rose @ 2009-09-11 22:12 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode

Hi Eric,


I think long descriptions are _very_ unusual (it's called "definition
list" (<dl>) in HTML and "definition term" (<dt>).

I used to do this here, before those lists were supported directly in
Org-mode:

  - *Bold longish term* \\
    Description of the bold longish term.


I bound this function to a key:


(defun sr-insert-org-dd-item ()
  (interactive)
  (let  ( (in (read-from-minibuffer "Definition list DT item: ")) )
    (newline-and-indent)
    (insert (concat "+ *" in "* \\\\"))
    (newline-and-indent)))




I remember I had to set `org-plain-list-ordered-item-terminator' to `t'
to make this work correctly.


This was added in 2008-02-25 and removed, when Carsten added the support
for the definition lists. And I never missed it.



  Sebastian

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

end of thread, other threads:[~2009-09-11 22:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-09 19:59 multiline description list, partial patch Eric Schulte
2009-09-10 16:40 ` Carsten Dominik
2009-09-11 22:12   ` Sebastian Rose
2009-09-11  3:49 ` Carsten Dominik
2009-09-11  6:03   ` Eric Schulte
2009-09-11 21:09     ` Carsten Dominik

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