[O] filter paragraph function not running

2017-06-01 Thread Samuel Wales
this is probably user error.

in md output i don't think this is being run and i am not sure why.
in odt, it doesn't work but i am not sure why.

finally, does anybody know a quick way to get paragraphs to look like
i do them instead of indenting the first line and not putting a blank
line, for pdf output?

thanks.

  (add-to-list 'org-export-filter-paragraph-functions
'alpha-org-export-===-rule--par)
  (defun alpha-org-export-===-rule--par (paragraph backend _info)
"Reverse the new exporter emphasis to get my === back as a
horizontal rule that separates paragraphs with blanks above and below."
;; runs after === is converted.  (from the code-font
;; interpretation to the backend.)
(with-no-warnings
  (cond
((and (org-export-derived-backend-p backend 'html)
  (or
   (string-match "\n=\n\n*" paragraph)
   (string-match "\n=\n\n*" paragraph)))
 "\n\n\n\n")
;; fixme notwork
((org-export-derived-backend-p backend 'md)
 (replace-string "`=`" "==="))
((org-export-derived-backend-p backend 'odt)
 ;; untested
 (replace-string "="
 "==="))
((org-export-derived-backend-p backend 'latex)
 ;; =fact re string needs , but string needs \\
 ;; (replace-regexp-in-string "hi" "there" "\\hi" t t)
 ;; (replace-regexp-in-string "hi{=}" "there" "\\hi{=}" t t)
 ;; seems to work
 (replace-regexp-in-string "texttt{=}"

"hspace{stretch{1}}rule{0.15textwidth}{0.1pt}hspace{stretch{1}}"
   ;; "centerline{rule
{0.15linewidth}{.2pt}}"
   paragraph))
((and (org-export-derived-backend-p backend 'ascii)
  (string-match "^`='$" paragraph))
 "===\n\n")
(t paragraph

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] Export to PDF - coloured TODO states and TAGS?

2017-06-01 Thread Eric S Fraga
On Thursday,  1 Jun 2017 at 08:54, Rainer Krug wrote:
> Hi
>
> If I export a document with tags and TODO states to html, the TODO
> states are nicely coloured and the tags are smaller than the other
> text.
>
> If I export to PDF, the TODO states are BOLD and the tags seem bigger
> (probably because of different font).
>
> Is it possible to have the colouring also in the pdf and possibly
> smaller fonts for the tags?

,[ C-h f org-latex-format-headline-default-function RET ]
| org-latex-format-headline-default-function is a compiled Lisp function
| in ‘ox-latex.el’.
| 
| (org-latex-format-headline-default-function TODO TODO-TYPE PRIORITY
| TEXT TAGS INFO)
| 
| Default format function for a headline.
| See ‘org-latex-format-headline-function’ for details.
| 
| [back]
`

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.7-468-g2b44a1.dirty


signature.asc
Description: PGP signature


Re: [O] Moving and resetting attachments

2017-06-01 Thread Florian Lindner
Am 01.06.2017 um 06:39 schrieb Eric Abrahamsen:
> Florian Lindner  writes:
> 
>> Hello,
>>
>> two questions about moving attachments to org files:
>>
>> C-c C-a a attaches a file and stores it under ./data/ID/...
>>
>> Using C-c C-a s I can set another directory a attachment directory.
>> Can I make org-mode move the content of the previous
>> directory to the new directory?
>>
>> Can I "reset" the attachment directory, i.e. like C-c C-a s but
>> :ATTACH_DIR: is deleted and the contents of the previous
>> directory are moved to ./data/ID?
>>
>> Rationale:
>>
>> I use org mode as a document management system. Create an entry Papers -> 
>> Interpolation -> ECCOMAS. I know create an
>> custom attachment directory ECCOMAS, next to the org file as long as I
>> am working on that paper. When it's finished, I
>> want to move the contents of the ECCOMAS attachment directory to ./data/ID/.
> 
> It doesn't work this way now, but I think it makes sense, and I would
> also find that helpful. `org-attach-set-directory' could be changed to
> check for existing files, and offer to move them. There's no
> `org-attach-unset-directory', but I suppose there could be.

Hey,

I hacked together some lines of lisp that should achieve that. It's my first 
non-trivial (from my point of trivialness)
piece of code. I'm open for any suggestions:

(defun flo/org-attach-move ()
  (interactive)
  (when (org-attach-dir)
(let ((target (read-string "Move attachments to: ")) ; read-directory-name 
here?
  (attach-dir (org-attach-dir)))

  (if (string= target "")
  (progn
(org-entry-delete nil "ATTACH_DIR")
(setq target (org-attach-dir t)))
(progn
  (org-entry-put nil "ATTACH_DIR" target)
  (make-directory target t))
)

  (unless (string= target attach-dir)
(copy-directory attach-dir target t nil t)
(message "Deleting %s" attach-dir)
;; (shell-command "rm -rf %s" attach-dir)
)
  )
)
  )


Best,
Florian




Re: [O] org to static site?

2017-06-01 Thread Rasmus
Hi,

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.

I use ox and ox-publish.  Since ox-publish can be recursive it's quite
versatile.  I use a lot of css as well.  Using special-blocks, you should
be able to make any look that you need.

> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.

On my laptop, I just keep raw org files and sometimes html files.
ox-publish converts all org files and just copy over html, css and js
files.

I push changes to gitlab which then builds the website using gitlab-ci.
Gitlab also deploys the website to my domain and works with Let’s Encrypt.

https://gitlab.com/pages/org-mode

Hope it helps,
Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




[O] Export to PDF - coloured TODO states and TAGS?

2017-06-01 Thread Rainer Krug
Hi

If I export a document with tags and TODO states to html, the TODO states are 
nicely coloured and the tags are smaller than the other text.

If I export to PDF, the TODO states are BOLD and the tags seem bigger (probably 
because of different font).

Is it possible to have the colouring also in the pdf and possibly smaller fonts 
for the tags?

Thanks,

Rainer


--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

University of Zürich

Cell:   +41 (0)78 630 66 57

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



signature.asc
Description: Message signed with OpenPGP


Re: [O] org to static site?

2017-06-01 Thread Julian M. Burgos
Hi Matt,

Recently I started to use Hugo to maintain our project's website:

http://novasarc.hafogvatn.is/

I am liking it very much. I keep the entire site in a single file, with
each page in a single subtree. Modifications to the template are also
kept in subtrees.  I edit this page directly, rather than using the hugo
tools to create content.  Then to update the site I tangle the org file
to create all the htlm files of the site, and run hugo to create the
site files that are then copied to the server.  Pretty easy.

Julian


Matt Price writes:

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.
>
> Thanks,
> Matt


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



[O] Agenda View - Table report - Granularity of time computed

2017-06-01 Thread Roland Everaert
Hi,

I have noticed that the computation of time in the agenda report (key 'R')
is based on the granularity of the functions to increment or decrements
time in a clock entry inside a logbook.

I know that this granularity can be changed and that I could set it to 1,
but why the time computation in the agenda report is influenced by that
granularity?


Regards,


Roland.


Re: [O] Set org-agenda-span per file

2017-06-01 Thread Loris Bennett
Hi Eric,

Eric S Fraga  writes:

> On Wednesday, 31 May 2017 at 05:22, Loris Bennett wrote:
>> I don't know the answer to your question, but I am interested in how you
>> are creating an org file synced from your departmental calendar.  Could
>> you share some details of the setup?
>
> What calendar system are you interested in?  The easiest way, in my
> experience, is to use an ics/ical translation script and access the
> ics/ical version of the department calendar, if such is available.  I do
> this to import appointments and TODO information from both MS outlook
> and Google calendar.
>
> I use the attached AWK script.  It has been previously posted to this
> list (many years ago) and a slightly different version is available on
> Worg, I believe.  I've been using this script for a long time and
> generally works very well.  There can be some issues with time zones and
> summer time depending on where you import from...

Thanks for the information.  I seem to remember using your script in the
past.  However, I never managed to automate pulling an ICS file from the
local Exchange server via the EWS API.  I seem to remember there was a
problem with some IIS setting that the Windows admins were unwilling to
change.  So I gave up on that and now just import meeting invites
directly from Gnus into Org using the gnus-icalendar package.

Cheers,

Loris

-- 
This signature is currently under construction.