Re: [O] ox-odt: List items contain body paragraphs, confusing styles

2017-08-17 Thread James Harkins
  On Thu, 17 Aug 2017 10:33:29 -0400 Nicolas Goaziou 
 wrote  
 > So, what style-name should have the inner paragraph? If it is a new 
 > style, what would be its definition? 
 >  
 > It's not difficult to check, upon exporting a paragraph, if it belongs 
 > to a list item or not: (org-element-lineage paragraph '(item)) 
 >  
 > BTW, is it different for nested paragraphs, e.g., what should be the 
 > style for the following 3 paragraphs: 
 >  
 >   - para 1 
 >  
 > para 2 
 >  
 > - para 3 

Hm. Good question.

I'm going to admit to a bit of frustration now... after about 45 minutes poking 
around in XML, I did a fresh ox-odt test with a fresh style sheet, and I can't 
reproduce the problem. !!! Hours, over the last two days, wasted.

So I must have done something funky to that initial stylesheet. (WYSIWYG tools, 
who knows what it could be. Really teed off at that journal for not allowing 
LaTeX.)

So I would say, postpone this issue unless I can gather more evidence.

A short answer to your questions is that every list item does consist of 
paragraphs, and each paragraph must have a paragraph style, but -- the 
paragraph style can be the same one, even at different list levels. There is no 
need for a different paragraph style for each list level, and you don't have to 
do anything special for multiple paragraphs within a list item.

hjh




Re: [O] Table formula reference and macro replacement

2017-08-17 Thread Vikas Rawal
> 
> You could try:
> 
> --8<---cut here---start->8---
> #+macro: remote src_emacs-lisp{(org-table-get-remote-range "$1" "$2")}
> 
> Example:
> 
> #+name: foo
> | 1 | 2 |
> | 3 | 4 |
> 
> The macro call: {{{remote(foo, @1$2)}}}
> --8<---cut here---end--->8—
> 

Beautiful!

Vikas





Re: [O] Firefox extension "Org-capture" stopped working after update

2017-08-17 Thread Adam Porter
Colin Baxter  writes:

Hi Colin,

> You can also launch conkeror using palemoon, and this looks like the
> future.

Thanks, I have heard of conkeror but never got around to trying it.  I'm
not sure what you mean about launching it from palemoon though.  Why
would you do that?





Re: [O] Display inline images for shortcuts links

2017-08-17 Thread Fabrice Popineau
2017-08-17 15:59 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> I simply extended the link search to all link abbrevs, discarding those
> that do not ultimately match a file.
>
> Does it solve your issue?
>
>
Yes thanks. Much lighter.

I like link abbreviations, because they allow to change the reference point
where the files are stored (if needed some day)

Regards,

Fabrice


Re: [O] [PATCH] org-agenda: Add 'none setting for org-agenda-overriding-header

2017-08-17 Thread Adam Porter
Nicolas Goaziou  writes:

> What about "fixing" the empty string case, i.e., not inserting a blank
> line when set to the empty string?

Hi Nicolas,

I almost did that, making it not insert a header if it was set to an
empty string, but I thought that this approach gives more flexibility,
allowing users to insert a blank header if they want.  But if you would
prefer it that way, I'll adjust the patch.  Let me know.

Thanks,
Adam




Re: [O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-17 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Hello,
>
> Tobias Schlemmer  writes:
>
>> for some reasons I need to control the visibility of individual entries
>> of my caldav calendars. I have implemented a small patch that passes the
>> `CLASS' propery to the iCalendar export:
>>
>> https://github.com/keinstein/org-mode/pull/1
>>
>> I'd like to have this patch integrated in the short term. It is mostly
>> done by cut and paste from the same file.
>
> Thank you!
>
> Could you send a patch on this mailing list using git's "format-patch"
> sub-command?
>
> Also, could you document the feature in org.texi.
>
>> For long term I think a configurable framework would be more useful:
>>
>> • It would be helpful to have a configuration variable that tells which
>> properties are passed more or less verbatim as iCalendar fields
>
> This doesn't sound too hard, if you have a list of such properties and
> are willing to document them.

Hey, now's the time to bring up something I've wanted to do for a while:
adding support for per-entry timezones to the ical export. I've attached
a draft patch that shows what I mean. Basically you give an entry a
TIMEZONE property in the tz database format (eg "Europe/London") and it
will pass that on to the DTSTART/DTEND properties.

I suppose it would also be possible to have separate properties for
start and end timezones, then we could do plane trips!

Further work would be necessary to pass this through org-caldav
correctly, but it's a first step.

If this works out, I'll do a proper commit with docs and all that.

Eric

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index ba7a62f8b..a955469b5 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -341,7 +341,7 @@ A headline is blocked when either
 		   (1- (length org-icalendar-date-time-format))) ?Z))
 
 (defvar org-agenda-default-appointment-duration) ; From org-agenda.el.
-(defun org-icalendar-convert-timestamp (timestamp keyword &optional end utc)
+(defun org-icalendar-convert-timestamp (timestamp keyword &optional end tz)
   "Convert TIMESTAMP to iCalendar format.
 
 TIMESTAMP is a timestamp object.  KEYWORD is added in front of
@@ -352,8 +352,11 @@ Also increase the hour by two (if time string contains a time),
 or the day by one (if it does not contain a time) when no
 explicit ending time is specified.
 
-When optional argument UTC is non-nil, time will be expressed in
-Universal Time, ignoring `org-icalendar-date-time-format'."
+When optional argument TZ is non-nil, timezone data time will be
+added to the timestamp.  It can be the string \"UTC\", to use UTC
+time, or a string in the IANA TZ database
+format (e.g. \"Europe/London\").  In either case, the value of
+`org-icalendar-date-time-format' will be ignored."
   (let* ((year-start (org-element-property :year-start timestamp))
 	 (year-end (org-element-property :year-end timestamp))
 	 (month-start (org-element-property :month-start timestamp))
@@ -387,8 +390,9 @@ Universal Time, ignoring `org-icalendar-date-time-format'."
 (concat
  keyword
  (format-time-string
-  (cond (utc ":%Y%m%dT%H%M%SZ")
+  (cond ((string-equal tz "UTC") ":%Y%m%dT%H%M%SZ")
 	((not with-time-p) ";VALUE=DATE:%Y%m%d")
+	((stringp tz) (concat ";TZID=" tz ":%Y%m%dT%H%M%S"))
 	(t (replace-regexp-in-string "%Z"
 	 org-icalendar-timezone
 	 org-icalendar-date-time-format
@@ -396,7 +400,10 @@ Universal Time, ignoring `org-icalendar-date-time-format'."
   ;; Convert timestamp into internal time in order to use
   ;; `format-time-string' and fix any mistake (i.e. MI >= 60).
   (encode-time 0 mi h d m y)
-  (and (or utc (and with-time-p (org-icalendar-use-UTC-date-time-p)))
+  (and (or (string-equal tz "UTC")
+	   (and (null tz)
+		with-time-p
+		(org-icalendar-use-UTC-date-time-p)))
 	   t)
 
 (defun org-icalendar-dtstamp ()
@@ -545,7 +552,8 @@ inlinetask within the section."
 			  contents 0 (min (length contents)
 	  org-icalendar-include-body
 		  (org-icalendar-include-body (org-trim contents)))
-	 (cat (org-icalendar-get-categories entry info)))
+	 (cat (org-icalendar-get-categories entry info))
+	 (tz (org-element-property :TIMEZONE entry)))
 	 (concat
 	  ;; Events: Delegate to `org-icalendar--vevent' to generate
 	  ;; "VEVENT" component from scheduled, deadline, or any
@@ -556,14 +564,14 @@ inlinetask within the section."
 		   org-icalendar-use-deadline)
 		 (org-icalendar--vevent
 		  entry deadline (concat "DL-" uid)
-		  (concat "DL: " summary) loc desc cat)))
+		  (concat "DL: " summary) loc desc cat tz)))
 	  (let ((scheduled (org-element-property :scheduled entry)))
 	(and scheduled
 		 (memq (if todo-type 'event-if-todo 'event-if-not-todo)
 		   org-icalendar-use-scheduled)
 		 (org-icalendar--vevent
 		  entry scheduled (concat "SC-" uid)
-		  (concat "S: " summary) loc desc cat)))
+		  (concat "S: " summary) loc desc cat tz)))
 	  ;; When collecting plain timestamps fr

Re: [O] Using Book class without 'parts' for Org-mode Export

2017-08-17 Thread lists

On 2017-08-16 18:02, R Jain wrote:

Hi Ian,

Thanks for the reply. The part which I'm tripping over is:

#+latex: \chapterauthor{by Mike Anderson}

(add-to-list 'org-latex-classes
  '("koma-book"
 "\\documentclass{scrbook}"
 ("\\chapter{%s}" . "\\chapter{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 )
 )

Where should I add this definition?



I have it in my init file in ~/.emacs.d. I use babel to tangle the file.

Ian.



[O] counter macro in dates?

2017-08-17 Thread Matt Price
I'd love to be able generate dates dynamically using the {{{n}}} org macro,
or some other mechanism.  I don't immediately see how that would be
possible but maybe someone can guide me.  I'd want to do something
equivalent to this pseudo-elisp:

(let ((base-date 2017-09-05))
  (+ base-date (* 7 {{{n}}}))

I haven't looked into how date objects are parsed in org-mode, though, so I
have no idea how hard it would be to actually implement something like
this.

Thank you everyone!


Re: [O] Slides with columns export problem

2017-08-17 Thread Nicolas Goaziou
Hello,

Stéphane Genaud  writes:

> i am using org-mode 8.2.10 to export to a beamer tex source. 
> When running pdflatex my org-mode source file, and once i finally isolated 
> the problematic bit in a single frame, pdflatex says: 
>
> [1{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map}])
> Runaway argument?
> \let \AtEndDocument \@firstofone \@enddocumenthook \@checkend {docume\ETC.
> ! File ended while scanning use of \beamer@collect@@body.
>  
> \par 
> <*> simple.tex
>
>
> The problematic frame is:
> ---
>
> ** Kernel Roles
> *** Roles :B_column:
> :PROPERTIES:
> :BEAMER_env: block
> :BEAMER_col: 0.5


> :BEAMER_envargs: <2->
> :END:
> - Program Execution
> - File Maagement
> - I/O Management
> - Communication
> - Protection & Security
> - Accounting
> - Resource Allocation
> *** Image: What does it do?   :B_column:
> :PROPERTIES:
> :BEAMER_env: ignoreheading
> :BEAMER_col: 0.5

The two properties above are incompatible.

Regards,

-- 
Nicolas Goaziou



[O] Firefox webextension for org capture

2017-08-17 Thread Alex Branham
Hi all -

Apologies for not replying to the right thread; I couldn't figure out how to 
since I'm not subscribed to the list.

There already exists a Firefox webextension for org capture. Here is the github 
page:  https://github.com/sprig/org-capture-extension

And here is the link to AMO: 
https://addons.mozilla.org/en-US/firefox/addon/org-capture/

Note that there is currently a bug that prevents the keyboard shortcut from 
working. I think that will be fixed within the next week or two.

Also, Mozilla's implementation of webextensions isn't finished yet, so you 
cannot currently change the (nonworking) keyboard shortcut. When it starts 
working again, the default is control-shift-l

Alex



[O] Slides with columns export problem

2017-08-17 Thread Stéphane Genaud
Hello,
i am using org-mode 8.2.10 to export to a beamer tex source. 
When running pdflatex my org-mode source file, and once i finally isolated 
the problematic bit in a single frame, pdflatex says: 

[1{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map}])
Runaway argument?
\let \AtEndDocument \@firstofone \@enddocumenthook \@checkend {docume\ETC.
! File ended while scanning use of \beamer@collect@@body.
 
\par 
<*> simple.tex


The problematic frame is:
---

** Kernel Roles
*** Roles   :B_column:
:PROPERTIES:
:BEAMER_env: block
:BEAMER_col: 0.5
:BEAMER_envargs: <2->
:END:
- Program Execution
- File Maagement
- I/O Management
- Communication
- Protection & Security
- Accounting
- Resource Allocation
*** Image: What does it do? :B_column:
:PROPERTIES:
:BEAMER_env: ignoreheading
:BEAMER_col: 0.5
:END:

#+LABEL:fig:kernel-roles
#+ATTR_LaTeX: width=0.8\linewidth
#+ATTR_HTML: width="80%"
[[file:fig/kernel-roles.png]]
—

for which the tex-beamer export produces:

---
\begin{frame}[label=sec-2-6]{Kernel Roles}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{block}{Roles}
\begin{itemize}
\item Program Execution
\item File Management
\item I/O Management
\item Communication
\item Protection \& Security
\item Accounting
\item Resource Allocation
\end{itemize}
\end{block}
\end{column}


\begin{center}
\includegraphics[width=.9\linewidth]{fig/kernel-roles.png}
\end{center}
\end{frame}
—

Here, a second \begin{column}…\end{column} is missing.
I have successfully used this construct in other presentations.
 
I have tried plenty of variations but i do not really understand what 
will trigger/not trigger the creation of a second  \begin{column}…\end{column}.
The org-mode example related to this page setup in the documentation 
(http://orgmode.org/worg/exporters/beamer/tutorial.html#orgdaf54b2) does not
explain much apart from the specific example given.

Any help to understand how the exporter works would be appreciated.

Thanks.
 
—Stéphane.


 



Re: [O] Bug: Deleting region in table [9.0.8 (9.0.8-dist @ /Users/nick/.emacs.d/lisp/org/)]

2017-08-17 Thread Nicolas Goaziou
Hello,

Nick Helm  writes:

> Deleting a region within an org table causes point to jump.
>
> Recipe:
>
>   Emacs -Q
>   org-mode
>
>   ;make a table
>   | this is a simple | table |
>
>   double-click "simple" ;place region over a word
>   
>
> With the last command, I expect the word "simple" to be deleted, the
> right-hand "|" separator (and following column) to close up six chars,
> and point to end up to the right of "a ".
>
> Note however that point winds up in the middle of the next column over
> the word "table". Or, more precisely, one screen column to the left of
> where it started. An additional space is also inserted in the first
> column.
>
> I had a look at org.el and I think this occurs because the function
> `org-delete-backward-char' (which my system calls by default to delete
> text in a table) is unaware of the region and treats the case above as a
> single char backwards delete.

Good catch!

Fixed. Thank you for the report and the analysis.

Regards,

-- 
Nicolas Goaziou



Re: [O] Patch that enables visibility settings in org-mode iCalendar export

2017-08-17 Thread Nicolas Goaziou
Hello,

Tobias Schlemmer  writes:

> for some reasons I need to control the visibility of individual entries
> of my caldav calendars. I have implemented a small patch that passes the
> `CLASS' propery to the iCalendar export:
>
> https://github.com/keinstein/org-mode/pull/1
>
> I'd like to have this patch integrated in the short term. It is mostly
> done by cut and paste from the same file.

Thank you!

Could you send a patch on this mailing list using git's "format-patch"
sub-command?

Also, could you document the feature in org.texi.

> For long term I think a configurable framework would be more useful:
>
> • It would be helpful to have a configuration variable that tells which
> properties are passed more or less verbatim as iCalendar fields

This doesn't sound too hard, if you have a list of such properties and
are willing to document them.

> • It would be helpful to save some/all other fields with some prefix
> (X-ORG-MODE-…) in the calendar file/service. The prefix should be
> configurable as well as the list of saved properties.

What use-case do you have in mind ?

> • A mapping between org-mode properties and iCalendar fields could be
> helpful. Together with some default action all of the above could be
> realized with only two variables.

Could you elaborate a bit?


Regards,

-- 
Nicolas Goaziou



Re: [O] babel, matlab export plot to png fails

2017-08-17 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > On Wednesday, 16 Aug 2017 at 12:33, Uwe Brauer wrote:
   > [...]

   >> BTW Eric, thanks for your reply, but a lot of your posts seem to be
   >> outside the thread, at least when I read them via gnus or thunderbird.
   >> Not sure who is the culprit.

   > Does this one thread better?

Definitely! Both in gnus and in thunderbird.




[O] Issue with org-super-agenda and %%diary

2017-08-17 Thread Robert Horn

I want to have sunrise and sunset in my time grid.  I do this with two lines 
with "%%(diary-sunrise)" and "%%(diary-sunset)" in them.

With the regular org-agenda this works, e.g.,

  18:00.. 
  weather:19:42.. Sunset (EDT) :weather:
  20:00.. 

but with org-super-agenda it does not work.  The weather line is not in the 
grid.

  18:00.. 
  20:00.. 

I can add a tag criteria, but then the weather line comes after the grid:
  
  18:00.. 
  20:00.. 
  weather:19:42.. Sunset (EDT) :weather:

>From looking at the lisp, it appears that org-super expects that time grid to 
>be tagged with a text property.  Org-agenda seems to set the text property, 
>but it's sufficiently complex that I don't really understand the code.  I 
>think the problem is that by the time the results reach org-super-agenda this 
>property is not there for the sunrise/sunset lines.

It could be that it's never set for the special case of lisp execution like 
"%%(diary-sunset)" or that it is set, used by org-agenda, and then cleared.

I would like clues about where to look and/or how to fix this.

R Horn
rjh...@alum.mit.edu



Re: [O] ox-odt: List items contain body paragraphs, confusing styles

2017-08-17 Thread Nicolas Goaziou
Hello,

James Harkins  writes:

> Hi, haven't been active here for a while (which is a good thing -- it means I 
> haven't had any problems worth mentioning!).
>
> Now I have one -- ODT export encodes list items as a list-item containing a 
> "text:p":
>
> 
> 
>
> blah blah
>
> 
> 
>
> When LibreOffice reads this, it applies indentation settings from the
> Text_20_body paragraph style to the list item. So, for instance, if
> you're writing for a journal that requires a .doc and it also requires
> paragraphs to be first-line indented, it becomes impossible to have
> hanging bullets in bullet lists -- the list outdents the bullet by
> 0.25" but the paragraph style then indents this by 0.5" for a net
> indent of 0.25".
>
> ask.libreoffice.org says "It is usually preferable to make paragraph
> styles formatting lists independent from bulk text styles"[1] -- i.e.,
> applying the same style to a list-item paragraph as to a free-standing
> paragraph is not recommended.
>
> I can guess structurally why this occurs -- I suppose org parses it as
> a list-item node containing a paragraph node, and the paragraph node
> is encoded first, without any knowledge of its context.

So, what style-name should have the inner paragraph? If it is a new
style, what would be its definition?

It's not difficult to check, upon exporting a paragraph, if it belongs
to a list item or not: (org-element-lineage paragraph '(item))

BTW, is it different for nested paragraphs, e.g., what should be the
style for the following 3 paragraphs:

  - para 1

para 2

- para 3

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-agenda: Add 'none setting for org-agenda-overriding-header

2017-08-17 Thread Nicolas Goaziou
Hello,

Adam Porter  writes:

> This patch adds a 'none setting for org-agenda-overriding-header, which
> allows it to be disabled completely, rather than inserting a blank line
> as it does when set to an empty string.

Thank you.

What about "fixing" the empty string case, i.e., not inserting a blank
line when set to the empty string?

Regards,

-- 
Nicolas Goaziou



Re: [O] Table formula reference and macro replacement

2017-08-17 Thread Nicolas Goaziou
Hello,

Vikas Rawal  writes:

> The idea is to pick contents of a table cell and use it in a paragraph.
>
> Is it possible to have a macro like {{{remote(NAME-OR-ID,REF)}}} ?
>
> The above does not work, but am I missing something?

You could try:

--8<---cut here---start->8---
#+macro: remote src_emacs-lisp{(org-table-get-remote-range "$1" "$2")}

Example:

#+name: foo
| 1 | 2 |
| 3 | 4 |

The macro call: {{{remote(foo, @1$2)}}}
--8<---cut here---end--->8---

Regards,

-- 
Nicolas Goaziou



Re: [O] html export: pre.src support changed?

2017-08-17 Thread Nicolas Goaziou
Hello,

Jarmo Hurri  writes:

> Greetings again.
>
> Due to the flurry of responses to this thread (like, zero), I will make
> a suggestion:
>
> Could we reinstate pre.src by including the src class into pre tags as
> well? That is, whereas we now have in the new export
>
> 

Re: [O] Display inline images for shortcuts links

2017-08-17 Thread Nicolas Goaziou
Hello,

Fabrice Popineau  writes:

> Would it be possible to enable inline images for shortcuts links ?
> Currently, the function `org-display-inline-images' checks for a hard coded
> file: link.
> In the case of :
>
> #+LINK: temp file:c:/temp/%h
>
> [[file:cover.jpg]]
>
> [[temp:cover.jpg]]
>
> The first link will be matched, but not the second one.
> (Unless I missed something?)

Fixed, in master.

> A small patch like the one attached enables to display inline images for
> all links.
> But maybe relying on the org-element API is not the smarter move here.

org-element API is already used in the function (e.g.,
`org-element-property' ...). However `org-element-parse-buffer' is a bit
heavy for the task, in particular in the supposedly common case where
inline image are not the most common link type throughout the buffer.

I simply extended the link search to all link abbrevs, discarding those
that do not ultimately match a file.

Does it solve your issue?

Regards,

-- 
Nicolas Goaziou



Re: [O] tags-todo error with #+FILETAGS: enseignement

2017-08-17 Thread Nicolas Goaziou
Hello,

Julien Cubizolles  writes:

> When an entry inherits a tag from a #+FILETAGS: line, all its parents
> get matched by a tags-todo agenda, even when they don't have a todo
> keyword.
>
> Consider the following:
>
> (setq org-agenda-files '("/home/wilk/tmp/test-org/test-todo.org"))
> (setq org-agenda-custom-commands
>   (quote (
> ("wt" "Boulot"
>  (
>   (tags-todo "enseignement")
>   )
>  )
> )))
> (org-agenda)
>
>
> with the following test-todo.org :
>
> #+FILETAGS: enseignement * Contenu ** TODO Cours électrocinétique
>
> The agenda called by "org-agenda w t" displays the "Cours
> électrocinétique" (as it should) but also the "Contenu" even though it
> doesn't have a TODO keyword.
>
> The offending commit is:
>
> commit 942b6267a09e167ad3a546e83205601aa5c0704e
> Author: Nicolas Goaziou 
> Date:   Tue Apr 18 11:55:27 2017 +0200
> org-agenda: `tags-todo' command type includes DONE keywords

Indeed. The solution is not correct. I reverted the commit above.

However, the initial problem the previous patch attempted to fix is
still open. As a consequence, I changed `org-scan-tags' so it also
includes DONE keywords. You can filter these out with "/!" matcher
syntax.

We'll see how it goes.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] html export: pre.src support changed?

2017-08-17 Thread Jarmo Hurri

Greetings again.

Due to the flurry of responses to this thread (like, zero), I will make
a suggestion:

Could we reinstate pre.src by including the src class into pre tags as
well? That is, whereas we now have in the new export


[O] Display inline images for shortcuts links

2017-08-17 Thread Fabrice Popineau
Would it be possible to enable inline images for shortcuts links ?
Currently, the function `org-display-inline-images' checks for a hard coded
file: link.
In the case of :


#+LINK: temp file:c:/temp/%h

[[file:cover.jpg]]

[[temp:cover.jpg]]

The first link will be matched, but not the second one.
(Unless I missed something?)

A small patch like the one attached enables to display inline images for
all links.
But maybe relying on the org-element API is not the smarter move here.

( I voluntarily kept the old lines commented in the patch. )

Regards,

Fabrice

diff --git a/lisp/org.el b/lisp/org.el
index b05eac57e..0b45ecec2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19398,9 +19398,12 @@ boundaries."
 (org-with-wide-buffer
  (goto-char (or beg (point-min)))
  (let ((case-fold-search t)
-  (file-extension-re (image-file-name-regexp)))
-   (while (re-search-forward "[][]\\[\\(?:file\\|[./~]\\)" end t)
-(let ((link (save-match-data (org-element-context
+  (file-extension-re (image-file-name-regexp))
+   (parse-tree (org-element-parse-buffer)))
+   (org-element-map parse-tree 'link
+ (lambda (link)
+   ;; (while (re-search-forward "[][]\\[\\(?:file\\|[./~]\\)" end
t)
+   ;;  (let ((link (save-match-data (org-element-context))
;; Check if we're at an inline image.
(when (and (equal (org-element-property :type link) "file")
   (or include-linked


Re: [O] Tracking Interruptions -- Work Flow Question

2017-08-17 Thread Michal Politowski
On Sun, 13 Aug 2017 02:02:00 +, Raymond Zeitler wrote:
> Does anyone schedule and "org-clock" interruptions?  I really need to 
> quantify how much of a drain they are to my productivity.
> I thought I'd include a generic "** TODO Interruption" in my todo.org (or an 
> inter.org file) and schedule it every day.  Then I'd press "I" every time I 
> get interrupted and perhaps tag it with a special term.
> Or I suppose I could use a capture template just for interruptions.
> What do you suggest?

Haven't yet personally tried anything as elaborate as this, but 
http://doc.norang.ca/org-mode.html
describes a very complete personal workflow with, among other things, tracking 
interruptions via
capture templates.

-- 
Michał Politowski



Re: [O] Firefox extension "Org-capture" stopped working after update

2017-08-17 Thread Colin Baxter
> Adam Porter  writes:

> Marcin Borkowski  writes:
>> the title text says it all.  Anybody can confirm that?  How to
>> configure capture in FF now?

> Hi Marcin,

> I'm not sure if you mean updating Firefox or Org.  But if it's
> Firefox, well, Mozilla is killing off XUL extensions, and that
> probably includes the Org-Capture extension.  I doubt that it is
> possible to rewrite it as a WebExtension.

> Firefox 56 is supposed to be the last version that supports XUL
> extensions.  After Firefox 57 is released, that leaves you with a
> few options:

> 1.  Try to build and install it as an XUL extension in a Firefox
> "developer edition" build.  Supposedly that will remain possible,
> for a while at least, but I don't know if they have confirmed that
> or documented it.  I expect it would be unsupported, anyway.

> 2.  Use a ESR release of Firefox, which will keep supporting XUL
> until an ESR based on Firefox >= 57 is released.

> 3.  Dump Firefox.  The bottom line is that they don't care about
> users like us anymore.  I've been using Firefox since it was
> Phoenix beta, but they aren't interested in retaining loyal users
> anymore; they just want to chase Chrome users by making Firefox
> into Chrome.  (Of course, why would content Chrome users switch
> from actual Chrome to Firefox Chrome?  Mozilla doesn't seem to
> grok this.  I suspect Mozilla will be dead or no longer developing
> Firefox within a few years.)

> For this option, probably the thing to do is try out Pale Moon.
> Its developers have committed to supporting XUL.  This is not my
> preferred option, but I think it's the only viable one for those
> of us who want to keep using XUL extensions; I've been using
> Pentadactyl for years and I have no desire to give it up.  I hope
> Pale Moon will be added to Debian/Ubuntu someday, because I don't
> want to have to build or install it manually; but it is probably
> worth it anyway.

> 4.  If you continue using Firefox, you can replace most of the
> functionality of the Org-Capture extension by using the
> org-protocol-capture-html package.  The bookmarklets listed in its
> readme let you easily capture pages or parts of pages to Org.

May I suggest conkeror and palemoon. I use both and they work well with
org-capture. To install palemoon, you just decompress the tar bundle and
place the result somewhere in your path. No 'make' or 'make install' is
necessary.

As for conkeror, I pull a git version (currently 1.0.3) and use
XULRunner 41.0.2. It's old I suppose, but for the sites I use (no social
media or sites with top-heavy scripting) it works well. You can also
launch conkeror using palemoon, and this looks like the future. A word
of warning here - I need the palemoon-sse version to do this (I have
both).

Finally, don't forget emacs own eww browser.

Best wishes.

-- 
--
Colin Baxter
m43...@yandex.com
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8