Re: [O] Bug: org-add-note closes log book drawer

2016-07-30 Thread Gregor Zattler
Hi Nicolas,
* Nicolas Goaziou  [31. Jul. 2016]:
> Hello,
> 
> nljlistb...@gmail.com (N. Jackson) writes:
> 
> > When org-log-into-drawer is t and the log book drawer is open, using
> > org-add-note closes the log book drawer.
> >
> > I think it would be better if org-add-note left the state (open or
> > closed) of the log book drawer alone.
> >
> > In comparison org-clock-in and org-clock-out do leave the state of the
> > log book drawer alone, which is much more satisfactory.
> 
> I understand the discrepancy problem. 
> 
> However, drawers are meant to remove stuff from view, i.e., their
> contents are, more often than not, hidden. So, `org-clock-in' and
> `org-clock-out' may be wrong in this case.

For me the reasoning is the other way around: "Since drawers are meant
to remove stuff from view, i.e., their contents are, more often than
not, hidden", I'd say if the drawer is open prior to org-add-note
there might be a reason why so and it would ne nice not to interfere
with the users choice.

I open my org files in show-everything view for performance reasons.
I have turned on note taking for many funtions like changing TODO
states an cklockin out, therefore the really big drawer collapses all
the time although I want it to stay open.

Just my 2, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-




Re: [O] Project Management reporting

2016-07-30 Thread John C. Haprian
Hi Kaushal,

What have you tried in org mode and what does not work? Have you tried the
> org>latex>pdf exporter?
>

​Exporting is working as expected. What I'm looking for is a way to
programmatically collect & format tagged content from an org-mode file
which can then be exported.​


What is project management reporting? Having an example template of plain
> text data you need to enter for that report and an example document of what
> the final report should look like will be needed before a solution can be
> proposed.
>

​Here's a decent overview of basic PM reporting requirements (in particular
check out Key Data):

https://www.projectsmart.co.uk/how-to-report-status-on-a-project.php

Also attached is a sample report template to give you an idea of what an
exported report would ideally look like.

Thanks for your help!

J.


Project_Management_Report_Template.pdf
Description: Adobe PDF document


[O] Offline for a week

2016-07-30 Thread Nicolas Goaziou
Hello,

As the title suggests, I'll refrain from introducing regressions and
incompatible changes in the code base until next week. Enjoy.


Regards,


-- 
Nicolas Goaziou0x80A93738



Re: [O] Configurable prefixes for heading-tree numbering in HTML export? ($)

2016-07-30 Thread D. C. Toedt
Many thanks, Nick -- an interesting approach, but it's not a good fit for
what I need.

Another approach would be possible if org-mode had a way of including
arbitrary attribute text in HTML exports of headings.  This would enable
use of the CSS attr()
functionality,
combined with the ::before pseudo-element and counters.   I've tested out
the following in HTML; it seems to work for what I need:

==BEGIN HTML SNIPPET==


body   { counter-reset: section-counter; }
h2  { counter-reset: sub-section-counter; }
h3  { counter-reset: sub-sub-section-counter; }

h2::before {
counter-increment: section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) " ";
}

h3:before {
counter-increment: sub-section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) "."
counter(sub-section-counter) " ";
}

h4:before {
counter-increment: sub-sub-section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) "."
counter(sub-section-counter) "." counter(sub-sub-section-counter) " ";
}



Definitions 

Consulting Services

Payment Terms

General Provisions

==END HTML SNIPPET==

Unfortunately, org-mode does not seem to be able to include the
CDArticlePrefix="DEFN" attribute text in headings, as opposed to in divs.

I appreciate the response.

Regards,

D. C.





D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt 
​
Skype: dctoedt
​

www.OnContracts.com/About 
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.



