emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to export checkboxes to odt?
@ 2021-09-28 16:46 Uwe Brauer
  2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
  0 siblings, 2 replies; 17+ messages in thread
From: Uwe Brauer @ 2021-09-28 16:46 UTC (permalink / raw)
  To: emacs-orgmode


Hi

Any idea how to export checkboxes to odt?

I mean not just simply having [ ] in the odt document but having them translated as actual boxes.

Thanks and regards

Uwe Brauer 



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

* [SOLVED] (was: how to export checkboxes to odt?)
  2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
@ 2021-09-28 20:21 ` Uwe Brauer
  2021-09-29  4:07   ` Timothy
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
  1 sibling, 1 reply; 17+ messages in thread
From: Uwe Brauer @ 2021-09-28 20:21 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:

> Hi

> Any idea how to export checkboxes to odt?

> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.

Either using latex $\boxtimes$
or   UTF8 ☒



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: how to export checkboxes to odt?
  2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
  2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
@ 2021-09-28 20:47 ` Juan Manuel Macías
  2021-09-29  6:29   ` Uwe Brauer
  1 sibling, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2021-09-28 20:47 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: orgmode

Hi Uwe,

Uwe Brauer writes:

> Any idea how to export checkboxes to odt?
>
> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.

You can try:

(defun my/org-odt--checkbox (item)
  "Return check-box string associated to ITEM."
  (let ((checkbox (org-element-property :checkbox item)))
    (if (not checkbox) ""
      (format "<text:span text:style-name=\"%s\">%s</text:span>"
	      "OrgCode" (cl-case checkbox
			  (on "\u2611 ") ; CHECK MARK
			  (off "\u2610 ")
			  (trans "[-] ")))))) ;; I don't know which character to choose here...

(advice-add 'org-odt--checkbox :override  #'my/org-odt--checkbox)

Best regards,

Juan Manuel 


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

* Re: [SOLVED] (was: how to export checkboxes to odt?)
  2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
@ 2021-09-29  4:07   ` Timothy
  2021-09-29  6:30     ` [SOLVED] Uwe Brauer
  2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
  0 siblings, 2 replies; 17+ messages in thread
From: Timothy @ 2021-09-29  4:07 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

>> Any idea how to export checkboxes to odt?
>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>
> Either using latex ⊠
> or   UTF8 ☒

I’m wondering, would this be worth adding to ox-odt?

All the best,
Timothy

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

* Re: how to export checkboxes to odt?
  2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
@ 2021-09-29  6:29   ` Uwe Brauer
  2021-09-29  7:02     ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer
  0 siblings, 1 reply; 17+ messages in thread
From: Uwe Brauer @ 2021-09-29  6:29 UTC (permalink / raw)
  To: emacs-orgmode


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

>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:

Hi Juan,

> Hi Uwe,
> Uwe Brauer writes:

>> Any idea how to export checkboxes to odt?
>> 
>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.

> You can try:

> (defun my/org-odt--checkbox (item)
>   "Return check-box string associated to ITEM."
>   (let ((checkbox (org-element-property :checkbox item)))
>     (if (not checkbox) ""
>       (format "<text:span text:style-name=\"%s\">%s</text:span>"
> 	      "OrgCode" (cl-case checkbox
> 			  (on "\u2611 ") ; CHECK MARK
> 			  (off "\u2610 ")
> 			  (trans "[-] ")))))) ;; I don't know which character to choose here...

> (advice-add 'org-odt--checkbox :override  #'my/org-odt--checkbox)

Thanks very much, I saw it too late to respond yesterday. A couple of remarks

    1. (on "\u2611 ") ; CHECK MARK: I rather prefer 2612 but this is a
       question of taste

    2. It seems not to work, I loaded the function and Executed the
       advice, but 

When I tried to export this minimal example

* Check the conversion of checkboxes


    1. Latex $\boxtimes$

    2. UTF8 ☒,   ▢ □

    3. Org   [ ] and   [X]

    4. Org [] [-]

I obtained a odt file in which 3 and 4 were *not* converted to UTF8. I
attach the file. What do I miss?

Regards

Uwe 


[-- Attachment #1.2: checkbox.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 12057 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: [SOLVED]
  2021-09-29  4:07   ` Timothy
