Carlos Noguera | 4 May 12:59 2016
Picon

Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa <at> /home/carlos/.emacs.d/elpa/org-20160502/)]


When clocking in under a headline that already has clock entries, the
entries are not correclty bundled in a drawer, generating a: (I removed
the bytecode because gmail didn't like it)

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  byte-code("REMOVED" [beg end org-clock-into-drawer drawer find-unclosed org-clock-string line-beginning-position outline-next-heading org-clock-drawer-name "^[ ]*" " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ ]*$" re-search-forward t org-element-at-point org-element-type clock org-element-property :status running beginning-of-line throw exit "^[ ]*:" regexp-quote ":[ ]*$" :contents-end nil 0 org-end-of-meta-data "\n" wholenump 2 ":" ":\n:END:\n" org-indent-region org-flag-drawer mapconcat #[(p) "\212 b\210\302\212\303\304x\210\305\306!)\305\306!\" \307\310\311\307\312\311 ##*\207" [p s delete-and-extract-region " 
\n" nil line-beginning-position 2 replace-regexp-in-string "\\`[ \n
]+" "" "[ \n
]+\\'"] 7] "\n:END:\n" point-marker ":\n" -1 last open-clock-re element drawer-re cend org-log-states-order-reversed first ...] 4)
  org-clock-find-position(nil)
  byte-code("REMOVED" [org-clock-resolving-clocks-due-to-idleness org-clock-resolving-clocks org-clock-leftover-time leftover org--msg-extra target-pos org-clocking-p nil "" t org-resolve-clocks (64) org-clock-in (4) org-clock-select-task "Clock-in on task: " copy-marker error "Abort" (16) org-clock-mark-default-task org-back-to-heading marker-buffer marker-position 4 org-heading-components message "Clock continues in \"%s\"" throw abort org-clock-out org-at-heading-p point-at-bol 0 org-base-buffer run-hooks org-clock-in-prepare-hook org-clock-history-push functionp looking-at match-string 2 org-todo "[ ]*" "\\>" replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" match-string-no-properties "???" ...] 8)
  org-clock-in(nil)
  call-interactively(org-clock-in nil nil)
  command-execute(org-clock-in)

that prevents the clock in
I go from

** TODO a task
CLOCK: [2016-04-29 Fri 13:14]--[2016-04-29 Fri 14:43] =>  1:29
CLOCK: [2016-05-04 Wed 12:44]--[2016-05-04 Wed 12:44] =>  0:00

C-c C-x C-i

to

** TODO a task
:CLOCK: [2016-05-04 Wed 12:44]--[2016-05-04 Wed 12:44] =>  0:00
CLOCK: [2016-04-29 Fri 13:14]--[2016-04-29 Fri 14:43] =>  1:29
:END:


Any ideas?


Carlos.


Emacs  : GNU Emacs 24.5.1 (i686-pc-cygwin)
 of 2015-06-23 on desktop-new
Package: Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpa <at> /home/carlos/.emacs.d/elpa/org-20160502/)

current state:
==============
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
                          org-babel-execute-safely-maybe)
 org-tab-first-hook '(org-hide-block-toggle-maybe
                      org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
                          org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-return-follows-link t
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-link-file-path-type 'relative
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-enforce-todo-dependencies t
 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-clock-into-drawer 3
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '("~/notes/onto-alliance.org" "~/notes/ODASE-src.org"
                    "~/notes/notes.org")
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)
                 ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)
                 (system . "open %s"))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-after-todo-statistics-hook '(org-summary-todo)
 org-confirm-shell-link-function 'yes-or-no-p
 )

Samuel Wales | 5 May 04:06 2016
Picon

sparse tree search still hides matching drawers (bug?)

in maint, i wanted to show categories, so i did c-c / / for category.

the properties drawers stayed closed.  shouldn't they show matches?

also, is it possible to make it so that if you provide an uppercased
search string, only uppercase strings will be matched?  this is how
isearch works for me.

(setq org-show-context-detail
      '(
        ;; sparse tree regexp c-c / /
        (occur-tree . minimal)
        ;; sparse tree tags c-c / m
        (tags-tree . minimal)
        ;; everything else should always be canonical
        (default . canonical)))

thanks.

samuel

--

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

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

Denmark: free Karina Hansen NOW.

Xavier Maillard | 4 May 23:40 2016

pomodoro: how do you manage internal/external interruptions ?

Hello,

I am trying to learn the pomodoro technic in order to apply it for myself.
I see there is org-pomodoro but as far as I know, it just trigger clock-in and
rest time.

How do you manage the whole picture: Today sheet, interruptions, Urgent &
unplanned, etc.

Regards
Xavier

Peter Salazar | 4 May 19:20 2016
Picon

how to org-refile to a target within the current file?

Hello, I use org-refile quite a bit, but for my use-case, I want to refile my org-mode subtrees not to an org-agenda file, but to the current file or another file I'm currently visiting.

I had a way of doing this that was working correctly, but now has stopped working. I'm not sure what I changed that broke it. 

Here's the code I'm using for org-refile:

(setq org-outline-path-complete-in-steps nil) ; Refile in a single go 
(setq org-completion-use-ido nil) 
(setq org-refile-use-outline-path t) ; Show full paths for refiling 
(setq org-refile-allow-creating-parent-nodes (quote confirm)) ; allow refile to create parent tasks with confirmation

(defun my-org-files-list ()
 (mapcar (lambda (buffer)
   (buffer-file-name buffer))
   (org-buffer-list 'files t))) 

(setq org-refile-targets '((my-org-files-list :maxlevel . 3))) 

Again, this used to work. But now when I run org-refile, I get this:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  get-file-buffer(nil)
  org-find-base-buffer-visiting(nil)
  org-get-agenda-file-buffer(nil)
  org-refile-get-targets(nil (#("this" 0 4 (fontified t face org-level-1))))
  org-refile-get-location("Refile subtree \"this\" to" nil confirm nil)
  org-refile(nil)
  call-interactively(org-refile record nil)
  command-execute(org-refile record)
  execute-extended-command(nil "org-refile")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Any suggestions on how to fix this? Thanks!

vendo.libri@libero.it | 4 May 13:42 2016
Picon

R: Re: tabularx from org to latex not recognized

Hello again, 

Yes, finally! I placed #+ATTR_LATEX line just before the table, saved the doc, 
exported to pdf and it worked. The table is nice and tidy, not jumbled up as 
earlier. Thank you for taking the time to fix this problem of mine. 

One last question. I read the "Affiliated Keywords" link you posted, it says 
“#+ATTR_BACKEND: VALUE” can appear more than once. Say I have 3 tables, in 
pages 1, 3 and 4 of my final document, does that mean I must place it before 
every table? 

Thank you again for your patience and help.

---ORIGINAL MESSAGE-----------------------------
From: Nick Dokos <ndokos <at> gmail.com>
Subject: Re: tabularx from org to latex not recognized
Newsgroups: gmane.emacs.orgmode
Date: 2016-05-03 20:35:36 GMT (14 hours and 42 minutes ago)
Nick Dokos <ndokos <at> gmail.com> writes:

> The OP should try moving the #+ATTR_LATEX line to just before the table.
> I'm not sure, but I don't think it applies long distance.
>

I checked, so now I'm sure :-) - see the org-syntax document on Worg,
section "Affiliated Keywords"
(http://orgmode.org/worg/dev/org-syntax.html#Affiliated_keywords):

,----
| Affiliated Keywords
| 
| With the exception of inlinetasks, items, planning, clocks, node
| properties and table rows, every other element type can be assigned
| attributes.
| 
| This is done by adding specific keywords, named “affiliated keywords”,
| just above the element considered, no blank line allowed.
| 
| Affiliated keywords are built upon one of the following patterns:
| “#+KEY: VALUE”, “#+KEY[OPTIONAL]: VALUE” or “#+ATTR_BACKEND: VALUE”.
|
| ...
`----

--
Nick

>----ORIGINAL MESSAGE----
>Da: Eric S Fraga <e.fraga <at> ucl.ac.uk>
>Data: 3-mag-2016 17.07
>A: "vendo.libri <at> libero.it"<vendo.libri <at> libero.it>
>Cc: "emacs-orgmode <at> gnu.org"<emacs-orgmode <at> gnu.org>, "ndokos <at> gmail.com"
<ndokos <at> gmail.com>
>Ogg: Re: [O] tabularx from org to latex not recognized
>
>On Tuesday,  3 May 2016 at 14:04, vendo.libri <at> libero.it wrote:
>> Hello Nick,
>>
>> Thank you for fixing the <10> character-width problem with the 2nd
>> column of the table in Org-mode problem, your solution worked. Now the
>> table is much more legible, within Emacs' reduced window.
>>
>> Unfortunately the ultimate pdf if still giving problems. The table is
>> too wide and the text overflows well beyond the right page
>> limit. Something's not working in the preamble. Let me post the whole
>> thing here:
>
>Works for me with Nick's table and just the tabularx package included.
>
>> PS: Say I want to see what's "hidden" in the table due to the <10> (or
>> <20>) character self-imposed limit, how can I do that via keyboard
>> shortcut? Can it be done?
>
>C-c `
>
>-- 
>: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412
>

Sander Boer | 4 May 12:31 2016
Picon

Search current branch for custom export

Hi all,

I use orgmode to org my projects and I would like to add invoices to the mix.
These invoices would be the conclusion to a task in a hierarchy like so:

*project
** task
*** invoice

I know how to export a subtree and get a latex invoiceboht of it, but I am still searching for a decent way to add client data.
I am looking into two solutions:
1. Org-contacts [b/c mu4e]
- How do I read address and other generic data from org-contacts ?
- How do I store a link to the address and follow it in the export ?
2. Define client data in the root or a dedicated branch.
- how do I search the current branch ? Go back up to root, crawl downwards?
- any insight on a good way to store client data ? Org-contacts uses property drawers, why not branches with dedicated headlines ?

Any and all tips are greatly appreciated.

Gr
Sanderh

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Ethan Ligon | 3 May 23:33 2016
Picon

Adding information to tangled code regarding org-source

When one exports from  org to, say, latex the resulting *.tex file includes 
a comment at the  top indicating the time of creation.  This is useful in 
part because it lets the user know that the *.tex file isn't the  original  
source.

The  same isn't true of tangled code from a source block, and I've been  
repeatedly bitten by editing a file of  python code that was tangled from a 
source org file.

I'd like to deal with  this by making tangle emit a comment with 
information about the org-source file.  The :prologue header argument is 
well suited to this; e.g.,

#+begin_src  python :tangle /tmp/test.py :prologue (format "# Tangled from 
%s on %s" (buffer-file-name) (current-time-string))
print "Hello, world!"
#+end_src

produces what one would want.

I'd like to make this header argument be applied automatically.  The 
variable org-babel-default-header-args looks like just the ticket, but  my 
lame efforts to write the necessary emacs-lisp aren't working:

#+BEGIN_SRC emacs-lisp
(add-to-list 'org-babel-default-header-args:python
                  '((:prologue . (format "# Tangled from %s on %s" (buffer-
file-name) (current-time-string)))))
#+END_SRC

What am I doing wrong?

Thanks for any help,
-Ethan

William Denton | 3 May 21:55 2016
Picon
Gravatar

R source block :session errors, perhaps due to recent ESS change

I updated my packages today and now Org documents with R source blocks are 
failing when I try to use a running R session.

If you start R and leave that session open, then run this in an Org doc, it will 
fail (though it will success without the :session parameter):

#+BEGIN_SRC R :session :results values
1
#+END_SRC

The error I get (which includes a lot of junk I can't paste; why, I don't know) 
is

ess-eval-buffer: Wrong number of arguments: #[(start end toggle &optional 
message) ... junk ... [ess-local-customize-alist toggle ess-eval-visibly message 
proc visibly ess-force-buffer-current "Process to use: " "Starting 
evaluation..." ess-setq-vars-local ...] 6 
("/home/wdenton/.emacs.d/elpa/ess-20160502.557/lisp/ess-inf.elc" . 48726) "r
P"], 5

Now, the most recent commit to lisp/ess-inf.el had the comment "Get rid of 
needless `inject` argument:"

https://github.com/emacs-ess/ESS/commit/6b89391a13322ff2297fb3895ed665ff2048fc10#diff-724cde45c58d919c6bb8e85b26faf792

Perhaps that is the cause?  I suspect it's Org talking to ESS, but if it's a 
problem in ESS I can take it to that mailing list.

Emacs  : GNU Emacs 25.1.50.29 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7)
  of 2016-05-03

Org-mode version 8.3.4 (release_8.3.4-771-g36dbdb  <at>  
/usr/local/src/org-mode/lisp/)

ess-version: 15.09-2 patched [elpa: 20160502.557] (loaded from 
/home/wdenton/.emacs.d/elpa/ess-20160502.557/)

Thanks,

Bill
--

-- 
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/
Kaushal Modi | 3 May 21:22 2016
Picon
Gravatar

Request to add support for escaping comments in org blocks

Hi,

I would like to add the Local Variables comment block to my org file (for documentation purpose) without affecting the actual local variable values in that buffer.

Here is a minimum working example:

#+BEGIN_SRC org
,#+STARTUP: align
,* COMMENT Local Variables
,# Local Variables:
,# fill-column: 90
,# End:
#+END_SRC

The problem with above is that the commas before the comments are seen in the export too.

The ASCII export looks like this:

,----
| #+STARTUP: align
| * COMMENT Local Variables
| ,# Local Variables:
| ,# fill-column: 80
| ,# End:
`----

If I instead have

#+BEGIN_SRC org
,#+STARTUP: align
,* COMMENT Local Variables
# Local Variables:
# fill-column: 80
# End:
#+END_SRC

the export looks fine (below) .. but then that corrupts the local variables in that buffer.

,----
| #+STARTUP: align
| * COMMENT Local Variables
| # Local Variables:
| # fill-column: 80
| # End:
`----

Can we please add support for comma escaped comments in source blocks?

Thanks.

Kaushal
--

--
Kaushal Modi

Tory S. Anderson | 3 May 17:25 2016
Picon
Gravatar

Duplicating DEADLINE and date in capture templates

I have some capture templates that supply both a deadline and a 
regular date. This is because I want the days-in-advance notice of 
deadlines when I view in my agenda, but deadlines are not exported 
to ICAL so I need a regular date as well. However, these two are 
always the same value. Any suggestions on how to clone them so I 
only need to enter them once?

--8<---------------cut here---------------start------------->8---
;; in my setq org-capture-templates
("tT" "Soon (tomorrow) TODO" entry (file+headline 
"/home/torysa/emacs/org/td.org" "Tomorrow")
		 "* TODO %^{prompt}
			%^{Insert}T	DEADLINE: %^{Deadline}T%?" 
                         :prepend t)
--8<---------------cut here---------------end--------------->8---

--

-- 
Tory S. Anderson
Computational Cognitive Narratologist & Application Developer
http://toryanderson.com

Eric S Fraga | 3 May 17:07 2016
Picon
Picon
Gravatar

Re: tabularx from org to latex not recognized

On Tuesday,  3 May 2016 at 14:04, vendo.libri <at> libero.it wrote:
> Hello Nick,
>
> Thank you for fixing the <10> character-width problem with the 2nd
> column of the table in Org-mode problem, your solution worked. Now the
> table is much more legible, within Emacs' reduced window.
>
> Unfortunately the ultimate pdf if still giving problems. The table is
> too wide and the text overflows well beyond the right page
> limit. Something's not working in the preamble. Let me post the whole
> thing here:

Works for me with Nick's table and just the tabularx package included.

> PS: Say I want to see what's "hidden" in the table due to the <10> (or
> <20>) character self-imposed limit, how can I do that via keyboard
> shortcut? Can it be done?

C-c `

--

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412


Gmane