On Sat, Jul 30, 2016 at 5:06 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> "D. C. Toedt"  writes:
>
> > So far as I can tell, org-mode currently allows heading numbering in only
> > one style (1, 1.1, 1.1.1, etc.).  For HTML export, I'm interested in
> having
> > the heading numbering be configurable on a per-subtree basis, along
> > something like the following lines for a hypothetical
> consulting-agreement
> > contract  (indentation is for convenient reading only).  This is for my
> Common
> > Draft  contract terms and conditions project
> > --- I'd like to be able to arrange the trees in an arbitrary order and
> have
> > the top-level headings start with prefixes and heading numbers instead of
> > heading numbers alone.
> >
> > This can be done in a very kludgy fashion with CSS (see below), but doing
> > it in org-mode would be far preferable for several reasons.
> >
> > I'd be happy to pay an honorarium, or make a donation, of USD$100-$200
> for
> > the appropriate elisp code that I could include in the relevant file(s).
> > I'd want the elisp code to be open-sourced, and at least minimal
> > documentation, so that it could be made a candidate for possible
> inclusion
> > in a future org-mode release.
> >
> > Here's an example of the desired org-mode code:
> >
> >
> > ===BEGIN===
> >
> >
> > * Services
> >
> >   :PROPERTIES:
> >
> >   :CUSTOM_ID: SVC
> >
> >   :CUSTOM_PREFIX: t
> >
> >   :END:
> > #  NOTE THE :CUSTOM_PREFIX: property above === #
> >
> >
> > ** Statements of Work
> >
> > [properties and text omitted]
> >
> >
> > *** Written Statements of Work Required
> >
> > [properties and text omitted]
> > # === AN ARBITRARY NUMBER OF SUBHEADING LEVELS BENEATH THE TOP
> > LEVEL = #
> >
> >
> > *** Changes Must Be in Writing
> > [properties and text omitted]
> >
> >
> >
> > ** Billing Rates
> >
> > [properties and text omitted]
> >
> >
> > ** IP Ownership
> >
> > [properties and text omitted]
> >
> >
> > * General Provisions
> >
> >   :PROPERTIES:
> >
> >   :CUSTOM_ID: GP
> >   :CUSTOM_PREFIX: t
> >
> >   :END:
> >
> >
> > ** Amendments
> >
> > [properties and text omitted]
> >
> >
> > ** Notices
> >
> > [properties and text omitted]
> >
> > ===END===
> >
> >
> > I'd like for the resulting HTML export to be something like the
> following:
> >
> > SVC Services
> >
> > #  NOTE THAT THERE'S NO HEADING /NUMBER/ FOR THE TOP-LEVEL
> HEADING,
> > JUST THE PREFIX == #
> >
> >
> > SVC-1 Statements of Work
> >
> > [properties and text omitted]
> >
> > #  PREFERABLY THE SEPARATOR IN "SVC-1" COULD BE CONFIGURED AS A
> > HYPHEN, A PERIOD, A COLON, A FORWARD SLASH, ETC. = #
> >
> >
> > SVC-1.1  Written Statements of Work Required
> >
> > [properties and text omitted]
> >
> > SVC-1.2  Changes Must Be in Writing
> >
> > [properties and text omitted]
> >
> >
> > SVC-2 Billing Rates
> >
> > [properties and text omitted]
> >
> >
> > SVC-3 IP Ownership
> >
> > [properties and text omitted]
> >
> >
> > GP General Provisions
> >
> >
> > GP-1 Amendments
> >
> > [properties and text omitted]
> >
> >
> > GP-2 Notices
> >
> > [prope

Re: [O] Bug: org-add-note closes log book drawer

2016-07-30 Thread Nicolas Goaziou
Hello,

nljlistb...@gmail.com (N. Jackson) writes:

> When org-log-into-drawer is t and the log book drawer is open, using
> org-add-note closes the log book drawer.
>
> I think it would be better if org-add-note left the state (open or
> closed) of the log book drawer alone.
>
> In comparison org-clock-in and org-clock-out do leave the state of the
> log book drawer alone, which is much more satisfactory.

I understand the discrepancy problem. 

However, drawers are meant to remove stuff from view, i.e., their
contents are, more often than not, hidden. So, `org-clock-in' and
`org-clock-out' may be wrong in this case.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-map-tree behaves strangely if first heading before point is hidden [8.3.5 (8.3.5-elpa @ /home/tom/.emacs.d/elpa/org-20160725/)]

2016-07-30 Thread Nicolas Goaziou
Hello,

talwrii talwrii  writes:

> Org mode file complete with code to reproduce the issue is attached.
>
> * Folded
> ** Hidden
> *** Children
> *** More children
>
> ** Other child
>
>
> * Bug description
> When calling org-map-tree on a hidden tree, the results are different from
> those if the tree were visible: this is not as expected.
>
> * Repro
> The following code samples consistently reproduce this behaviour.
> Run then with `C-c C-c` when the cursor is over the code block.
>
> The first folds up the first tree in this document and then calls 
> `org-map-tree` with the point at "Hidden";
> the second does the same but expands the first tree.
>
> I consider the case with the expanded tree to retrun the correct result.
> ** Folded
> #+begin_src emacs-lisp :results raw
> (save-excursion
> ; Expand first tree
> (goto-char 0)
> (while (not (equal org-cycle-subtree-status 'folded))
>   (org-cycle))
>
> ; Run map over `Hidden`
> (goto-char 10)
> (setq accum nil)
> (org-map-tree (lambda () (add-to-list 'accum (point
> accum
> )
>
> #+end_src
> #+RESULTS:
> (52 33 20 10 1)
> ** Expanded
> #+begin_src emacs-lisp :results raw
> (save-excursion 
>
> (goto-char 0)
> (setq accum nil)
>
> (while (not (equal org-cycle-subtree-status 'children))
>   (message (format "%S" org-cycle-subtree-status))
>   (org-cycle))
>
> (goto-char 10)
>
> (org-map-tree (lambda () (add-to-list 'accum (point
> accum
> )
> #+end_src
>
> #+RESULTS:
> (33 20 10)
>
> * Likely cause and fix
>
> Looking at `org-map-tree`:
>
> (defun org-map-tree (fun)
>   "Call FUN for every heading underneath the current one."
>   (org-back-to-heading)
>   (message (format "org-map-tree start %S" (point)))
>   (let ((level (funcall outline-level)))
> (save-excursion
>   (funcall fun)
>   (while (and (progn
> (prog1
>   (outline-next-heading)
>   (message (format "org-map-tree outline-ext-point %S" 
> (point)))
>   )
>   (> (funcall outline-level) level))
> (not (eobp)))
>   (funcall fun)
>
> We see that it calls `org-back-to-heading`; this skips back to the first 
> visible ancestor heading.
>
> `org-back-to-heading` has the optional argument `invisible-ok` which causes 
> it to skip back to the first
> ancestor heading, whether it is visible or not.
>
> (defun org-back-to-heading (&optional invisible-ok)
>   "Call `outline-back-to-heading', but provide a better error message."
>   (condition-case nil
>   (outline-back-to-heading invisible-ok)
> (error (error "Before first headline at position %d in buffer %s"
> (point) (current-buffer)
>
> I think that `org-map-subtree` should call `org-back-to-heading` with
> the `invisible-ok` argument set to `'t`

That's correct.

> However, this is changes behavior, and people may be relying upon this 
> behaviour in their scripts... though it would
> be rather strange to have your code behave different based on whether 
> subheadings are visible or not. So perhaps
> we should just make this change.

This is not a big issue because you can test within the function if the
headline is collapsed or not.

Anyway, just to be safe, I've changed it in master.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: LaTeX fragment not generated in electric-quote-mode [8.2.10 (release_8.2.10 @ /usr/local/share/emacs/25.1.50/lisp/org/)]

2016-07-30 Thread Nicolas Goaziou
Hello,

Wouter Beek  writes:

> With ‘electric-quote-mode’ enabled, ‘org-preview-latex-fragment’ no
> longer works if the LaTeX preview appears _directly before_ an elextric
> right double quote.  Reproducible case:
>
> $ emacs -Q
> M-x electric-quote-mode
> $A$''
> M-x org-preview-latex-fragment
>
> (Notice that after typing $A$'' into the buffer, the
> '' is changed to ” by electric-quote-mode.)
>
> Expected: The ‘A’ to be displayed as a LaTeX-generated inline image.
>
> Observed: The image is not generated.

I'm not using Emacs development version so I cannot test this. However
I suggest to

1. Upgrade Org to at least current stable release (8.3.5)
2. Try using \(...\) instead of $...$.

Regards,

-- 
Nicolas Goaziou



Re: [O] Configurable prefixes for heading-tree numbering in HTML export? ($)

2016-07-30 Thread Nicolas Goaziou
Hello,

"D. C. Toedt"  writes:

> So far as I can tell, org-mode currently allows heading numbering in only
> one style (1, 1.1, 1.1.1, etc.).  For HTML export, I'm interested in having
> the heading numbering be configurable on a per-subtree basis, along
> something like the following lines for a hypothetical consulting-agreement
> contract  (indentation is for convenient reading only).  This is for my Common
> Draft  contract terms and conditions project
> --- I'd like to be able to arrange the trees in an arbitrary order and have
> the top-level headings start with prefixes and heading numbers instead of
> heading numbers alone.
>
> This can be done in a very kludgy fashion with CSS (see below), but doing
> it in org-mode would be far preferable for several reasons.
>
> I'd be happy to pay an honorarium, or make a donation, of USD$100-$200 for
> the appropriate elisp code that I could include in the relevant file(s).
> I'd want the elisp code to be open-sourced, and at least minimal
> documentation, so that it could be made a candidate for possible inclusion
> in a future org-mode release.
>
> Here's an example of the desired org-mode code:
>
>
> ===BEGIN===
>
>
> * Services
>
>   :PROPERTIES:
>
>   :CUSTOM_ID: SVC
>
>   :CUSTOM_PREFIX: t
>
>   :END:
> #  NOTE THE :CUSTOM_PREFIX: property above === #
>
>
> ** Statements of Work
>
> [properties and text omitted]
>
>
> *** Written Statements of Work Required
>
> [properties and text omitted]
> # === AN ARBITRARY NUMBER OF SUBHEADING LEVELS BENEATH THE TOP
> LEVEL = #
>
>
> *** Changes Must Be in Writing
> [properties and text omitted]
>
>
>
> ** Billing Rates
>
> [properties and text omitted]
>
>
> ** IP Ownership
>
> [properties and text omitted]
>
>
> * General Provisions
>
>   :PROPERTIES:
>
>   :CUSTOM_ID: GP
>   :CUSTOM_PREFIX: t
>
>   :END:
>
>
> ** Amendments
>
> [properties and text omitted]
>
>
> ** Notices
>
> [properties and text omitted]
>
> ===END===
>
>
> I'd like for the resulting HTML export to be something like the following:
>
> SVC Services
>
> #  NOTE THAT THERE'S NO HEADING /NUMBER/ FOR THE TOP-LEVEL HEADING,
> JUST THE PREFIX == #
>
>
> SVC-1 Statements of Work
>
> [properties and text omitted]
>
> #  PREFERABLY THE SEPARATOR IN "SVC-1" COULD BE CONFIGURED AS A
> HYPHEN, A PERIOD, A COLON, A FORWARD SLASH, ETC. = #
>
>
> SVC-1.1  Written Statements of Work Required
>
> [properties and text omitted]
>
> SVC-1.2  Changes Must Be in Writing
>
> [properties and text omitted]
>
>
> SVC-2 Billing Rates
>
> [properties and text omitted]
>
>
> SVC-3 IP Ownership
>
> [properties and text omitted]
>
>
> GP General Provisions
>
>
> GP-1 Amendments
>
> [properties and text omitted]
>
>
> GP-2 Notices
>
> [properties and text omitted]
>

Possibly not what you're asking but, you can ignore CUSTOM_PREFIX
property altogether and use a headline filter to do what you want.

  (defun my-heading-prefix-filter (heading backend info)
"Prefix every heading and sub-heading with custom ID.
  Skip one level of numbering."
(when (org-export-derived-backend-p backend 'html)
  (let ((internal-ref
 (and (string-match "\\`.*id=\"outline-container-\\(.+?\\)\"" 
heading)
  (match-string 1 heading)))
(id (and (string-match "\\`.*\n" heading)
 (match-string 1 heading
;; When there is no custom ID, id attribute contains the
;; internal reference.  So we check if there is a custom ID which
;; is going to become the prefix of all headings.
(unless (equal internal-ref id)   ;No custom ID
  (let ((s 0))
(while (string-match
"\\(\\)\\(?:.*?\\(.+?\\)\\)?"
heading s)
  (setq s (+ (match-end 0) (length id) 1))
  (setq heading
(cond
 ;; Unnumbered heading.
 ((not (match-end 2))
  (replace-match (concat "\\1" id " ") nil nil heading 1))
 ;; Top level heading.  Ignore numbering.
 ((string-match-p "\\`[0-9]+\\'" (match-string 2 heading))
  (replace-match id nil nil heading 2))
 ;; Sub-headings.  Skip first number.
 (t
  (let ((numbers
 (save-match-data
   (split-string (match-string 2 heading) "\\."
(replace-match
 (concat id "-" (mapconcat #'identity (cdr numbers) 
"."))
 nil nil heading 2))
heading)

  (add-to-list 'org-export-filter-headline-functions
   'my-heading-prefix-filter)

custom ID is used to prefix every heading with its value.  Of course, it
means that every heading with a custom ID is expected to follow this
pattern, so y

[O] Bug: org-map-tree behaves strangely if first heading before point is hidden [8.3.5 (8.3.5-elpa @ /home/tom/.emacs.d/elpa/org-20160725/)]

2016-07-30 Thread talwrii talwrii
Org mode file complete with code to reproduce the issue is attached.


map-tree-repro.org
Description: Binary data


[O] Bug: LaTeX fragment not generated in electric-quote-mode [8.2.10 (release_8.2.10 @ /usr/local/share/emacs/25.1.50/lisp/org/)]

2016-07-30 Thread Wouter Beek

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


With ‘electric-quote-mode’ enabled, ‘org-preview-latex-fragment’ no
longer works if the LaTeX preview appears _directly before_ an elextric
right double quote.  Reproducible case:

$ emacs -Q
M-x electric-quote-mode
$A$''
M-x org-preview-latex-fragment

(Notice that after typing $A$'' into the buffer, the
'' is changed to ” by electric-quote-mode.)

Expected: The ‘A’ to be displayed as a LaTeX-generated inline image.

Observed: The image is not generated.

Emacs  : GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6)
 of 2016-07-24
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/usr/local/share/emacs/25.1.50/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-font-lock-hook '(org-inlinetask-fontify)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-show-block-all append local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
  org-cycle-hide-drawers org-cycle-hide-inline-tasks
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-babel-tangle-lang-exts '(("prolog" . "pl") ("sml" . "sml")
  ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-startup-truncated nil
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] Bug: Reading currently clocked headline interferes with org-capture-finalize [8.3.4 (8.3.4-93-g0d72c3-elpaplus @ /home/joe/.emacs.d/elpa/org-20160627/)]

2016-07-30 Thread Nicolas Goaziou
Hello,

Joe Schafer  writes:

> I have a function to save the currently clocked item into a file so I
> can display it in my terminal.  The hook seems to interfere with
> org-capture.  If I capture something the following
> happens:
>
> 1. org-capture dialog appears
> 2. Fill-in capture.  The capture is clocked-in.
> 3. Finish capture with C-c C-c
> 4. The capture is still clocked in.  The clock should go back to the
> previous clocked-in entry.
>
> Trying to bisect the issue was difficult.  Sometimes the new capture would
> clock-out, but the original entry would not clock back in.  Other times
> the clock would be left running in the new capture entry.

[...]

> For reference, here's the full code I'm using
>
> (defun my:org-get-clocked-in-headline ()
>   "Get the headline of the currently clocked in headline.
> If no headline is clocked in, then return an empty string."
>   (interactive)
>   (if (not (org-clocking-p))
>   ""
> (with-current-buffer (marker-buffer org-clock-marker)
>   (save-excursion
> (save-restriction
>   (when (or (< org-clock-marker (point-min)) (>
> org-clock-marker (point-max)))
> (widen))
>   (goto-char org-clock-marker)
>   (org-no-properties (org-get-heading 'no-tags 'no-todo)))
>
> (defvar my:org-clocked-in-file-path "/tmp/org-currently-clocked-in-task"
>   "Where to save the currently clocked in task for all to see.")
>
> (defun my:org-save-clocked-in-entry-to-file ()
>   "Save currently clocked-in task to a file."
>   (let ((last-message (current-message))
> ;; Suppress echo area to see clock out information.  Doesn't
> seem to
> ;; work, so we'll just re-display last-message.
> (inhibit-message nil))
> (with-temp-buffer
>   (insert (my:org-get-clocked-in-headline))

AFAIU, the last expression fails because
(my:org-get-clocked-in-headline) returns nil at empty headlines. This
prevents the whole process from properly clocking out.

I fixed it on master; `org-get-heading' now always returns a string.

If you're using stable release, you may want to use

  (or (org-no-properties (org-get-heading 'no-tags 'no-todo)) "")

in `my:org-get-clocked-in-headline' instead.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Added possibility of overriding PGF inclusion command

2016-07-30 Thread Nicolas Goaziou
Hello,

Stefanos Carlström  writes:

> * ox-latex.el (org-latex--inline-image): The user can now customize the
>   way PGF images are included by changing the (new) variable
>   `org-latex-inline-pgf-command'.
>
> If the PGF file is stored in a subdirectory and references an external
> image file in the same directory, LaTeX will complain about not finding
> it.  A workaround could be to define a function like this in the
> preamble:
>
> \newcommand\inputpgf[2]{{
> \let\pgfimageWithoutPath\pgfimage
> \renewcommand{\pgfimage}[2][]{\pgfimageWithoutPath[##1]{#1/##2}}
> \input{#1/#2}
>   }}
>
> and customizing `org-latex-inline-pgf-command' to hold this function:
>
> (lambda (path)
>   (let ((dir-name (substring (file-name-directory path) 0 -1))
> (file-name (file-name-nondirectory path)))
> (format "\\inputpgf{%s}{%s}" dir-name file-name)))
>
> This way, LaTeX will be able to find the external images.  The idea came
> from here: http://tex.stackexchange.com/a/282110/9742

Thank you for your patch.

However, you can easily achieve the same using a filter, can't you?

If a function needs to be introduced, it would be better to factor out
the whole "tikz" and "pgf" handling, i.e.,

  (progn
(setq image-code (format "\\input{%s}" path))
(when (org-string-nw-p options)
  (setq image-code
(format "\\begin{tikzpicture}[%s]\n%s\n\\end{tikzpicture}"
options
image-code)))
(when (or (org-string-nw-p width) (org-string-nw-p height))
  (setq image-code (format "\\resizebox{%s}{%s}{%s}"
   (if (org-string-nw-p width) width "!")
   (if (org-string-nw-p height) height "!")
   image-code

and have a variable holding a function to handle this such extensions,
and doing the above as a default.

Anyway, that's just an idea and people more knowledgeable on the subject
may want to chime in.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Reading currently clocked headline interferes with org-capture-finalize [8.3.4 (8.3.4-93-g0d72c3-elpaplus @ /home/joe/.emacs.d/elpa/org-20160627/)]

2016-07-30 Thread Adam Porter
Nicolas Goaziou  writes:

> FWIW I cannot reproduce it on development version with the following
> template:
>
>   ("c" "clocks" entry
>(file "/tmp/bug.org") "* %?" :clock-in t :clock-resume t)
>
> IOW the previous clock is properly resumed.

Thanks, Nicolas.  I'll have to do some more checking on my end.




Re: [O] Bug: Reading currently clocked headline interferes with org-capture-finalize [8.3.4 (8.3.4-93-g0d72c3-elpaplus @ /home/joe/.emacs.d/elpa/org-20160627/)]

2016-07-30 Thread Nicolas Goaziou
Hello,

Adam Porter  writes:

> Joe, thanks for reporting this!  I have been noticing this for a while
> now, but I always thought it must have been a config problem on my
> end.  (Or maybe it is, and we both have it? haha)
>
> Just to be clear, here's how I seem to experience it:
>
> 1.  Clock in any item.
> 2.  Run org-capture with a template that uses ":clock-in t
> :clock-resume t" (and not ":clock-keep t").
> 3.  Finish the capture.
> 4.  The capture is still clocked in.  I have to clock-out manually.

FWIW I cannot reproduce it on development version with the following
template:

  ("c" "clocks" entry
   (file "/tmp/bug.org") "* %?" :clock-in t :clock-resume t)

IOW the previous clock is properly resumed.


Regards,

-- 
Nicolas Goaziou



Re: [O] Can one tangle only the current blocks under header ?

2016-07-30 Thread Joon Ro



can one tangle only the current blocks under header or  can you only tangle the 
whole file?the issue is again for dotfiles managed by org that these files are 
not proper org babel languages and look like this:
#+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.confsoftvol-max=600  
#+END_SRC
the manual (http://orgmode.org/manual/Extracting-source-code.html) only shows 
how to tangle the whole file
any ideas?
If you read the help for org-babel-tangle:
With one universal prefix argument, only tangle the block at point.When two 
universal prefix arguments, only tangle blocks for thetangle file of the block 
at point.
So if you do c-u first before org-babel-tangle, it will only tangle the code 
block at point.I use this a lot so I have the following in my init file:
(defun org-babel-tangle-block()  (interactive)  (let ((current-prefix-arg 
'(4))) (call-interactively 'org-babel-tangle)))
(eval-after-load "org"  '(progn (define-key org-mode-map (kbd "C-c b") 
'org-babel-tangle-block)))
So I can just do C-c b and it will just tangle the code block at point.
And I agree with you I with the manual 
(http://orgmode.org/manual/Extracting-source-code.html) has this information.
Hope this helps,Joon

  

Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-30 Thread Robert Love
I just looked on YouTube and didn’t find anything.

> On Jul 29, 2016, at 10:54 AM, Kaushal Modi  wrote:
> 
> Actually it will be even more awesome if you can record a short video/GIF 
> screencast demonstrating what hyperbole does compared to org mode. Or in 
> general how you would use hyperbole.
> 
> Thanks.
> 
> On Fri, Jul 29, 2016 at 11:52 AM Adam Porter  > wrote:
> Charles Philip Chan mailto:cpc...@bell.net>> writes:
> 
> > Wow, blast from the past. I remember using older versions of Hyperbole
> > fondly and still miss it. Thank you for updating it. I look forward to
> > using it. :-)
> 
> Charles, could you explain a little bit how it compares to Org?  I read
> the thread on /r/emacs and looked at the wiki, but I'm still not sure
> how it compares to or complements Org.
> 
> 
> -- 
> Kaushal Modi
> 




[O] Can one tangle only the current blocks under header ?

2016-07-30 Thread Xebar Saram
Hi all

can one tangle only the current blocks under header or  can you only tangle
the whole file?
the issue is again for dotfiles managed by org that these files are not
proper org babel languages and look like this:

#+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf
softvol-max=600
#+END_SRC

the manual (http://orgmode.org/manual/Extracting-source-code.html) only
shows how to tangle the whole file

any ideas?

thx!

Z