@ 2021-09-29  6:30     ` Uwe Brauer
  2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
  1 sibling, 0 replies; 17+ messages in thread
From: Uwe Brauer @ 2021-09-29  6:30 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "T" == Timothy  <tecosaur@gmail.com> writes:

> Hello,
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>> 
>> Either using latex ⊠
>> or   UTF8 ☒

> I’m wondering, would this be worth adding to ox-odt?

I think Juan's solution would be nice, however it does not work for me write now, so I have to see what is wrong with it.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* [misunderstanding] (was: how to export checkboxes to odt?)
  2021-09-29  6:29   ` Uwe Brauer
@ 2021-09-29  7:02     ` Uwe Brauer
  0 siblings, 0 replies; 17+ messages in thread
From: Uwe Brauer @ 2021-09-29  7:02 UTC (permalink / raw)
  To: emacs-orgmode

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



> Hi Juan,




> Thanks very much, I saw it too late to respond yesterday. A couple of remarks

>     1. (on "\u2611 ") ; CHECK MARK: I rather prefer 2612 but this is a
>        question of taste

>     2. It seems not to work, I loaded the function and Executed the
>        advice, but 

I just want to clarify, that your code works.
I realized that I used the word checkbox not a the strict org mode sense.
Sorry for the confusion!

Thanks for your code

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: [SOLVED] (was: how to export checkboxes to odt?)
  2021-09-29  4:07   ` Timothy
  2021-09-29  6:30     ` [SOLVED] Uwe Brauer
@ 2021-09-29 11:02     ` Max Nikulin
  2021-09-30 15:39       ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
  1 sibling, 1 reply; 17+ messages in thread
From: Max Nikulin @ 2021-09-29 11:02 UTC (permalink / raw)
  To: emacs-orgmode

On 29/09/2021 11:07, Timothy wrote:
> 
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>>
>> Either using latex ⊠
>> or   UTF8 ☒
> 
> I’m wondering, would this be worth adding to ox-odt?

LibreOffice has some object called "checkbox" that could be inserted 
using "Form Controls" toolbar. I have never used this feature, so unsure 
whether it is a proper representation for Org checkboxes.



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

* [checkbox in tables] (was: [SOLVED])
  2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
@ 2021-09-30 15:39       ` Uwe Brauer
  0 siblings, 0 replies; 17+ messages in thread
From: Uwe Brauer @ 2021-09-30 15:39 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "MN" == Max Nikulin <manikulin@gmail.com> writes:

> On 29/09/2021 11:07, Timothy wrote:
>> 
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>>> 
>>> Either using latex ⊠
>>> or   UTF8 ☒
>> I’m wondering, would this be worth adding to ox-odt?

> LibreOffice has some object called "checkbox" that could be inserted
> using "Form Controls" toolbar. I have never used this feature, so
> unsure whether it is a proper representation for Org checkboxes.

I should add, that I need to generate an odt document, in which checkboxes are placed in tables, a feature that is not supported by org mode as of today, unfortunately.


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: [SOLVED]
  2021-12-29  8:06         ` [SOLVED] Uwe Brauer
@ 2021-12-29  8:18           ` Ihor Radchenko
  0 siblings, 0 replies; 17+ messages in thread
From: Ihor Radchenko @ 2021-12-29  8:18 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> So if I understand you correctly. I do load my org package too late for
> org-real?

I think so. My speculation:

If the newest Org is not yet in load-path when you load org-real,
org-real's (require 'org) will pull-in built-in version of org-compat.

Later, when load-path points to the newest version of Org, you load
org-persist (org-persist does not exist in built-in version of Org),
which relies on org-file-name-concat to be defined in the newest version
of org-compat. However, built-in version of org-compat is already loaded
by emacs and (require 'org-compat) inside org-persist does not trigger
loading. Hence, you are getting

> Debugger entered--Lisp error: (void-function org-file-name-concat)

Best,
Ihor


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

* Re: [SOLVED]
  2021-12-29  5:11       ` [SOLVED] Ihor Radchenko
