[O] Stack overflow in regexp matcher

2014-10-23 Thread Alan Schmitt
Hello,

I've just got the following backtrace when opening an org
file. Unfortunately I cannot reproduce it reliably, but I was wondering
if others had seen something similar.

Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
  re-search-forward("^[^%]*usepackage.*{biblatex}" nil t)
  reftex-using-biblatex-p()
  reftex-locate-bibliography-files("/Users/schmitta/Documents/Org/")
  byte-code("…" [file master-dir file-found buf docstruct 
reftex-keep-temporary-buffers reftex-locate-file "tex" 
reftex-get-buffer-visiting buffer-file-name file-error throw exit nil message 
"Scanning file %s" reftex-get-file-buffer-force t bof syntax-table 
((set-syntax-table saved-syntax)) set-syntax-table 1 re-search-forward 
reftex-match-string 0 7 "label{" fboundp TeX-current-macro 
LaTeX-current-environment match-data ((byte-code "…" [save-match-data-internal 
set-match-data evaporate] 3)) ((byte-code "…" [save-match-data-internal 
set-match-data evaporate] 3)) reftex-label-info 3 92 -1 5 "Scanning %s %s ..." 
rassoc 6 delq mapcar #[(x) "…" [x include-file string-match] 3] 
reftex-parse-from-file 9 reftex-init-section-numbers appendix 10 ...] 7)
  reftex-parse-from-file("/Users/schmitta/Documents/Org/boardgames-runx.org" 
nil "/Users/schmitta/Documents/Org/")
  reftex-do-parse(1 nil)
  reftex-access-scan-info((16))
  reftex-parse-all()
  (progn (reftex-parse-all) (reftex-set-cite-format (quote ((98 . 
"[[bib:%l][%l-bib]]") (99 . "\\cite{%l}") (110 . "[[note:%l][%l-note]]") (108 . 
"%t (%a)\n[[bibdesk:/Users/schmitta/projets/bib/alan.bib::%l][%l-BibDesk]]") 
(116 . "%t") (104 . "** %t (%a)\n:PROPERTIES:\n:Custom_ID: 
%l\n:END:\n[[bib:%l][%l-bib]]\n[[bibdesk:/Users/schmitta/projets/bib/alan.bib::%l][%l-BibDesk]]")
  (and (buffer-file-name) (file-exists-p (buffer-file-name)) (progn 
(reftex-parse-all) (reftex-set-cite-format (quote ((98 . "[[bib:%l][%l-bib]]") 
(99 . "\\cite{%l}") (110 . "[[note:%l][%l-note]]") (108 . "%t 
(%a)\n[[bibdesk:/Users/schmitta/projets/bib/alan.bib::%l][%l-BibDesk]]") (116 . 
"%t") (104 . "** %t (%a)\n:PROPERTIES:\n:Custom_ID: 
%l\n:END:\n[[bib:%l][%l-bib]]\n[[bibdesk:/Users/schmitta/projets/bib/alan.bib::%l][%l-BibDesk]]"))
  org-mode-reftex-setup()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook 
org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook 
outline-mode-hook org-mode-hook))
  run-mode-hooks(org-mode-hook)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(# 
"~/Documents/Org/boardgames-runx.org" nil nil 
"~/Documents/Org/boardgames-runx.org" (1095881 16777220))
  find-file-noselect("/Users/schmitta/Documents/Org/boardgames-runx.org" nil 
nil WILDCARDS)
  find-file("/Users/schmitta/Documents/Org/boardgames-runx.org" WILDCARDS)

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] extra newlines in TYPE checkitem for capture-templates

2014-10-23 Thread Brady Trainor
Brady Trainor  writes:
>
> A solution would be to use file+headline, then not using :prepend
> prevents an extra line, but my headline is the date and varies.
>

I solved my problem this way by modifying the function 
insert-date-N-days-from-current to print instead of insert. Now I can use 
file+headline and avoid :prepend. 

#+BEGIN_SRC emacs-lisp
(defun print-date-N-days-from-current (&optional days)
  "Print date that is DAYS from current."
  (interactive "p*")
  (print
   (calendar-date-string
(calendar-gregorian-from-absolute
 (+ (calendar-absolute-from-gregorian (calendar-current-date))
days)

(setq org-capture-templates
  `(("p" "pomodoro, checklist"
 checkitem (file+headline ,pomodoro ,(print-date-N-days-from-current 0))
 ""))) 
#+END_SRC

--
Brady




Re: [O] Announcement: org-one-to-many

2014-10-23 Thread Daniel Clemente
El Thu, 23 Oct 2014 19:58:48 +0200 Marcin Borkowski va escriure:
> > For instance, you can get all headers tagged with "tobesplit" like this:
> > (org-map-entries (lambda () (line-number-at-pos))  "+tobesplit" 'agenda)
> >
> > One of the possible searches is "headers at level 2", so this new system
> > would include the one you have.
> 
> I thought about it.  I'd like to first make my code a bit cleaner and
> fix one bug I know of.  I think this will be fairly easy; I could split
> headers with some property (a tag might not be a good idea, since tags
> are inherited).
> 

Tag inheritance is customizable (org-use-tag-inheritance). I don't use it.

Anyway, if I have:
* :publish:
** b
** ccc:publish:
** 
* 

Well, it makes sense to export 2 .org: aaa.org (including ,,ddd) and 
ccc.org (including only ccc)




Re: [O] Yank "normal" text as item in list

2014-10-23 Thread Eric Abrahamsen
Igor Sosa Mayor  writes:

> Hi,
>
> often I have to yank 'normal' text, that means, text which is not
> indented into a item of a list. In other words, maybe, to convert it
> into a list item.
>
> I have always the problem that, when the text over one line goes, it
> does not get the correct indentation.
>
> Is there maybe a magical function to get this?
>
> Many thanks in advance!

I don't know what situation in particular you've got, but what often
works for me is going to the line of the yanked text that I want to be
the first line of a new list item, and using "C-c -" to explicitly
convert it to an item. That command includes some indentation heuristics
that, for me anyway, often creates the result I was looking for.




Re: [O] Org-mode Habit with Varying Description

2014-10-23 Thread Pete Ley
> All I've got now are a function that finds the logbook, and another that
> parses the log items and normalizes them: extracts the TODO
> states/timestamps/key-values and sets them as properties on the items
> themselves. Then you've got a pretty good basis from which to do
> reporting.
>
> Hooking into note-taking and todo state-change logging to prompt for
> values should be easy.
>
> I don't know yet how to approach the reporting part, mostly because I
> haven't sat down and thought about how this would be most useful. It
> will also require reading org-clock and org-habit in detail -- clearly
> reporting to a table like they do is the right way to go.
>
> How to get the most out of the data? I was thinking of having
> COLUMN_FORMULA and TABLE_FORMULA properties on the heading. When you
> report from the heading, each key in the logbook data creates a table
> column. Each column formula property creates another column, populated
> by that formula (presumably calculated from the data columns). Then the
> table formula gets slapped on to the bottom of it, and the whole thing
> runs.
>
> So if you had a heading like this:
>
> * TODO Anneal galoshes
>   :LOGBOOK:
>   GALOSHES: 15; CLOCK: [2014-10-15 Wed 09:07]--[2014-10-15 Wed 17:10] =>  8:03
>   GALOSHES: 13; CLOCK: [2014-10-14 Tue 08:50]--[2014-10-14 Tue 16:30] =>  7:40
>   GALOSHES: 14; CLOCK: [2014-10-13 Mon 09:30]--[2014-10-13 Mon 17:06] =>  7:36
>   :END:
>
> You'd end up with a table with two data columns. Then you could have a
> COLUMN_FORMULA property that created a third column, displaying galoshes
> annealed per hour. And a TABLE_FORMULA property that did... something...
> with all that information.
>
> In a sense, it's a bit like column view, except using logbook data
> rather than property values.

This sounds pretty great. I'd like to see the functions you have anyway,
seems like something the community might find useful. I know I could
find a few use cases for it.



[O] extra newlines in TYPE checkitem for capture-templates

2014-10-23 Thread Brady Trainor


I am prepending a checkboxed plain list item to a file named "pomodoro.org" 
(I'm not really doing pomodoro here anymore, it started as this but the unique 
filename stuck, and it is my ad-hoc datetree). It is organized much like a 
datetree, but flatter and newest first, thus the use of prepend. However, the 
capture buffer includes two extra newlines, which I must get rid of before or 
after completing the capture. 

Is this desired behavior for capture-templates TYPE checkitem? 

I am still on ELPA version of org, 8.2.10. 

Here is my 

#+BEGIN_SRC emacs-lisp
(setq pomodoro "~/pomodoro.org")
(setq org-capture-templates
  `(("p" "pomodoro, checklist" checkitem (file ,pomodoro)
 ""
 :prepend t
 :empty-lines 0
 :empty-lines-before 0
 :empty-lines-after 0
 ;; :unnarrowed t
 )))
#+END_SRC

The result of consecutive captures looks like: 

#+BEGIN_SRC org

- [ ] a second capture

- [ ] a first capture

#+END

The spacing is doubled if I use `:unnarrowed t'. 

I have also tried `(file+regexp ,pomodoro "- \\[")', but I still get the extra 
line. 

A solution would be to use file+headline, then not using :prepend prevents an 
extra line, but my headline is the date and varies. 

Thank you, 

--
Brady




Re: [O] Exponents / subscripts

2014-10-23 Thread Nicolas Goaziou
Rasmus  writes:

> Bur surely the fact that $\beta$ is displayed $β$ is a consequence of
> org-entities.el?  Whether desirable or not.

That's the leak I'm talking about. You can also insert "\beta" in an
example block.

> Just out of curiosity, can you mention a couple of (org) function to
> look at to see how fontification works?

`org-set-font-lock-defaults', `org-do-emphasis-faces',
`org-raise-scripts'... and basically every function with a single LIMIT
argument.



Re: [O] Exponents / subscripts

2014-10-23 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> An external library is ideal (had it existed), but where to stop?  Are
>> entities wrapped in math "supported syntax"?
>> E.g. "$\alpha\beta\gamma\delta$".
>
> No. What is inside a math snippet/environment is a black box for Org.
> Entities are a different beast that do not require a math environment
> (e.g., "\alpha" is not considered to be LaTeX code).

Bur surely the fact that $\beta$ is displayed $β$ is a consequence of
org-entities.el?  Whether desirable or not.

>> So your strategy would be to disable fontification within math (since
>> the syntax is not org), and delegate it to a separate library, say
>> tex-fold.el (which also doesn't work out-of-the-box in Org-buffers)?
>> In theory it's ideal, but consistency (e.g. supported entities) and
>> comparability is probably issues.
>
> I don't think so. No fontification at all on LaTeX code is a decent
> default in an Org buffer. Additional, exact, fontification for it is
> a nice bonus.

I would like to agree, but I get too much joy from the current
imprecise implementation.  From a practical perspective the current
state is OK and much preferable over the alternative.  IOW and IMO,
let's not touch it unless we've got something better!

>>> This doesn't solve the leak of Org's fontification on math snippets and
>>> environments.
>>
>> But it would if you can delegate parsing of math to a separate
>> library, no?
>
> No it wouldn't, because Org would still have to fontify sub/superscript
> outside math snippets. Of course, dedicated fontification could override
> leaked one, but I think this would be troublesome in some occasions.
>
> At some point, I hope to introduce the parser in the fontification
> process, which would some the problem.

Just out of curiosity, can you mention a couple of (org) function to
look at to see how fontification works?

—Rasmus

-- 
m-mm-mmm- bacon!



Re: [O] [ox-latex] How to force ALL captions below their referents?

2014-10-23 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> I don't actually understand you.

`org-latex-table-caption-above' is now an alias for
`org-latex-caption-above', so the default values ought to be the same.

> All I know is that I had nothing set explicitly anywhere to do with
> captions and, all of a sudden, the behaviour has changed. This seems
> wrong. If I understand things correctly, a new variable has been
> introduced to control behaviour that previously was implicit. By
> introducing this variable, the default (previously implicit but now
> explicit) behaviour has changed.

IIUC, the old behaviour wasn't consistent (some captions above, some
below). This is the original motivation for this change.

I would be happy to make the transition smoother. However, I don't know
how to achieve complete backward compatibility, considering the remark
above.


Regards,

-- 
Nicolas Goaziou



Re: [O] Adding `sort' in R makes the output fail

2014-10-23 Thread Charles C. Berry



On Thu, 23 Oct 2014, Sebastien Vauban wrote:


"Charles C. Berry" wrote:

On Thu, 23 Oct 2014, Sebastien Vauban wrote:


The following code does return a corrupted answer, while it's supposed
to return a sorted dataframe.


Not so. See below.


So, that's RStudio that's wrong, in some way?



Hmmm. Not exactly wrong.

There are a few wrinkles:

org-babel-R-write-object-command specifies a call to 
'write.table(object)', where `object' is what is to be printed.


`write.table' coerces whatever it is trying to print to a 
`data.frame'. See ?write.table


There is a method for `table' in `as.data.frame'. Try

 as.data.frame(table(1:3))

in the console or R gui to get a sense of what happens.

There is also an `array' method for `as.data.frame', but with a one 
dimensional array it passes control to the `vector' method. Try:


as.data.frame(sort(table(1:3)))

So it is really differences in the result of as.data.frame() that you were 
seeing.


I DK what RStudio does, but it must try harder a little harder to present 
1 dimensional arrays.


HTH,

Chuck





Re: [O] Exponents / subscripts

2014-10-23 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> An external library is ideal (had it existed), but where to stop?  Are
> entities wrapped in math "supported syntax"?
> E.g. "$\alpha\beta\gamma\delta$".

No. What is inside a math snippet/environment is a black box for Org.
Entities are a different beast that do not require a math environment
(e.g., "\alpha" is not considered to be LaTeX code).

> So your strategy would be to disable fontification within math (since
> the syntax is not org), and delegate it to a separate library, say
> tex-fold.el (which also doesn't work out-of-the-box in Org-buffers)?
> In theory it's ideal, but consistency (e.g. supported entities) and
> comparability is probably issues.

I don't think so. No fontification at all on LaTeX code is a decent
default in an Org buffer. Additional, exact, fontification for it is
a nice bonus.

>> This doesn't solve the leak of Org's fontification on math snippets and
>> environments.
>
> But it would if you can delegate parsing of math to a separate
> library, no?

No it wouldn't, because Org would still have to fontify sub/superscript
outside math snippets. Of course, dedicated fontification could override
leaked one, but I think this would be troublesome in some occasions.

At some point, I hope to introduce the parser in the fontification
process, which would some the problem.


Regards,

-- 
Nicolas Goaziou



Re: [O] Adding `sort' in R makes the output fail

2014-10-23 Thread Sebastien Vauban


"Charles C. Berry" wrote:
> On Thu, 23 Oct 2014, Sebastien Vauban wrote:
>>
>> The following code does return a corrupted answer, while it's supposed
>> to return a sorted dataframe.
>
> Not so. See below.

So, that's RStudio that's wrong, in some way?

>> --8<---cut here---start->8---
>> #+BEGIN_SRC R :results value replace
>> con <- textConnection("
>> indexemail
>> Aabc-hcdggtzh8xnbdgjk7y7...@public.gmane.org
>> Bdef-hcdggtzh8xnbdgjk7y7...@public.gmane.org
>> Cdef-hcdggtzh8xnbdgjk7y7...@public.gmane.org
>> Dghi-hcdggtzh8xnbdgjk7y7...@public.gmane.org
>> Eabc-hcdggtzh8xnbdgjk7y7...@public.gmane.org
>> Fdef-hcdggtzh8xnbdgjk7y7...@public.gmane.org")
>> df <- read.table(con, header = TRUE)
>> sort(table(df$email))
>> #+END_SRC
>>
>> #+results:
>> | 1 |
>> | 2 |
>> | 3 |
>> --8<---cut here---end--->8---
>
> You created a `table' object, then you sorted it creating an `array' 
> object- an object of a different class.
>
> Is this what you want?
>
> #+BEGIN_SRC R :results value replace
> con <- textConnection("
> index email
> A abc-hcdggtzh8xnbdgjk7y7...@public.gmane.org
> B def-hcdggtzh8xnbdgjk7y7...@public.gmane.org
> C def-hcdggtzh8xnbdgjk7y7...@public.gmane.org
> D ghi-hcdggtzh8xnbdgjk7y7...@public.gmane.org
> E abc-hcdggtzh8xnbdgjk7y7...@public.gmane.org
> F def-hcdggtzh8xnbdgjk7y7...@public.gmane.org")
> df <- read.table(con, header = TRUE)
> as.table(sort(table(df$email)))
> #+END_SRC
>
> #+RESULTS:
> | ghi-hcdggtzh8xnbdgjk7y7...@public.gmane.org | 1 |
> | abc-hcdggtzh8xnbdgjk7y7...@public.gmane.org | 2 |
> | def-hcdggtzh8xnbdgjk7y7...@public.gmane.org | 3 |

Yes, it is. Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-class and headers

2014-10-23 Thread Joseph Le Roux
Rasmus  writes:

> Joseph Le Roux  writes:
>
>> Eric S Fraga  writes:
>>
>>> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
 Rasmus  writes:
>>>
>>> [...]
>>>
> Will `org-clone-subtree-with-time-shift' do what you want?
>

 Thanks for the pointer, it could be very handy in my use-case, but this
 function copies the org-class as is for all clones. I would like to
>>>
>>> The idea is to use the clone function and not the org-class
>>> expression.  Combining the two simply confuses things!
>>>
>>> What I do every start of term is define an entry for each lecture slot
>>> in a week including the actual time information, lecture theatre,
>>> etc.  I then clone each individual entry using +1w for the number of
>>> weeks in the term.  I remove any subtrees generated that correspond to
>>> lectures that do not actually exist, e.g. they fall on a holiday or
>>> during our study week.
>>>
>>> Later, if an individual lecture gets cancelled, I simply remove the
>>> corresponding subtree as I do for holidays etc.
>>
>> Thank you Eric, I'll follow the advice. As Rasmus showed,
>> 'org-clone-subtree-with-time-shift' works with a timestamp, but it does
>> not with (the result of) an org-class call. Ideally, what I would like
>> to do is to specify a set of classes using org-class syntax and, as a
>> result, get a set of headers. 'org-class' is a powerful tool, but just
>> not powerful enough yet...
>
> I have used to use classes in the past, but I now use a setup close to
> Eric's.  One reasons is for good org-caldav support.  Here's how I
> schedule my Spanish classes this term:
>

Yes you're right. org-class is not practical for caldav export. That's
yet another issue I could have raised.

> (with-temp-buffer
>   (insert "* Spanish course
> ** Spanish class
> <2014-10-07 Tue 18:30-20:30>")
>   (goto-line 2)
>   (org-clone-subtree-with-time-shift 8 "+1w")
>   (save-excursion (insert "** Spanish class
> <2014-10-09 Thu 18:30-20:30>\n"))
>   (org-clone-subtree-with-time-shift 7 "+1w")
>   (goto-char (point-min)) (org-sort-entries nil ?t)
>   ;; like C-c ^ t
> (buffer-substring-no-properties (point-min) (point-max)))
>
> Of course in practice, this is easier to "interactively", but it's
> hard to describe briefly.

I see.

>
> Is there anything you miss about `org-clone-subtree-with-time-shift'¹?
> Would you be happy if it asked if you want to skip some weeks
> initially?  Or do you not like the extra space it takes?
>

Yes I would like to be able to directly specify the skipped weeks. I've
tried to hack a function for that but my elisp skills are rather
limited.

Joseph

> —Rasmus
>
> Footnotes: 
> ¹   note the "`" in the beginning, not "'"

noted


-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux



Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Eli Zaretskii
> From: Fabrice Niessen 
> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
> Date: Thu, 23 Oct 2014 19:56:32 +0200
> 
> > Now do that again, but instead of typing "finish", type "bt full"
> > after "thread 1".
> 
> You mean in another Emacs session, right?

Yes.



Re: [O] Announcement: org-one-to-many

2014-10-23 Thread Marcin Borkowski

On 2014-10-23, at 16:39, Daniel Clemente wrote:

> Hi,
> breaking a big .org file in many small pieces is one of my major concerns
> with .org and one which gives me lots of problems. Thank you very much for
> having the clear objective of one-to-many.

You're welcome!

> If your goal is HTML export, you can do a function that iterates over all
> headers and exports them (see below). But then links are broken, you need
> to decide filenames, etc. Which is what your project solves.

Or I hope so – at least;-).

> org-one-to-many has a shortcoming which is present in so many "org to blog"
> systems: it expects a particular structure (in this case, all headers at
> the same level). I suggest you iterate over search results of a normal
> search:
>
> For instance, you can get all headers tagged with "tobesplit" like this:
> (org-map-entries (lambda () (line-number-at-pos))  "+tobesplit" 'agenda)
>
> One of the possible searches is "headers at level 2", so this new system
> would include the one you have.

I thought about it.  I'd like to first make my code a bit cleaner and
fix one bug I know of.  I think this will be fairly easy; I could split
headers with some property (a tag might not be a good idea, since tags
are inherited).

> Greetings

Thanks for your input!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
>> Date: Thu, 23 Oct 2014 19:27:26 +0200
>> 
>> 920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or 
>> directory.
>> Value returned is $50 = 206279014
>> (gdb)
>> Run till exit from #0 0x0118ab67 in exec_byte_code (bytestr=206279014,
>> vector=410, maxdepth=1, args_template=21994650, nargs=21994650, args=0x0) at
>> c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
>> [New Thread 2888.0x27e8]
>> [New Thread 2888.0x1160]
>> --8<---cut here---end--->8---
>> 
>> Does it give you some meat?
>
> Some, yes.  Now do that again, but instead of typing "finish", type
> "bt full" after "thread 1".

You mean in another Emacs session, right?  Because I don't have the GDB
prompt anymore...



Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Eli Zaretskii
> From: Fabrice Niessen 
> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
> Date: Thu, 23 Oct 2014 19:27:26 +0200
> 
> 920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or 
> directory.
> Value returned is $50 = 206279014
> (gdb)
> Run till exit from #0  0x0118ab67 in exec_byte_code (bytestr=206279014, 
> vector=410, maxdepth=1, args_template=21994650, nargs=21994650, args=0x0) at 
> c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
> [New Thread 2888.0x27e8]
> [New Thread 2888.0x1160]
> --8<---cut here---end--->8---
> 
> Does it give you some meat?

Some, yes.  Now do that again, but instead of typing "finish", type
"bt full" after "thread 1".



[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
>> Date: Thu, 23 Oct 2014 12:34:01 +0200
>> 
>> > The C-z trick doesn't work on Windows.
>> 
>> That may be worth to mention it in the document?
>
> It's already there.
>
>> Fprogn (body=124089086) at c:/msys/home/Dani/emacs/trunk/src/eval.c:456
>> 456 in c:/msys/home/Dani/emacs/trunk/src/eval.c
>> Value returned is $31 = 0
>> (gdb)
>> --8<---cut here---end--->8---
>> 
>> I've typed "finish" 30 times; not sure when to stop. I still will keep
>> that Emacs open for now, so that you can ask me to work on it.
>
> You should type "finish" as long as you get the GDB prompt "(gdb)" in
> response.  We want to know which frame will not give you that prompt,
> which is the frame where Emacs loops.
>
> Btw, you don't need to type "finish" every time, just press RET after
> the first time, and GDB will repeat the last command.

OK, good to know.

Here is the full trace:

--8<---cut here---start->8---
$ gdb -p 2888
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 2888
[New Thread 2888.0x233c]
[New Thread 2888.0x2894]
[New Thread 2888.0x31a4]
[New Thread 2888.0x1d60]
[New Thread 2888.0x35c]
[New Thread 2888.0x1e2c]
[New Thread 2888.0x1cc8]
[New Thread 2888.0x1f6c]
[New Thread 2888.0x1a54]
[New Thread 2888.0x1cd4]
[New Thread 2888.0x2388]
[New Thread 2888.0x2930]
[New Thread 2888.0x664]
[New Thread 2888.0x1b70]
[New Thread 2888.0x2578]
[New Thread 2888.0x133c]
[New Thread 2888.0x18d8]
[New Thread 2888.0x1328]
[New Thread 2888.0x3110]
[New Thread 2888.0x2768]
[New Thread 2888.0x8d0]
[New Thread 2888.0x2b60]
[New Thread 2888.0x21b4]
[New Thread 2888.0x424]
[New Thread 2888.0x3068]
[New Thread 2888.0x2da0]
[New Thread 2888.0x2c08]
[New Thread 2888.0x24ac]
[New Thread 2888.0x1ee8]
[New Thread 2888.0x1fc]
[New Thread 2888.0x153c]
[New Thread 2888.0x2784]
[New Thread 2888.0x524]
[New Thread 2888.0x1614]
[New Thread 2888.0x2168]
[New Thread 2888.0xa4c]
[New Thread 2888.0x2344]
[New Thread 2888.0x2c40]
[New Thread 2888.0x11e0]
[New Thread 2888.0x1a30]
[New Thread 2888.0x2660]
[New Thread 2888.0x2e18]
[New Thread 2888.0x2a80]
[New Thread 2888.0x1ba4]
[New Thread 2888.0x15c8]
[New Thread 2888.0x270c]
[New Thread 2888.0x694]
[New Thread 2888.0x2764]
[New Thread 2888.0xe74]
[New Thread 2888.0x2914]
[New Thread 2888.0xf5c]
[New Thread 2888.0x1420]
[New Thread 2888.0x2f90]
[New Thread 2888.0x810]
[New Thread 2888.0x22cc]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs.exe...done.
0x7727f925 in ntdll!DbgBreakPoint () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) thread 1
[Switching to thread 1 (Thread 2888.0x233c)]
#0  0x0111cd8e in looking_at_1 (string=, posix=) 
at c:/msys/home/Dani/em
333 c:/msys/home/Dani/emacs/trunk/src/search.c: No such file or directory.
(gdb) finish
Run till exit from #0  0x0111cd8e in looking_at_1 (string=, 
posix=) at c:/msys/home/Dani/emacs/trunk/src/search.c:333
0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
2723c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $1 = 21994682
(gdb) finish
Run till exit from #0  0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
error return 
/usr/src/ports/gdb/gdb-7.8-2.i686/src/gdb-7.8/gdb/windows-nat.c:1239 was 5
[Thread 2888.0x22cc exited with code 0]
0x0118ab67 in exec_byte_code (bytestr=21994682, vector=780, maxdepth=2, 
args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or directory.
Value returned is $2 = 21994682
(gdb) finish
Run till exit from #0  0x0118ab67 in exec_byte_code (bytestr=21994682, 
vector=780, maxdepth=2, args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
funcall_lambda (fun=19768957, nargs=nargs@entry=1, 
arg_vector=arg_vector@entry=0x88ce44) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2962
2962c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or dir

Re: [O] Yank "normal" text as item in list

2014-10-23 Thread Igor Sosa Mayor
Alexander Baier  writes:

> What is wrong with fill-paragraph (bound to M-q by default)?

nothing, just that it does not do with I want. It works if a yank/paste
something which is pasted as a long line. But if I copy/yank text which
is already wrapped, the list identation is not kept and the item is not
really an item (only maybe the first line).

thanks in any case for your answer!


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Eli Zaretskii
> From: Fabrice Niessen 
> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
> Date: Thu, 23 Oct 2014 12:34:01 +0200
> 
> > The C-z trick doesn't work on Windows.
> 
> That may be worth to mention it in the document?

It's already there.

> Fprogn (body=124089086) at c:/msys/home/Dani/emacs/trunk/src/eval.c:456
> 456 in c:/msys/home/Dani/emacs/trunk/src/eval.c
> Value returned is $31 = 0
> (gdb)
> --8<---cut here---end--->8---
> 
> I've typed "finish" 30 times; not sure when to stop. I still will keep
> that Emacs open for now, so that you can ask me to work on it.

You should type "finish" as long as you get the GDB prompt "(gdb)" in
response.  We want to know which frame will not give you that prompt,
which is the frame where Emacs loops.

Btw, you don't need to type "finish" every time, just press RET after
the first time, and GDB will repeat the last command.

> - It sometimes unblock by itself (after less than 2 minutes).

Then maybe it isn't inflooping at all, but rather doing something
lengthy.



Re: [O] Yank "normal" text as item in list

2014-10-23 Thread Alexander Baier
On 2014-10-23 12:02 Igor Sosa Mayor wrote:
> Hi,
>
> often I have to yank 'normal' text, that means, text which is not
> indented into a item of a list. In other words, maybe, to convert it
> into a list item.
>
> I have always the problem that, when the text over one line goes, it
> does not get the correct indentation.
>
> Is there maybe a magical function to get this?
>
> Many thanks in advance!

What is wrong with fill-paragraph (bound to M-q by default)?

HTH,
-- 
Alexander Baier



Re: [O] Yank "normal" text as item in list

2014-10-23 Thread Igor Sosa Mayor
Rasmus  writes:

> I usually just do M-^, `delete-indentation' and then M-q, but maybe
> there's a better way.

thanks! I will give it a try!

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




Re: [O] Yank "normal" text as item in list

2014-10-23 Thread Rasmus
Hi,

Igor Sosa Mayor  writes:

> often I have to yank 'normal' text, that means, text which is not
> indented into a item of a list. In other words, maybe, to convert it
[+]
> into a list item.
>
> I have always the problem that, when the text over one line goes, it
> does not get the correct indentation.
>
> Is there maybe a magical function to get this?
>
> Many thanks in advance!

I usually just do M-^, `delete-indentation' and then M-q, but maybe
there's a better way.

-- 
C is for Cookie




Re: [O] Announcement: org-one-to-many

2014-10-23 Thread Daniel Clemente
Hi,
breaking a big .org file in many small pieces is one of my major concerns
with .org and one which gives me lots of problems. Thank you very much for
having the clear objective of one-to-many.

If your goal is HTML export, you can do a function that iterates over all
headers and exports them (see below). But then links are broken, you need
to decide filenames, etc. Which is what your project solves.

org-one-to-many has a shortcoming which is present in so many "org to blog"
systems: it expects a particular structure (in this case, all headers at
the same level). I suggest you iterate over search results of a normal
search:

For instance, you can get all headers tagged with "tobesplit" like this:
(org-map-entries (lambda () (line-number-at-pos))  "+tobesplit" 'agenda)

One of the possible searches is "headers at level 2", so this new system
would include the one you have.

Greetings

On Tue, Oct 21, 2014 at 10:02 PM, Marcin Borkowski 
wrote:

> Hi all,
>
> a long time ago I asked here about a way to split an Org file into a
> bunch of smaller ones.  One of the answers I got was that the tricky
> part is maintaining internal links in a reasonable way.
>
> It is probably overoptimistic on my side, but it seems that this problem
> is solved now.  The code is not very elegant, and I will be actively
> working on it (I want to write an org-to-e-learning exporter, based on
> the HTML one, and this is a small part of that effort), but here it is
> for testing/review/bug reports/feature requests/any other kind of
> feedback.
>
> And here it is: https://github.com/mbork/org-one-to-many
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Adam Mickiewicz University
>
>


[O] Adding `sort' in R makes the output fail

2014-10-23 Thread Sebastien Vauban
Hello,

The following code does return a corrupted answer, while it's supposed
to return a sorted dataframe.

--8<---cut here---start->8---
#+BEGIN_SRC R :results value replace
con <- textConnection("
index   email
A   a...@example.com
B   d...@example.com
C   d...@example.com
D   g...@example.com
E   a...@example.com
F   d...@example.com")
df <- read.table(con, header = TRUE)
sort(table(df$email))
#+END_SRC

#+results:
| 1 |
| 2 |
| 3 |
--8<---cut here---end--->8---

See video at http://screencast.com/t/4u4Sj1Mkycwp to see the effect of
adding `sort', and see the output in RStudio (correct in both cases:
with and without `sort') on the right side of the video.

What's wrong here?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Paper Size for Exported LaTeX

2014-10-23 Thread Kenneth Jacker
  ak> Anyway, if you prefer to specify margins directly, rather than calculating
  ak> them via \textwidth, you can also use the geometry package, e.g.

  ak> #+LATEX_HEADER: \usepackage[various options]{geometry}

And that's what I did ...

Thanks to all who contributed to my initial query!

  -Kenneth



[O] orgtbl-to-matlab

2014-10-23 Thread Tak Kunihiro
Since LaTeX + radiotable is so comfortable, I start to use it on
MATLAB coding.  The translator may be useful for some and I want to
let you know.

%{
#+ORGTBL: SEND tbl:radiotable orgtbl-to-matlab :no-escape t
|x | y | symbol |
|--+---+|
| 0.79 | 0.243 | +  |
| 0.78 | 0.230 | x  |
| 0.78 | 0.242 | .  |
%}
% BEGIN RECEIVE ORGTBL tbl:radiotable
x = [0.79 0.78 0.78];
y = [0.243 0.230 0.242];
symbol = {'+','x','.'};
% END RECEIVE ORGTBL tbl:radiotable


(defun orgtbl-to-matlab (table params)
  "Convert the orgtbl-mode table to MATLAB statements."
  (let* ((*list-is-num* org-table-last-alignment)
 (*table-flip* (orgtbl-to-orgtbl-flip table))
 (*index* (number-sequence 0 (1- (length *table-flip*)
(mapconcat (lambda (ii) (orgtbl-to-matlab--column
 (nth ii *table-flip*) params (nth ii 
*list-is-num*)))
   *index* "\n")))

(defun orgtbl-to-matlab--column (table-nth-col params is-num-p)
  "Convert a column of the orgtbl-mode table to a MATLAB statement."
  (let ((params2 (list
   :lstart (if is-num-p "[" "{'")
   :sep(if is-num-p " " "','")
   :lend   (if is-num-p "];" "'};")
   :no-escape t))
 (*var-name* (car table-nth-col))
 (*dataset* (cdr table-nth-col)))
(if is-num-p ;; return NaN when a cell in orgtbl is empty
(setq *dataset* (mapcar
 (lambda (x) (if (string= x "") "NaN" x)) *dataset*)))
(format "%s = %s"
*var-name*
(orgtbl-to-generic (list *dataset*) (org-combine-plists params2 
params)

(defun orgtbl-to-orgtbl-flip (table)
  "Flip the orgtbl-mode table."
  (with-temp-buffer
(insert (orgtbl-to-orgtbl table nil))
(goto-char (1+ (org-table-begin)))
(org-table-transpose-table-at-point)
(goto-char (1+ (org-table-begin)))
(org-table-to-lisp)))



[O] [patch] Minor worg patch for org-drill documentation

2014-10-23 Thread Puneeth Chaganti
Hi,

This is a minor patch to the documentation of org-drill.

Thanks for the wonderful extension to org, Paul!

-- 
Puneeth
From 1e4d3a5a673090ac5ce82a804c38fac2fcbb978e Mon Sep 17 00:00:00 2001
From: Puneeth Chaganti 
Date: Thu, 23 Oct 2014 17:48:29 +0530
Subject: [PATCH] Org-drill uses || instead of | for cloze hints.

This was changed in org-drill version 2.3.7
---
 org-contrib/org-drill.org | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/org-contrib/org-drill.org b/org-contrib/org-drill.org
index d3baa3f..a226132 100644
--- a/org-contrib/org-drill.org
+++ b/org-contrib/org-drill.org
@@ -146,7 +146,7 @@ When the user presses a key, the text "Tallinn" will become visible.
 
 
 Clozed text can contain a "hint" about the answer. If the text surrounded
-by single square brackets contains a `|' character (vertical bar), all text
+by single square brackets contains `||' (two vertical bars), all text
 after that character is treated as a hint. During testing, the hint text will
 be visible when the rest of the text is hidden, and invisible when the rest of
 the text is visible.
@@ -154,8 +154,8 @@ the text is visible.
 Example:
 
 #+BEGIN_EXAMPLE
-Type 1 hypersensitivity reactions are mediated by [immunoglobulin E|molecule]
-and [mast cells|cell type].
+Type 1 hypersensitivity reactions are mediated by [immunoglobulin E||molecule]
+and [mast cells||cell type].
 #+END_EXAMPLE
 
 #+BEGIN_QUOTE
@@ -257,7 +257,7 @@ There is more than one fact in this statement -- you could create a single
 
 #+BEGIN_EXAMPLE
 The capital city of [New Zealand] is [Wellington], which is located in
-the [North|North/South] Island and has a population of about [400,000].
+the [North||North/South] Island and has a population of about [400,000].
 #+END_EXAMPLE
 
 But this card will be difficult to remember. If you get just one of the 4
@@ -291,7 +291,7 @@ the North Island.
 
 ,* Fact
 The capital city of New Zealand is Wellington, which is located in
-the [North|North/South] Island.
+the [North||North/South] Island.
 #+END_EXAMPLE
 
 However, this is really cumbersome. Multicloze card types exist for this
@@ -339,7 +339,7 @@ will be hidden.
   :END:
 
 The capital city of [New Zealand] is [Wellington], which is located in
-the [North|North/South] Island and has a population of about [400,000].
+the [North||North/South] Island and has a population of about [400,000].
 #+END_EXAMPLE
 
 
-- 
1.9.1



Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org, Org-mode List 
>> Date: Wed, 22 Oct 2014 12:35:30 +0200
>> 
>> I reproduced the problem.
>> 
>> Then, I tried (multiple times) to C-z in the GDB session, but nothing
>> happens: Emacs stays block and I don't get any GDB prompt.
>> 
>> Am I missing something?
>
> The C-z trick doesn't work on Windows.

That may be worth to mention it in the document?

> So instead run Emacs normally, reproduce the problem, and then attach
> the debugger to the running Emacs with "gdb -p PID", where PID is the
> numerical process ID of Emacs.  Then switch to thread 1, and do what
> etc/DEBUG says about "finish".

OK. Just did it.

--8<---cut here---start->8---
$ gdb -p 2888
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 2888
[New Thread 2888.0x233c]
[New Thread 2888.0x2894]
[New Thread 2888.0x31a4]
[New Thread 2888.0x1d60]
[New Thread 2888.0x35c]
[New Thread 2888.0x1e2c]
[New Thread 2888.0x1cc8]
[New Thread 2888.0x1f6c]
[New Thread 2888.0x1a54]
[New Thread 2888.0x1cd4]
[New Thread 2888.0x2388]
[New Thread 2888.0x2930]
[New Thread 2888.0x664]
[New Thread 2888.0x1b70]
[New Thread 2888.0x2578]
[New Thread 2888.0x133c]
[New Thread 2888.0x18d8]
[New Thread 2888.0x1328]
[New Thread 2888.0x3110]
[New Thread 2888.0x2768]
[New Thread 2888.0x8d0]
[New Thread 2888.0x2b60]
[New Thread 2888.0x21b4]
[New Thread 2888.0x424]
[New Thread 2888.0x3068]
[New Thread 2888.0x2da0]
[New Thread 2888.0x2c08]
[New Thread 2888.0x24ac]
[New Thread 2888.0x1ee8]
[New Thread 2888.0x1fc]
[New Thread 2888.0x153c]
[New Thread 2888.0x2784]
[New Thread 2888.0x524]
[New Thread 2888.0x1614]
[New Thread 2888.0x2168]
[New Thread 2888.0xa4c]
[New Thread 2888.0x2344]
[New Thread 2888.0x2c40]
[New Thread 2888.0x11e0]
[New Thread 2888.0x1a30]
[New Thread 2888.0x2660]
[New Thread 2888.0x2e18]
[New Thread 2888.0x2a80]
[New Thread 2888.0x1ba4]
[New Thread 2888.0x15c8]
[New Thread 2888.0x270c]
[New Thread 2888.0x694]
[New Thread 2888.0x2764]
[New Thread 2888.0xe74]
[New Thread 2888.0x2914]
[New Thread 2888.0xf5c]
[New Thread 2888.0x1420]
[New Thread 2888.0x2f90]
[New Thread 2888.0x810]
[New Thread 2888.0x22cc]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs.exe...done.
0x7727f925 in ntdll!DbgBreakPoint () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) thread 1
[Switching to thread 1 (Thread 2888.0x233c)]
#0  0x0111cd8e in looking_at_1 (string=, posix=) 
at c:/msys/home/Dani/em
333 c:/msys/home/Dani/emacs/trunk/src/search.c: No such file or directory.
(gdb) finish
Run till exit from #0  0x0111cd8e in looking_at_1 (string=, 
posix=) at c:/msys/home/Dani/emacs/trunk/src/search.c:333
0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
2723c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $1 = 21994682
(gdb) finish
Run till exit from #0  0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
error return 
/usr/src/ports/gdb/gdb-7.8-2.i686/src/gdb-7.8/gdb/windows-nat.c:1239 was 5
[Thread 2888.0x22cc exited with code 0]
0x0118ab67 in exec_byte_code (bytestr=21994682, vector=780, maxdepth=2, 
args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or directory.
Value returned is $2 = 21994682
(gdb) finish
Run till exit from #0  0x0118ab67 in exec_byte_code (bytestr=21994682, 
vector=780, maxdepth=2, args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
funcall_lambda (fun=19768957, nargs=nargs@entry=1, 
arg_vector=arg_vector@entry=0x88ce44) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2962
2962c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $3 = 0
(gdb) finish
Run till exit from #0  funcall_lambda (fun=19768957, nargs=nargs@entry=1, 
arg_vector=arg_vector@entry=0x88ce44) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2962
0x0114deeb in Ffuncall (nargs=2, args=0x88ce40) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2784
2784i

Re: [O] org-class and headers

2014-10-23 Thread Rasmus
Joseph Le Roux  writes:

> Eric S Fraga  writes:
>
>> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
>>> Rasmus  writes:
>>
>> [...]
>>
 Will `org-clone-subtree-with-time-shift' do what you want?

>>>
>>> Thanks for the pointer, it could be very handy in my use-case, but this
>>> function copies the org-class as is for all clones. I would like to
>>
>> The idea is to use the clone function and not the org-class
>> expression.  Combining the two simply confuses things!
>>
>> What I do every start of term is define an entry for each lecture slot
>> in a week including the actual time information, lecture theatre,
>> etc.  I then clone each individual entry using +1w for the number of
>> weeks in the term.  I remove any subtrees generated that correspond to
>> lectures that do not actually exist, e.g. they fall on a holiday or
>> during our study week.
>>
>> Later, if an individual lecture gets cancelled, I simply remove the
>> corresponding subtree as I do for holidays etc.
>
> Thank you Eric, I'll follow the advice. As Rasmus showed,
> 'org-clone-subtree-with-time-shift' works with a timestamp, but it does
> not with (the result of) an org-class call. Ideally, what I would like
> to do is to specify a set of classes using org-class syntax and, as a
> result, get a set of headers. 'org-class' is a powerful tool, but just
> not powerful enough yet...

I have used to use classes in the past, but I now use a setup close to
Eric's.  One reasons is for good org-caldav support.  Here's how I
schedule my Spanish classes this term:

(with-temp-buffer
  (insert "* Spanish course
** Spanish class
<2014-10-07 Tue 18:30-20:30>")
  (goto-line 2)
  (org-clone-subtree-with-time-shift 8 "+1w")
  (save-excursion (insert "** Spanish class
<2014-10-09 Thu 18:30-20:30>\n"))
  (org-clone-subtree-with-time-shift 7 "+1w")
  (goto-char (point-min)) (org-sort-entries nil ?t)
  ;; like C-c ^ t
(buffer-substring-no-properties (point-min) (point-max)))

Of course in practice, this is easier to "interactively", but it's
hard to describe briefly.

Is there anything you miss about `org-clone-subtree-with-time-shift'¹?
Would you be happy if it asked if you want to skip some weeks
initially?  Or do you not like the extra space it takes?

—Rasmus

Footnotes: 
¹   note the "`" in the beginning, not "'"

-- 
Bang bang




[O] Yank "normal" text as item in list

2014-10-23 Thread Igor Sosa Mayor
Hi,

often I have to yank 'normal' text, that means, text which is not
indented into a item of a list. In other words, maybe, to convert it
into a list item.

I have always the problem that, when the text over one line goes, it
does not get the correct indentation.

Is there maybe a magical function to get this?

Many thanks in advance!


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




Re: [O] ODT export displays incorrect title and author in libreoffice

2014-10-23 Thread Eric S Fraga
On Wednesday, 22 Oct 2014 at 23:56, Rasmus wrote:
> Won't you pick up Org shipped with Emacs with emacs -Q?

yes I would but I set the load path before I load org so I pick up the
new version.

> Maybe you can reset it by: 
>
>   mv ~/.config/libreoffice{,.bak} 

Thanks.  I'll try this.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf