Re: [O] org-lint does not finish on some org-mode buffer

2015-11-11 Thread Karl Voit
* Nicolas Goaziou  wrote:
> Hello,

Hi Nicolas!

> Karl Voit  writes:
>
> It is. C-g with `toggle-debug-on-quit' would be interesting. Also, you
> could bisect your document to check if is really coming from its sheer
> size or from particular structure in it.

I have several Org-mode related issues so `toggle-debug-on-quit' is
always active at my side :-)

I've done org-lint on [1] which was finished quite fast - so it's not
an issue with my huge files only: I had to kill -9 Emacs to quit.

I was using Emacs 24.4.1  (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
from Debian stable (Jessie).

First, I tried to start Emacs without my personal configuration:

Emacs was started (in command line version without XOrg) via:
#+BEGIN_SRC sh
emacs --no-init-file --no-site-file
#+END_SRC

In *scratch* I executed following lines to switch from default
Org-mode to my local git version:
#+BEGIN_SRC elisp
  (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/lisp")
  (add-to-list 'load-path "~/.emacs.d/contrib/org-mode/contrib/lisp" t)
  (require 'org-lint)
#+END_SRC

After opening [1] I got "Variable binding depth exceeds max-specpdl-size".
No idea, what I am missing to test it with --no-init-file. Maybe you
can tell me.


With my config from [2] (with XOrg) and Org-mode from git[3] I got
an error message I was not able to post it here because of special
characters: [4]

[1] https://github.com/novoid/lazyblorg/blob/master/dev/lazyblorg.org

[2] https://github.com/novoid/dot-emacs

[3] c032c48e8407f1a888396d2cb5e5d1b12099fe30

[4] http://Karl-Voit.at/temp/2015-11-11-org-lint-error.txt (online
for a couple of days)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Spreadsheet error: invalid reference when using @> in range

2015-11-11 Thread Karl Voit
* Nicolas Goaziou  wrote:
> Hello,

Hello Nicolas (again)!

> Karl Voit  writes:
>
>> | | 20 | 21 | 22 | 23 | 24 |
>> | | :=vsum(@3..@>) |||||
>> |-+++++|
>> | ||||||
>> |-+++++|
>> | |  1 |  1 |||  1 |
>> | Foo |  2 |||||
>> | Bar |||  2 |  3 ||
>> |-+++++|
>> | ||||||
>> |-+++++|
>> | Bar ||  4 |  1 |||
>> | Foo |||  2 ||  2 |
>> | Bar |||  3 |  5 ||
>> | Foo ||  1 |||  5 |
>> |-+++++|
>>
>> I got: Spreadsheet error: invalid reference "vsum(@3..@>)" when I
>> try to apply the formula.

Funny thing: today, it worked so far :-O

>> Bonus question: when I want to apply the formula to @2$2 and *all*
>> table elements rights of it until the last column, is there a way to
>> define this without having five separate formula?
>
>   @2$2..@2$>=vsum(@3..@>)

However, this does not work at my side:

|   | 20 | 21 | 22 | 23 | 24 |
| Foo + 2 Bar + Foo + Bar + Foo |  3 |||||
|---+++++|
|   ||||||
|---+++++|
|   |  1 |  1 |||  1 |
| Foo   |  2 |||||
| Bar   |||  2 |  3 ||
|---+++++|
|   ||||||
|---+++++|
| Bar   ||  4 |  1 |||
| Foo   |||  2 ||  2 |
| Bar   |||  3 |  5 ||
| Foo   ||  1 |||  5 |
|---+++++|
#+TBLFM: @2$2..@2$>=vsum(@3..@>)

At least, the error is gone. What might be the cause of the wrong
result?

Thank you for your time!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Bug: bold text followed by footnote not bold

2015-11-11 Thread Nicolas Goaziou
Hello,

Manuel Koell  writes:

> I just encountered following behaviour:
>
> *foo bar*[fn:1] will export as *foo bar*1 (not bold, with stars)
>
> *foo bar* [fn:2] will export as foo bar 1 (bold, but you've to use a space
> between bold text and marker)
>
> I may be wrong, but I thought a footnote marker will follow immediately
> after the word ends. Both examples exported to html.

I cannot reproduce it in latest Org.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-babel-execute-src-block-region

2015-11-11 Thread Charles C. Berry

On Wed, 11 Nov 2015, Ista Zahn wrote:


I recommend using polymode[1] as a more general solution to the need to
interact with code blocks without pulling up a separate edit buffer. It
seamlessly switches major modes when point is inside a code block.

Best,
Ista

[1] https://github.com/vspinu/polymode


Ista,

Thanks for this pointer. I've been meaning to check out polymode for
some time, and your posting gave me the push to try it out.

For anyone who wants to try it, after cloning into ~/elisp/polymode I
only needed to add this in my init (ESS was already in my init).

#+BEGIN_SRC emacs-lisp
(setq load-path
  (append '("~/elisp/polymode"  "~/elisp/polymode/modes")
  load-path))
(require 'poly-org)
(add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
#+END_SRC

When point is inside a src-block the local mode prevails. So, C-c C-n
inside an R src block sends the line point is on to the R process. C-c
C-c sends the region (or function or paragraph) to the process when
point is in the body. To execute `org-ctrl-c-ctrl-c' on the src block
with the C-c C-c keying, it is necessary to move point to before or
after the body.

---

Now that I have tried this, I agree that it is better to let polymode
handle this kind of interaction than to try to build it into Org mode.

Best,

Chuck




Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Memnon Anon
Matt Price  writes:

> [...] Since my blog
> has, I think, a readership of 0 (surely there's a way to get emacsers
> to follow me? ah well), I will post a link here [...]

http://planet.emacsen.org/
-- 
/---\
| SDF and SDF-EU Public Access UNIX System  |
| http://sdf.org   ||   http://sdf-eu.org   |
=




[O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
I've just written up a post on my workflow for PDF's Since my blog has, I
think, a readership of 0 (surely there's a way to get emacsers to follow
me? ah well), I will post a link here in the hopes that someone will be
interested:

http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/

All best!
Matt


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Russell Adams
On Wed, Nov 11, 2015 at 09:42:13AM -0500, Matt Price wrote:
> I've just written up a post on my workflow for PDF's Since my blog has, I
> think, a readership of 0 (surely there's a way to get emacsers to follow
> me? ah well), I will post a link here in the hopes that someone will be
> interested:
>
> http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/
>
> All best!
> Matt

In the past I have just had the PDF open in emacs (docview?), made a
bookmark, and inserted that into Org. It only links to the page
though, not the text.

Thanks.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] Allowing loose ordering in Org files

2015-11-11 Thread Karl Voit
* John Wiegley  wrote:
>
> In my regimen, every single entry has a PROPERTIES drawer, since I tag each
> one with ID and CREATED, for future reference. 

This also holds for my Org-mode files - in general.

> Most items are SCHEDULED as well. So when I open up a headline to
> look at the contents, I see:
>
> * Head
> SCHEDULED
> text
>:PROPERTIES:...
>
> It's a trivial thing, but I'd rather not scan past two lines to start reading
> my entry.

I just wanted to add an additional notion to the discussion:

In most cases, the content of the drawers gets populated
automatically (LOGBOOK, CREATED, ...). In some cases, I manually add
properties, mainly :ID: for being able to use references to it.

Below the drawers, there is the actual content which is free text,
mixed with lists, blocks, and so forth.

In those cases, I prefer drawers being closed by default.


However, in my contacts.org file, I have entries where the actual
content is in a rather strict form like:

,
| ** Firstname Lastname  :FirstnameLastname:
| :PROPERTIES:
| :TYPE: person
| :TITLE:
| :EMAIL: firstname.lastn...@example.com
| :URL: http://example.com
| :MOBILE: 0043/123456789
| :HOMEPHONE:
| :WORKPHONE:
| :PHONE:
| :COMPANY:
| :STREET: Herrengasse 42
| :POSTALCODE: 8042
| :CITY: Graz
| :COUNTRY: Österreich
| :PHOTOGRAPH: [[photo:FirstnameLastname.jpg]]
| :BORN: 1970-12-31
| :ITOLDTHEM_EMAIL: lastn...@mydomain.at
| :ITOLDTHEM_ADDRESS: home
| :ITOLDTHEM_PHONE: mobile
| :ADDRESS_CHANGE_METHOD: email
| :CREATED:  [2015-11-11 Wed 16:51]
| :END:
|
| - first contact: <2015-11-11 Wed> when meeting at id:FooConf15
`

Here, the drawer is of particular interest to me and I'd love to
have them expanded together with the heading.

Besides, I once started an attempt to define a standard for contact
property item names in order to enable external tools to parse
contact data like [1]. Unfortunately, my focus shifted and I did not
follow my standardization attempt much further:
http://thread.gmane.org/gmane.emacs.orgmode/45347/focus=45740
http://thread.gmane.org/gmane.emacs.orgmode/47434/focus=47490
http://article.gmane.org/gmane.emacs.orgmode/57231/
[...]


Two notions: first, content of properties are of different interest
for different people in different org-mode files with different
data. It's hard to derive a general rule here.

Second, I still do think that a bit more standardization would be a
benefit for Org-mode (contact data, order of org elements, ...).
Having written a pretty dumb Org-mode parser in Python by myself for
[2] I recognized that this is not an easy job to do properly outside
of Elisp. And: being able to use Org-mode files outside of
Emacs/Elisp is also of interest for all users of Emacs/Elisp.

Just my 2 cents.


[1] https://github.com/novoid/org-contacts2vcard

[2] https://github.com/novoid/lazyblorg

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Kaushal Modi
Have you had a look at https://github.com/rudolfochrist/interleave

The interleave package works great for me: taking notes in an org-mode
buffer in one side (buffer) corresponding to the pdf page open in
pdf-tools on the other side (buffer).



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Xebar Saram
thanks for the interesting post!

you now have 0+1 readers (just subscribed via rss)  ;-)

best

Z

On Wed, Nov 11, 2015 at 4:42 PM, Matt Price  wrote:

> I've just written up a post on my workflow for PDF's Since my blog has, I
> think, a readership of 0 (surely there's a way to get emacsers to follow
> me? ah well), I will post a link here in the hopes that someone will be
> interested:
>
> http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/
>
> All best!
> Matt
>


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Peter Davis
Matt Price  writes:

> I've just written up a post on my workflow for PDF's Since my blog
> has, I think, a readership of 0 (surely there's a way to get emacsers
> to follow me? ah well), I will post a link here in the hopes that
> someone will be interested:
>
> http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/

Thanks, Matt. This looks interesting. I've run into poppler before, but was not 
familiar with pdf-tools. I'll have to take a closer
look.

-pd



Re: [O] Lexical binding bug in org-list.el?

2015-11-11 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> LGTM.  I’ve probably met my quota of org-related fun for the day (see
> below...), but implementing this in terms of elements will be my next
> org-list related task.

What is "this"?

Unfortunately org-list and Elements do not play nicely with each other
at the moment, because of org-struct, i.e., because of lists outside Org
buffers. Hence the `org-list-struct' and `org-element--list-struct'
duplication.

> It’s very lightly tested so far.  I basically just used the following
> snippet as a test case: put it in an org-mode buffer, put your cursor
> somewhere inside the list, and M-: (org-list-to-subtree2)

OK. Some comments follow.

> OK.  Don’t hesitate to ask if there’s some way we can help, of course.

I'll send a patch once I have the time to do this (depending on the bug
reports). I'd appreciate if you could update Babel accordingly.

> +(defun org-list--partial-parse-contents (parse)
> +  "Get the actual contents of a partial org-mode parse.
> +
> +Specifically, when parsing a piece of text smaller than a
> +headline, `org-element-parse-buffer' wraps its result with a
> +dummy `section' element, as well as the standard `org-data'
> +wrapper.  This function removes these, returning a list of
> +org-elements.
> +
> +TODO: maybe this needs a more general name."
> +  (org-element-contents
> +   ;; strip the org-data element
> +   (nth 0 (org-element-contents
> +;; and the section element
> +parse

Actually, I often wonder if `section' should appear at all in the parse
tree. I mean, it is an important feature for export, but it could be
added automatically at export time (i.e., in `org-export-as', like many
other tree transforms) without cluttering the original parse tree.

Also, here, you probably really want

  (org-element-map parse org-element-all-elements #'identity nil t)

since you're going to handle a single element anyway.

> +(defun org-list--split-first-line (contents)
> +  "Remove the first line of text from an org-element item.
> +
> +CONTENTS are the contents of the item org-element: at least a
> +paragraph followed by zero or more other elements.
> +
> +Returns a cons of the first textual line and a list of
> +org-elements representing the structure of the item minus this
> +line.
> +
> +TODO: is the first daughter of an item always a paragraph?"

Absolutely not. E.g.,

   - 

 | a |

   - item 2


> +  (let ((graf (nth 0 contents)))
> +(unless (eq (org-element-type graf) 'paragraph)
> +  (error "`org-list--split-first-line' got confused"))

See above.

> +(goto-char (org-element-property :begin graf))
> +(let* ((eol (point-at-eol))

Use the original! -> `line-end-position'. This one is a compatibility
alias for XEmacs.

> +(end (org-element-property :end graf))
> +(first-line (buffer-substring-no-properties (point) eol)))
> +  (if (> (1+ eol) end)
> +   ;; One line paragraph: it becomes the entirety of the
> +   ;; headline, and we remove it from contents
> +   (setq contents (cdr contents))
> + ;; Multi-line paragraph: narrow the buffer to lines 2-N, parse
> + ;; them, and set them as the contents of the paragraph.
> + (save-restriction
> +   (widen)
> +   (narrow-to-region (1+ eol) end)
> +   (org-element-set-contents graf
> + (org-list--partial-parse-contents
> +  ;; TODO: We're playing a trick on
> +  ;; the parser here.  AFAICT, the
> +  ;; parse does not rely on the
> +  ;; cache.  But maybe we should
> +  ;; let org-element-use-cache to
> +  ;; nil around this call, in case
> +  ;; that changes in the future.
> +  (org-element-parse-buffer)

It shouldn't change. Also, there is `org-element-copy' if you need to
alter an element obtained through `org-element-at-point'.

> +  (cons first-line contents
> +
> +(defun org-list--item-to-headline (item level)
> +  "Convert an org-element list item to a headline.
> +
> +The first line of the list item becomes the "
> +  (unless (eq (car item) 'item)
> +(error "`org-list--item-to-headline' expects an item argument"))
> +  (let* ((r (org-list--split-first-line (org-element-contents item)))
> +  (title (car r))
> +  (other-contents (cdr r)))
> +(list 'headline
> +   `(:level ,level
> +,@(when (eq (org-element-property :checkbox item) 'on)
> +(list :todo-keyword
> +  ;; TODO: how to fish the approporiate
> +  ;; value out of org-todo-keywords?
> +  "TODO"))

I'd try

  (car org-not-done-keywords)

However, it returns nil if we're parsing a non-Org buffer.

> +

Re: [O] [PATCH] org-babel-execute-src-block-region

2015-11-11 Thread Ista Zahn
I recommend using polymode[1] as a more general solution to the need to
interact with code blocks without pulling up a separate edit buffer. It
seamlessly switches major modes when point is inside a code block.

Best,
Ista

[1] https://github.com/vspinu/polymode
On Nov 11, 2015 12:11 AM, "Xebar Saram"  wrote:

> Hi
>
> I actually find it annoying in ESS to keep pressing C-c ' each time i want
> to eval a single line of code in a code block. if this could work for R
> code this would be fantastic for me
>
> thx
>
> Z
>
> On Tue, Nov 10, 2015 at 8:19 PM, Carlos Henrique Machado S Esteves <
> ch.machado.este...@gmail.com> wrote:
>
>> Hello Chuck,
>>
>> Thank you for the feedback.
>>
>> > You might want to check that point and mark are both inside the src
>> block. Otherwise, the results are unpredictable.
>> You are right, I've updated the patch.
>>
>> > ess-mode, python-mode, sh-mode and octave-mode already provide this
>> capability (and a lot more) for R, python, shell scripts, octave/matlab and
>> some other languages from the edit buffer.
>> I understand that. My idea is to avoid the need to C-c ' back and forth.
>> Actually that's a problem I have with org-babel; I usually find myself
>> coding inside the src block and losing many of the major mode
>> functionalities; switching to the edit buffer often seem too much of a
>> hassle. Any tips about how to get more major-mode functionalities inside
>> the src-block? Or should I develop the muscle memory to switch back and
>> forth to the edit buffer all the time?
>>
>> > `org-babel-demarcate-block' gives the user the ability to break up src
>> blocks into smaller pieces so they can be run independently.
>> Thanks for pointing that; I didn't know about `org-babel-demarcate-block'.
>>
>> Best,
>>
>> Carlos
>>
>> 2015-11-02 13:19 GMT-05:00 Charles C. Berry :
>>
>>> On Sun, 1 Nov 2015, Carlos Henrique Machado S Esteves wrote:
>>>
>>> Hello, I find it useful to be able to execute only a region of a source
 code block, so I've implemented a new function for that. I've tested it
 with MATLAB and Python, but it should work for any mode, since it calls
 org-babel-execute-src-block.


>>> You might want to check that point and mark are both inside the src
>>> block. Otherwise, the results are unpredictable.
>>>
>>> Also note that:
>>>
>>> ess-mode, python-mode, sh-mode and octave-mode already provide this
>>> capability (and a lot more) for R, python, shell scripts, octave/matlab and
>>> some other languages from the edit buffer.
>>>
>>> `org-babel-demarcate-block' gives the user the ability to break up src
>>> blocks into smaller pieces so they can be run independently.
>>>
>>> Best,
>>>
>>> Chuck
>>>
>>>
>>
>


[O] truncated footnote

2015-11-11 Thread Samuel Wales
* bug?  in maint, commenting a paragraph will truncate footnotes
in xanadu[fn:b3e0f07]

um

# comment

[fn:b3e0f07]
did kublai khan

# was it "seemly"?

a stately pleasure dome

decree



Re: [O] Bug: `org-timestamp-format' does not return correct time [8.2.10 (8.2.10-41-g42228a-elpa @ /home/gk/.emacs.d/packages/org-20150601/)]

2015-11-11 Thread Kyle Meyer
Hi Yaniv,

[You forgot to include the list.  Adding now.]

Yaniv Gilad  writes:

> I’m seeing the same issue:
>
>  (let ((properties (org-export-get-environment)))
> (princ (json-encode 
> (list 
>  :date (org-timestamp-format (car (plist-get properties 
> :date)) "%Y-%m-%d")
>  :author (substring-no-properties (car (plist-get properties 
> :author)))
>  :category (cdr (assoc "CATEGORY" org-file-properties))
>  :post (org-export-as backend nil nil t)
>  :title (substring-no-properties (car (plist-get properties 
> :title))

org-timestamp-format takes an element, not a string.  See the two posts
below.

http://article.gmane.org/gmane.emacs.orgmode/102033
http://article.gmane.org/gmane.emacs.orgmode/102018

-- 
Kyle



[O] Error when using `org-table-field-info'

2015-11-11 Thread Junpeng Qiu
Hi,

Here is an example to reproduce the error:

| 1 |   |
#+TBLFM: $2=$1

When I invoke `org-table-field-info' in the table above, I got following
error:
args-out-of-range [nil 0] 2

Am I not supposed to use the table like this?

M-x org-version output: Org-mode version 8.3.2 (8.3.2-32-g73a5c2-elpa @
/home/qjp/.emacs.d/elpa/org-20151109/)

-- Separator
---
The following is my debugging process. Maybe useful.:-)

Looking at the backtrace, I found the code will call
(org-table-expand-lhs-ranges '(("2" . "$1")))

Then inside `org-table-expand-lhs-ranges' function, there is a `cond'
expression, and the pattern will fall into the last branch, which calls
`org-table-get-range' to get a range in the table. I guess here we want to
convert the column formula($2=$1) to a bunch of field formulas.

However, the expression looks like this:
(org-table-get-range
 lhs org-table-current-begin-pos 1 nil 'corners)

where `lhs' is 2, and the `lhs' will be converted to "@2" in
`org-table-get-range' function, and used as a row reference. I think this
is the reason why the error happens. We only have one row, so "@2" will
cause the error in `org-table-get-range' function. If now we change the
above table to:
| 1 |   |
| 1 |   |
#+TBLFM: $2=$1

The error disappears.

In fact, as long as the number of rows are larger or equal to the largest
column number that we reference in the table formula, there is no error. In
the first example, 1<2 but in the second example 2==2.

Thanks,

-Junpeng


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Jeffrey DeLeo

Matt Price  writes:
> I've just written up a post on my workflow for PDF's

Thanks, this is helpful.




Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Ramon Diaz-Uriarte
Dear Matt,


On Wed, 11-11-2015, at 15:42, Matt Price  wrote:
> I've just written up a post on my workflow for PDF's Since my blog has, I
> think, a readership of 0 (surely there's a way to get emacsers to follow
> me? ah well), I will post a link here in the hopes that someone will be

Add another 1 :-)

> interested:
>
> http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/
>

Really neat! A few comments/questions/ramblings:

- The type of highlights you get from RepliGo contain the text itself. I
  mean, when in your pdf I use C-c C-a l, the buffer showing the contents
  of each highlight contain  the highlighted text.

  This is not what I get from, say, EzPDF (which is what I use on Android),
  or from highlighting from pdf-tools itself using C-c C-a h, or from
  highlighting from Okular. The contents just gives the rectangle). Hu...


  Because of this, when I use your code on my pdfs, I only get things
  such as

Highlight
([[pdfview:/home/ramon/Zotero-data/storage/ESHHD4KW/Frank_2015_Commentary.pdf::5][Frank_2015_Commentary]],
5)


  instead of the text. Bummer! I wonder if RepliGO gives you a lot more
  than the rest, or if I am doing something silly.


- You have to call mwp/pdf-multi-extract on each file/set of files. I guess
  if I knew elisp, I'd find it trivial to iterate over a set of directories
  and subdirectories (and do this using a cron job at night), and also
  place everything in one single org file. Would this be something
  reasonable to do?

  (This might be related to your second Todo)


- I know nothing about how it works, and it does not use pdf-tools, but in
  your first Todo you mention: "extend the pdfview link type (in
  org-pdfview) to permit me to specify the precise location of an
  annotation,".  PDF.js (https://mozilla.github.io/pdf.js/), which is
  used for instance by zotfile (http://zotfile.com/) does that and it works
  out of the box with Okular (but I've not been able to get it to work with
  pdftools).


- In case it matters, I have somewhat similar modus operandi.  I do a lot
  of PDF reading, including note-taking and highlighting, in android
  tablets ---I use EzPDF, which also embeds the notes in the PDF. I have a
  cron job that extracts all the highlights and annotations of all the PDFs
  and places them in a single org file. The kludge is explained here:
  
https://github.com/rdiaz02/Adios_Mendeley#extracting-all-pdf-annotations-and-placing-them-in-an-org-mode-file
  The truth is I use two mechanisms for PDF annotation and highlighting
  extraction, since none is fully satisfactory to me, but the one that uses
  Ruby (i.e., that does not depend on poppler) is able to actually extract
  the text of the highlights.


Best, and thanks again for sharing,


R.





> All best!
> Matt


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
FWIW, I've just updated the post with
- links that jump directly to the highlighted text
- a new custom link type that opens highlights in a temporary buffer
instead.

http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/

On Wed, Nov 11, 2015 at 11:40 AM, Jeffrey DeLeo 
wrote:

>
> Matt Price  writes:
> > I've just written up a post on my workflow for PDF's
>
> Thanks, this is helpful.
>
>
>


Re: [O] [PATCH] org-babel-execute-src-block-region

2015-11-11 Thread Xebar Saram
thanks Chuck

this sounds very interesting!

i installed polymode from melpa and added this config

#+BEGIN_SRC emacs-lisp :results none
(use-package polymode
 :ensure t
 :config
(require 'poly-R)
(require 'poly-org)
(add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
 )
#+END_SRC

i then loaded a .org file with R code and entered C-c C-n in the R code
block yet nothing happens and the point moves to the end of the block

are there additional config needed (keybinds, etc?), what am i missing?

best

z

On Wed, Nov 11, 2015 at 7:43 PM, Charles C. Berry  wrote:

> On Wed, 11 Nov 2015, Ista Zahn wrote:
>
> I recommend using polymode[1] as a more general solution to the need to
>> interact with code blocks without pulling up a separate edit buffer. It
>> seamlessly switches major modes when point is inside a code block.
>>
>> Best,
>> Ista
>>
>> [1] https://github.com/vspinu/polymode
>>
>
> Ista,
>
> Thanks for this pointer. I've been meaning to check out polymode for
> some time, and your posting gave me the push to try it out.
>
> For anyone who wants to try it, after cloning into ~/elisp/polymode I
> only needed to add this in my init (ESS was already in my init).
>
> #+BEGIN_SRC emacs-lisp
> (setq load-path
>   (append '("~/elisp/polymode"  "~/elisp/polymode/modes")
>   load-path))
> (require 'poly-org)
> (add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
> #+END_SRC
>
> When point is inside a src-block the local mode prevails. So, C-c C-n
> inside an R src block sends the line point is on to the R process. C-c
> C-c sends the region (or function or paragraph) to the process when
> point is in the body. To execute `org-ctrl-c-ctrl-c' on the src block
> with the C-c C-c keying, it is necessary to move point to before or
> after the body.
>
> ---
>
> Now that I have tried this, I agree that it is better to let polymode
> handle this kind of interaction than to try to build it into Org mode.
>
> Best,
>
> Chuck
>
>


Re: [O] Spreadsheet error: invalid reference when using @> in range

2015-11-11 Thread Nicolas Goaziou
Karl Voit  writes:

> However, this does not work at my side:
>
> |   | 20 | 21 | 22 | 23 | 24 |
> | Foo + 2 Bar + Foo + Bar + Foo |  3 |||||
> |---+++++|
> |   ||||||
> |---+++++|
> |   |  1 |  1 |||  1 |
> | Foo   |  2 |||||
> | Bar   |||  2 |  3 ||
> |---+++++|
> |   ||||||
> |---+++++|
> | Bar   ||  4 |  1 |||
> | Foo   |||  2 ||  2 |
> | Bar   |||  3 |  5 ||
> | Foo   ||  1 |||  5 |
> |---+++++|
> #+TBLFM: @2$2..@2$>=vsum(@3..@>)
>
> At least, the error is gone. What might be the cause of the wrong
> result?

You need to update Org.

Regards,



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
On Wed, Nov 11, 2015 at 12:09 PM, Memnon Anon 
wrote:

> Matt Price  writes:
>
> > [...] Since my blog
> > has, I think, a readership of 0 (surely there's a way to get emacsers
> > to follow me? ah well), I will post a link here [...]
>
> http://planet.emacsen.org/\ 

But I can't figure out how to add my blog to the list there! Can you tell
me the secret?


Re: [O] Bug: bold text followed by footnote not bold

2015-11-11 Thread Manuel Koell
Upgraded to latest org 8.3.2 from "org" package archive (used 8.2.10
before) and now it works after I did M-x org-reload and
uninstall/reinstalled latest org. Thanks!

2015-11-11 10:35 GMT+01:00 Nicolas Goaziou :

> Hello,
>
> Manuel Koell  writes:
>
> > I just encountered following behaviour:
> >
> > *foo bar*[fn:1] will export as *foo bar*1 (not bold, with stars)
> >
> > *foo bar* [fn:2] will export as foo bar 1 (bold, but you've to use a
> space
> > between bold text and marker)
> >
> > I may be wrong, but I thought a footnote marker will follow immediately
> > after the word ends. Both examples exported to html.
>
> I cannot reproduce it in latest Org.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Kaushal Modi
>  Doesn't seem to work with pdfview yet, and I'm sort of addicted now.

I use pdf-view too (the major mode for viewing PDF files that comes
with pdf-tools, right?) and interleave works great!

> I can think of some changes, e.g., would be nice to keep all my notes for all 
> books/articles/etc. in a single file

Yeah, right now it is one org file per pdf.

> if the interleave options could be set on a per-heading basis that would be 
> really cool.

What sort of options are you thinking about? Right now it creates one
org heading for each set of notes corresponding to a page.

May be you can work with the interleave.el dev to add in your ideas
and code. I had worked with him to make interleave support pdf-tools
and it was a pleasure to work with him.



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
On Wed, Nov 11, 2015 at 3:48 PM, Kaushal Modi 
wrote:

> >  Doesn't seem to work with pdfview yet, and I'm sort of addicted now.
>
> I use pdf-view too (the major mode for viewing PDF files that comes
> with pdf-tools, right?) and interleave works great!
>
ah cool, i didn't know that.

>
> > I can think of some changes, e.g., would be nice to keep all my notes
> for all books/articles/etc. in a single file
>
> Yeah, right now it is one org file per pdf.
>
> > if the interleave options could be set on a per-heading basis that would
> be really cool.
>
> What sort of options are you thinking about? Right now it creates one
> org heading for each set of notes corresponding to a page.
>

> May be you can work with the interleave.el dev to add in your ideas
> and code. I had worked with him to make interleave support pdf-tools
> and it was a pleasure to work with him.
>
I meant INTERLEAVE_PDF. I just opened an issue:
https://github.com/rudolfochrist/interleave/issues/13  so who knows,
maybe...


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
On Wed, Nov 11, 2015 at 3:17 PM, Ramon Diaz-Uriarte 
wrote:

> Dear Matt,
>
>
> On Wed, 11-11-2015, at 15:42, Matt Price  wrote:
> > I've just written up a post on my workflow for PDF's Since my blog has, I
> > think, a readership of 0 (surely there's a way to get emacsers to follow
> > me? ah well), I will post a link here in the hopes that someone will be
>
> Add another 1 :-)
>
> > interested:
> >
> > http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/
> >
>
> Really neat! A few comments/questions/ramblings:
>
> - The type of highlights you get from RepliGo contain the text itself. I
>   mean, when in your pdf I use C-c C-a l, the buffer showing the contents
>   of each highlight contain  the highlighted text.
>
>   This is not what I get from, say, EzPDF (which is what I use on Android),
>   or from highlighting from pdf-tools itself using C-c C-a h, or from
>   highlighting from Okular. The contents just gives the rectangle).
> Hu...
>
>
>   Because of this, when I use your code on my pdfs, I only get things
>   such as
>
> Highlight
>
> ([[pdfview:/home/ramon/Zotero-data/storage/ESHHD4KW/Frank_2015_Commentary.pdf::5][Frank_2015_Commentary]],
> 5)
>
>
>   instead of the text. Bummer! I wonder if RepliGO gives you a lot more
>   than the rest, or if I am doing something silly.
>
> I think that there is no standard way of storing the highlight contents. I
chose Repligo over EZPDF because it gives you access to the text of the
highlights!

Okular, I think, stores your annotations in its own database, rather than
in the pdf. You can (I think!) attach the annotations to the pdf from
inside Okular.  At leasts, that's what I remember from when I was looking
around.

Repligo stores the highlighted text in the "subject" field of the
annotation. It's possible that the content of the annotation is stored in
some other field, like "content".  Maybe you can try:

M-: (pdf-annot-get-annots) and look at the output in the *Messages*
buffer.  Can you see any evidence of the the text? Can you share what you
learned?

Politza and I are discussing this here:
https://github.com/politza/pdf-tools/issues/137

that might be a good place to ocntinue the conversation.


>
> - You have to call mwp/pdf-multi-extract on each file/set of files. I guess
>   if I knew elisp, I'd find it trivial to iterate over a set of directories
>   and subdirectories (and do this using a cron job at night), and also
>   place everything in one single org file. Would this be something
>   reasonable to do?
>
> for sure.  My elisp sucks too but I bet someone will answer you here on
the list.


>   (This might be related to your second Todo)
>
> well, wasn't what I was planning but would still be useful.

>
> - I know nothing about how it works, and it does not use pdf-tools, but in
>   your first Todo you mention: "extend the pdfview link type (in
>   org-pdfview) to permit me to specify the precise location of an
>   annotation,".  PDF.js (https://mozilla.github.io/pdf.js/), which is
>   used for instance by zotfile (http://zotfile.com/) does that and it
> works
>   out of the box with Okular (but I've not been able to get it to work with
>   pdftools).
>
> Until I found pdf-tools, I had planned to write a node wrapper for pdf.js
and grab the annotations that way.  But I don't really know how to do that,
so this turned out to be easier :-)

Anyway, I've judated the post, and it's now possible to create links to
individualt annotations, though you will have to use my updated version of
org-pdfview, until/unless Markus accepts my patch.

>
> - In case it matters, I have somewhat similar modus operandi.  I do a lot
>   of PDF reading, including note-taking and highlighting, in android
>   tablets ---I use EzPDF, which also embeds the notes in the PDF. I have a
>   cron job that extracts all the highlights and annotations of all the PDFs
>   and places them in a single org file. The kludge is explained here:
>
> https://github.com/rdiaz02/Adios_Mendeley#extracting-all-pdf-annotations-and-placing-them-in-an-org-mode-file
>   The truth is I use two mechanisms for PDF annotation and highlighting
>   extraction, since none is fully satisfactory to me, but the one that uses
>   Ruby (i.e., that does not depend on poppler) is able to actually extract
>   the text of the highlights.
>
> ah, man, that looks really cool and I'm sorry I didn't know about it
earlier! I haven't read through your whole document but looks like there's
a lot useful stuff there.



>
> Best, and thanks again for sharing,
>
> you're welcome & thank you!
m


Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Price
On Wed, Nov 11, 2015 at 9:59 AM, Kaushal Modi 
wrote:

> Have you had a look at https://github.com/rudolfochrist/interleave


not till now!

>
>
> The interleave package works great for me: taking notes in an org-mode
> buffer in one side (buffer) corresponding to the pdf page open in
> pdf-tools on the other side (buffer).
>
Huh.  Looks pretty neat.  Doesn't seem to work with pdfview yet, and I'm
sort of addicted now. But it seems like a great idea.  I can think of some
changes, e.g., would be nice to keep all my notes for all
books/articles/etc. in a single file; if the interleave options could be
set on a per-heading basis that owuld be really cool. And if it worked with
pdfview, one could add highlights to the pdf text while writing notes in
the org window. Huh. Interesting. Thanks for sharing.


Re: [O] org-lint does not finish on some org-mode buffer

2015-11-11 Thread Nicolas Goaziou
Karl Voit  writes:

> I've done org-lint on [1] which was finished quite fast - so it's not
> an issue with my huge files only: I had to kill -9 Emacs to quit.

You can select individual checkers or categories for org-lint (see
docstring). It may be interesting to find which checker it faulty.
I guess it is `invalid-id-link'.

Also, could you provide the backtrace with an un-compiled Org? It is
much more informative.


Regards,



Re: [O] org export customization: why do #+EXCLUDE_TAGS: settings have no effect?

2015-11-11 Thread Nicolas Goaziou
Martin Steffen  writes:

> For your small example (exporting to latex) I get
>
> \begin{itemize}
> \item H1 :private:
> \item H2
> \end{itemize}

Then something may be wrong with `org-export-headline-levels', or
`org-latex-classes' in your config.

> What is strange though: the emacs-variable org-export-headline-levels
> does not change when doing that, expect that I would have expected that
> refreshing the buffer would do exactly that: update that variable and
> thereby influencing the sectioning-levels:
>
> -
> org-export-headline-levels is a variable defined in `ox.el'.
> Its value is 3
> ...
> This option can also be set with the OPTIONS keyword,
> e.g. "H:2".
> -

ox-beamer uses this option item for something else,
`org-beamer-frame-level'. IOW `org-export-headline-levels' has no effect
during Beamer export.

> I did not to comprehensive experiments which #+OPTIONS work or work
> strangely, I just noticed that H:3 etc ``work'' (but I don't know why),
> whereas the #EXCLUDE_TAGS do ``not work'' when refreshing the
> buffer. For instance in that simple example you provided.

Did you try with emacs -Q?


Regards,




Re: [O] "Capture"-like browser plugin?

2015-11-11 Thread Samuel Wales
the org capture extension seems to no longer put an icon on the
address bar in iceweasel 42.0, fwiw.  of course, this could be due to
other extensions for all i know.

i wonder if doing it [the org protocol firefox stuff] manually would
be less sensitive to firefox version changes?  anybody got foolproof
instructions?


On 9/30/15, Peter Salazar  wrote:
> For those of you on OSX, there's also an Alfred workflow for org-capture:
> https://github.com/jjasghar/alfred-org-capture
>
> org-capture from within any app with one keystroke...
>
> On Fri, Sep 18, 2015 at 5:50 PM, Samuel Wales  wrote:
>
>> fwiw my x logs contain some lines like these:
>>
>> Waiting for Emacs...
>> Waiting for Emacs...*ERROR*: Capture abort: (end-of-file)
>>
>>
>


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

Ramsay's disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] [PATCH] org-babel-execute-src-block-region

2015-11-11 Thread Charles C. Berry

On Wed, 11 Nov 2015, Xebar Saram wrote:


thanks Chuck

this sounds very interesting!

[...]


i then loaded a .org file with R code and entered C-c C-n in the R code
block yet nothing happens and the point moves to the end of the block

are there additional config needed (keybinds, etc?), what am i missing?



Is there an R session running? If so, look in the session buffer. The 
result should be there. Not sure what needs to be done to display that 
buffer automatically.


In my trials, a session would be started when C-c C-n was invoked if there 
was not one already up and running.


Chuck



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Matt Lundin
Matt Price  writes:
>
> I think that there is no standard way of storing the highlight
> contents. I chose Repligo over EZPDF because it gives you access to
> the text of the highlights!

> Okular, I think, stores your annotations in its own database, rather
> than in the pdf. You can (I think!) attach the annotations to the pdf
> from inside Okular. At leasts, that's what I remember from when I was
> looking around.

> Repligo stores the highlighted text in the "subject" field of the
> annotation. It's possible that the content of the annotation is stored
> in some other field, like "content". Maybe you can try:

Repligo (as you say) grabs the text in the highlighted region and adds
it to the "subject" connected to the highlight. I think it is rather
unique in doing so. AFAIK, Okular, pdf-tools, or other android tools
(mupdf, xodo reader) do not not do this. In other words, it is thanks of
Repligo's previous extraction that the function on Matt's blog is able
get the text of the highlighted region.

Otherwise, you would need a means of going back into the region
highlighted and extracting the embedded text. Pdf-tools doesn't
currently extract the text, but it might not be that difficult to modify
it to do so, since it already has the bounds of the highlighted region
and can select and copy text embedded in the pdf.

Best,
Matt