@ 2021-12-29  8:06         ` Uwe Brauer
  2021-12-29  8:18           ` [SOLVED] Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: Uwe Brauer @ 2021-12-29  8:06 UTC (permalink / raw)
  To: emacs-orgmode

>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>>> Hmm. I suspect that org-real might not be the problem by itself.
>>> Rather you may load it too early and pull-in built-in org.
>> 
>> Well I don't load anything, that is all done by the package system.

> I was just guessing. But do you really have init.el with no requires?

I have a lot of requires in my init file, but non for org-real besides I
have installed a lot of org addons from MELPA and none have caused me
any problem.

So if I understand you correctly. I do load my org package too late for
org-real?

Regards

Uwe 



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

* Re: [SOLVED]
  2021-12-28 17:28     ` [SOLVED] Uwe Brauer
@ 2021-12-29  5:11       ` Ihor Radchenko
  2021-12-29  8:06         ` [SOLVED] Uwe Brauer
  0 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2021-12-29  5:11 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

>> Hmm. I suspect that org-real might not be the problem by itself. Rather
>> you may load it too early and pull-in built-in org.
>
> Well I don't load anything, that is all done by the package system.

I was just guessing. But do you really have init.el with no requires?

Best,
Ihor


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

* Re: [SOLVED]
  2021-12-28 14:49   ` Ihor Radchenko
@ 2021-12-28 17:28     ` Uwe Brauer
  2021-12-29  5:11       ` [SOLVED] Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: Uwe Brauer @ 2021-12-28 17:28 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> I found the culprit, the recently installed org-real pkg.
>> 
>> I uninstalled it and everything was back to normally.

> Hmm. I suspect that org-real might not be the problem by itself. Rather
> you may load it too early and pull-in built-in org.

Well I don't load anything, that is all done by the package system.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: [SOLVED]
  2019-12-11 22:20   ` John Kitchin
@ 2019-12-12  8:13     ` Uwe Brauer
  0 siblings, 0 replies; 17+ messages in thread
From: Uwe Brauer @ 2019-12-12  8:13 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "JK" == John Kitchin <jkitchin@andrew.cmu.edu> writes:

> That is the default value of that variable. I guess you had set it
> elsewhere to be getting citep before.

Right, moreover in some obscure place which was not easy to find, and
the setting was also not commented, so it unclear to me why I did this.

Bad bad practise.

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

* Re: [SOLVED]
  2018-11-29 17:27   ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
@ 2018-11-29 22:20     ` Nick Dokos
  0 siblings, 0 replies; 17+ messages in thread
From: Nick Dokos @ 2018-11-29 22:20 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

>>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
>
>    > I cannot reproduce your export issue with org 9.1.14.
>    > You need to provide more details.
>
> Sorry for the noise. I just realised that a very very long time ago I
> installed a function  remove-src-blk-export, which, uhh, removes source
> blocks. 
>
> I removed that function and everything works as expected.

I was going to ask who produced that unfamiliar-looking "%% [removed
source block]" :-) Glad you figured it out.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler

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

* Re: [SOLVED]
  2018-04-04 13:25 ` [SOLVED] (was: export table to html, don't display certain columns) Uwe Brauer
@ 2018-04-04 13:29   ` Uwe Brauer
  0 siblings, 0 replies; 17+ messages in thread
From: Uwe Brauer @ 2018-04-04 13:29 UTC (permalink / raw)
  To: emacs-orgmode




   > To answer my own question

   > | / | /     |     |       | /   |
   > |   | Name  | Res | Letra | Obs |
   > |---+-------+-----+-------+-----|
   > |   | Smith |   0 |       |     |
   > |   | Jones | 1.4 |       |     |
   > |   | Bond  | 5.6 | *     |     |

   > All columns starting with / are ignored when exporting. Sorry for the
   > noise and the double posting.


That is not entirely correct. Someone (I forgot who it was, sorry)
provided me with the following hack


(add-hook 'org-export-before-processing-hook
           'f-ox-filter-table-column-del)


(defun f-ox-filter-table-column-del (back-end)
   "Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1.
 If you want a non-empty column $1 to be deleted make it $2 by
 inserting an empty column before or rearrange column order in
 some other way. Make sure \"/\" is in $1 again after that."
   (while (re-search-forward
           "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t)
     (goto-char (match-beginning 2))
     (org-table-delete-column)
     (beginning-of-line)))


That is very useful and I wonder why there is nothing in org vanilla
(but then it might and I did not find it.)

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

* Re: [SOLVED]
  2018-03-09 21:49                   ` [SOLVED] (was: how do you compose mails in Gnus with org-mode) Uwe Brauer
@ 2018-03-09 22:59                     ` Thorsten Jolitz
  0 siblings, 0 replies; 17+ messages in thread
From: Thorsten Jolitz @ 2018-03-09 22:59 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

>    > Uwe Brauer <oub@mat.ucm.es> writes:
>
>    > When I do M-# # writing this mail I see:
>    > ,----
>    > | [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit
>    > | with M-#
>    > | (Meta-Key and #)
>    > | * --text follows this line--
>    > | Uwe Brauer <oub@mat.ucm.es> writes: ...[]
>    > `----
>
>
> I found the culprit
>
> (setq message-yank-prefix "   > ")
>
> No idea why I had this, but may be it is ages there. Just moving it out
> my init files and everything worked as expected. Thanks

Ok, good ... ;-)

-- 
cheers,
Thorsten

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

end of thread, other threads:[~2021-12-29  8:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
2021-09-29  4:07   ` Timothy
2021-09-29  6:30     ` [SOLVED] Uwe Brauer
2021-09-29 11:02     ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
2021-09-30 15:39       ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
2021-09-29  6:29   ` Uwe Brauer
2021-09-29  7:02     ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer
  -- strict thread matches above, loose matches on Subject: below --
2021-12-28 13:41 [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)] Uwe Brauer
2021-12-28 13:53 ` [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]) Uwe Brauer
2021-12-28 14:49   ` Ihor Radchenko
2021-12-28 17:28     ` [SOLVED] Uwe Brauer
2021-12-29  5:11       ` [SOLVED] Ihor Radchenko
2021-12-29  8:06         ` [SOLVED] Uwe Brauer
2021-12-29  8:18           ` [SOLVED] Ihor Radchenko
2019-12-11 21:50 org-ref-insert-cite-link inserts citep Uwe Brauer
2019-12-11 21:58 ` [SOLVED] (was: org-ref-insert-cite-link inserts citep) Uwe Brauer
2019-12-11 22:20   ` John Kitchin
2019-12-12  8:13     ` [SOLVED] Uwe Brauer
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
2018-11-29 16:32 ` Berry, Charles
2018-11-29 17:27   ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
2018-11-29 22:20     ` [SOLVED] Nick Dokos
2018-04-04  9:08 export table to html, don't display certain columns Uwe Brauer
2018-04-04 13:25 ` [SOLVED] (was: export table to html, don't display certain columns) Uwe Brauer
2018-04-04 13:29   ` [SOLVED] Uwe Brauer
2018-03-01 13:37 how do you compose mails in Gnus with org-mode Joseph Vidal-Rosset
2018-03-03 11:57 ` Thorsten Jolitz
2018-03-06 10:12   ` Uwe Brauer
2018-03-06 18:24     ` Thorsten Jolitz
2018-03-06 19:01       ` Uwe Brauer
2018-03-06 19:36         ` Thorsten Jolitz
2018-03-07  9:57           ` Uwe Brauer
2018-03-07 17:46             ` Thorsten Jolitz
2018-03-08  8:50               ` Uwe Brauer
2018-03-08 16:58                 ` Thorsten Jolitz
2018-03-09 21:49                   ` [SOLVED] (was: how do you compose mails in Gnus with org-mode) Uwe Brauer
2018-03-09 22:59                     ` [SOLVED] Thorsten Jolitz

Code repositories for project(s) associated with this 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).