Re: [O] Extra empty line at the top of the page when tangling.
Ivanov Dmitry usr...@gmail.com writes: Hi, Code: #+BABEL: :cache yes :tangle yes :noweb yes #+NAME: top_block #+begin_src perl :tangle test.pl :noweb tangle From (info (org) padline): 14.8.2.10 ‘:padline’ Control in insertion of padding lines around code block bodies in tangled code files. The default value is ‘yes’ which results in insertion of newlines before and after each tangled code block. The following arguments are accepted. • ‘yes’ Insert newlines before and after each code block body in tangled code files. • ‘no’ Do not insert any newline padding in tangled output. You can use the following block declaration: #+begin_src perl :tangle test.pl :noweb tangle :padline no #!/usr/bin/perl use strict; use warnings; open(my $fh, , test.txt) or die cannot open file name: $!; output-all close($fh); #+end_src #+NAME: output-all #+begin_src perl while (my $line = $fh) { print $line; } #+end_src Outputs a perl file, where the 1-st line is blank. What should I do to remove it? -- Daimrod/Greg signature.asc Description: PGP signature
Re: [O] Omitting title in odt-export
Installed through ELPA. Works like a charm. Thank you very much!
[O] refiling as child with function-filing-location
Hi, I'm writing a custom function for use with a capture template, as described in the section Template elements (sec 9.1.3.1) of the info manual. My function does what I expect in that it finds the correct heading (in my use case Log) and returns point. However, if the Log heading has no children, the capture template is filed as a sibling, and not a child. I have spent some time now on this seemingly simple problem, but being a newbie on elisp I must admit I'm stuck. Here's an example outline: * Projects ** Prj 1 *** Log *** Tasks Clocked entry So, the capture template should end up as a child to Log. From what I could tell by reading the documentation, the capture template is placed at a given level by the org-paste-subtree function, which in term is derived from the *visible* headings. If the Log entry already has a child, capture indeed places the template at the desired level, but how do I acquire this behaviour if there are no children? My function currently looks up the clocked entry, ascends to level 2 and looks for Log among the children: (defun peru/org-capture-project-log nil (org-clock-goto) (while ( (funcall outline-level) 2) (org-up-heading-safe)) (org-goto-first-child) (while (not (string= (nth 4 (org-heading-components)) Log)) (org-goto-sibling) ) (if (not (string= (nth 4 (org-heading-components)) Log)) (error No Log entry under current project; please add)) ;; From org-paste-subtree: ;; if cursor is at beginning of headline, same level used (goto-char (point-at-bol)) ;; Alternatively put at eol; level derived from visible headings ;; (goto-char (point-at-eol)) ) I have thought of an alternative tag-based way of grouping my log entries, but I would still like to understand what I'm missing here. Cheers, Per
Re: [O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
Thorsten Jolitz wrote: Eric Abrahamsen e...@ericabrahamsen.net writes: Fabrice Niessen writes: On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version 8.3beta, I can very often freeze Emacs when clocking into a task, or when editing the timestamps found in the LOGBOOK drawer. I've gotten something looking like that from time to time (more often in the early days of the Org caching mechanism), and sending SIGUSR2 to the frozen emacs would reveal that it was in the midst of something flyspell-related. I'm under Windows, though with Cygwin. Not sure if that procedure works... You don't appear to be running flyspell, I didn't tell about Flyspell, but though, yes, I'm using it everywhere, always. but I'll guess that Org's timers are clashing with somebody else's timers. Not very helpful, I know. I just crashed , | GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) | of 2014-06-11 on var-lib-archbuild-staging-x86_64-jgc ` again today while refiling an Org task, but I already reported this a few weeks ago to the Emacs maintainers and it seems I have a stripped binary that does not deliver useful backtrace info. I don't use flyspell and I'm on Archlinux. Not very helpful, I know. Yes, the problem is how to collect traces that can help people understand and fix the problem. Best regards, Fabrice -- Fabrice Niessen Leuven, Belgium http://www.pirilampo.org/
Re: [O] Exponents / subscripts
Hello, Rasmus ras...@gmx.us writes: Had preview-latex supported Org I'd maybe agree, but I disagree strongly at this time. Patch welcome. sub/superscript works well with entities and makes it very easy to edit math and get approximate live feedback. Unfortunately, some users complain about the approximation. OTOH, I'm pretty sure that most LaTeX users can parse sub/superscript LaTeX code without any fontification at all. IOW and IMO, the bug, if any, is the fontification of superscript in math. This is not Org's job since you're talking about a non-compatible syntax. I think it should be done in a different library (i.e., not org.el), if at all. You want to implement a subset of Auctex. Either you delegate it to that major mode (à la Babel), at the price of some slowdown, or you duplicate code from it (i.e., `font-latex-match-script'). In both cases, you need to know when point is on a math snippet or environment, which should rely on `org-element-context' if you're serious about it. This doesn't solve the leak of Org's fontification on math snippets and environments. Regards, -- Nicolas Goaziou
Re: [O] Exponents / subscripts
Hi, Nicolas Goaziou m...@nicolasgoaziou.fr writes: Rasmus ras...@gmx.us writes: Had preview-latex supported Org I'd maybe agree, but I disagree strongly at this time. Patch welcome. Cf. a recent thread on emacs.devel it's pretty non-trivial to make preview-latex work outside of AUCTeX. sub/superscript works well with entities and makes it very easy to edit math and get approximate live feedback. Unfortunately, some users complain about the approximation. OTOH, I'm pretty sure that most LaTeX users can parse sub/superscript LaTeX code without any fontification at all. Of course they can, but it takes more effort. Compare: (1) \beta E_{t}[\sum_{j=t}^{T} z_{j}^{e}] (2) βE_{t}[∑_{j=t}^{T} z_{j}^{e}] (3) βEₜ[∑ⱼ₌ₜᵀzⱼᵉ] (3) takes no effort to read, whereas the barebone (1) and the entities-only (2) still take considerable amount of effort to parse IMO. IOW and IMO, the bug, if any, is the fontification of superscript in math. This is not Org's job since you're talking about a non-compatible syntax. I think it should be done in a different library (i.e., not org.el), if at all. 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$. You want to implement a subset of Auctex. Either you delegate it to that major mode (à la Babel), at the price of some slowdown, or you duplicate code from it (i.e., `font-latex-match-script'). In both cases, you need to know when point is on a math snippet or environment, which should rely on `org-element-context' if you're serious about it. 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 know nothing on the technical level of fortification so I'm not sure I could work on this issue efficiently. 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? —Rasmus -- To err is human. To screw up 10⁶ times per second, you need a computer
[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
Eli Zaretskii wrote: From: Fabrice Niessen fni-n...@pirilampo.org On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version 8.3beta, I can very often freeze Emacs when clocking into a task, or when editing the timestamps found in the LOGBOOK drawer. I've run Emacs under GDB, and can send a video of it, where you also see that Emacs takes 100% of the CPU. Though, I can only send it on request, as it contains information in my Org buffers which I don't want to see public. Is that video worth watching? I mean, what could a video of a frozen Emacs tell? No, I guess it's not. $ gdb ./emacs.exe GNU gdb (GDB) 7.8 This GDB session brings no useful info. Please follow the method described in etc/DEBUG under If the symptom of the bug is that Emacs fails to respond. I think I can reproduce it reliably: 1. Open an Org file 2. Go to a task headline 3. Clock into it (C-c C-x C-i) 4. Press down arrown to go to next line 5. Press TAB to open LOGBOOK drawer 6. Press C-c C-n to go the the next task (as drawer is huge) 7. Press up arrow to go to the line before the last clock line 8. Press left arrow to go to the end of the last clock line I'm not sure whether variations of this do work or not... or whether the contents of my file does have impact on the recipe. Now, as asked... ┌ │ ** If the symptom of the bug is that Emacs fails to respond │ │ Don't assume Emacs is `hung'--it may instead be in an infinite loop. │ To find out which, make the problem happen under GDB and stop Emacs │ once it is not responding. (If Emacs is using X Windows directly, you │ can stop Emacs by typing C-z at the GDB job.) Then try stepping with │ `step'. If Emacs is hung, the `step' command won't return. If it is │ looping, `step' will return. [...] └ ...what I did is launch Emacs from GDB in a Cygwin shell: --8---cut here---start-8--- $ gdb ./emacs.exe GNU gdb (GDB) 7.8 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html 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: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. 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. Reading symbols from ./emacs.exe...done. (gdb) set debugexceptions 1 (gdb) run Starting program: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs.exe [New Thread 4084.0x15cc] --8---cut here---end---8--- 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? Best regards, Fabrice
Re: [O] Exponents / subscripts
2014-10-22 11:13 GMT+02:00 Unfortunately, some users complain about the approximation. OTOH, I'm pretty sure that most LaTeX users can parse sub/superscript LaTeX code without any fontification at all. If there is no easy way to fix it, I may prefer to disable this fontification, because it displays something which is wrong (also the superscript is too small in my opinion, sometimes the character is unreadable). The current \(a^nb^n\) is actually displayed as \(a^{nbn}\) which is misleading. This is what bothered me first. OTOH, I have set up preview of formulas (actually I did it for tikz diagrams) and it works well. It is slower, and I use it for complicated formulas only, but at least it is exact. Fabrice
[O] Initial visibility of a plain list
Hi all, I have a plain list. I'd like it to show only the items (without subitems) when it becomes visible (after hitting TAB on the headline starting the section containing my list). Is that possible? TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] [ox-latex] How to force ALL captions below their referents?
On Tuesday, 21 Oct 2014 at 18:47, Nicolas Goaziou wrote: Hello, Eric S Fraga e.fr...@ucl.ac.uk writes: However, I think it would make sense to make '(table) (at least) the default for captions above to have some form of backward compatibility? The change caught me by surprise... If we change `org-latex-caption-above', then it will no longer match `org-latex-table-caption-above', which will introduce another class of backward compatibility problems. Hi Nicolas, I don't actually understand you. 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. But it's a not a big deal (to me) as I have now set the variable and I'm back to where I was. So I'm happy to have things as they are now if that's deemed to be better overall. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
[O] ODT export displays incorrect title and author in libreoffice
Hi, I am not sure if my problem is with org or with libreoffice; most likely, the combination of the two! In any case, when I export to ODT, the title and author fields do not appear as they should, instead displaying DocInformation:Title and DocInformation:Created. See attached screenshot. The ODT file itself (well, the content.xml file within), however, does contain the correct information for the title and subtitle fields: , | text:p text:style-name=OrgTitle | text:titlet.org/text:title/text:p | text:p text:style-name=OrgTitle/ | text:p text:style-name=OrgSubtitletext:initial-creatorEric S Fraga/text:initial-creator/text:p | text:p text:style-name=OrgSubtitle/ ` I use libreoffice very little so I have not customised it at all. This is on an ubuntu installation, by the way. The weird thing is that I cannot find the string anywhere... Any pointers to fixing this would be most welcome. thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
Re: [O] Turn subscript off by default?
Sebastien Vauban writes: Christopher Allan Webber wrote: In more documents than not, it seems I see someone do something like foo_bar Common, of course, because most orgmode users are programmers. Of course this results in the super awkward rendering of foo(subscripted:bar). I can't remember *ever* making use of subscript in an orgmode document, though I and many others have run into problems with it... why not switch the default for subscript to off? Put (setq org-use-sub-superscripts '{}) in your .emacs file. Best regards, Seb Helpful! And indeed, I was discussing defaults, since I get a lot of exports from others who don't know about this variable... maybe this should be default behavior?
Re: [O] org-class and headers
On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote: Rasmus ras...@gmx.us 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. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
From: Fabrice Niessen fni-n...@pirilampo.org Cc: 18...@debbugs.gnu.org, Org-mode List emacs-orgmode@gnu.org 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. 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.
Re: [O] ODT export displays incorrect title and author in libreoffice
Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: I am not sure if my problem is with org or with libreoffice; most likely, the combination of the two! In any case, when I export to ODT, the title and author fields do not appear as they should, instead displaying DocInformation:Title and DocInformation:Created. See attached screenshot. I cannot reproduce. Does it happen from emacs -q and the latest Org? I use - Org-mode version 8.3beta (release_8.3beta-476-gd4cce4) - Libreoffice 4.3.2 and this document looks fine: #+TITLE: t #+AUTHOR: r * h 1. a —Rasmus -- This space is left intentionally blank
[O] [patch, ORG-NEWS] Document new options
Hi, Should these news go into ORG-NEWS? Or will someone else take care of this when 8.3 is released? —Rasmus -- . . . It begins of course with The Internet. A Net of Peers From a1c3e667c46e42dcdd7792cad26461f60a482c63 Mon Sep 17 00:00:00 2001 From: rasmus ras...@gmx.us Date: Wed, 22 Oct 2014 19:57:26 +0200 Subject: [PATCH] ORG-NEWS: Document new options --- etc/ORG-NEWS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 429813a..b0a142c 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -49,6 +49,9 @@ anymore. The chosen hard coded quoting style conforms to POSIX. *** Additional markup with =#+INCLUDE= keyword The content of the included file can now be optionally marked up, for instance as HTML. See the documentation for details. +*** File links with =#+INCLUDE= keyword +Objects can be extracted via =#+INCLUDE= using file links. It is +possible to include only the contents of the object. *** Additional =:hline= processing to ob-shell If the argument =:hlines yes= is present in a babel call, an optional argument =:hlines-string= can be used to define a string to use as a @@ -107,6 +110,10 @@ When non-nil, attachments from archived subtrees are removed. This variable generalizes ~org-latex-table-caption-above~, which is now deprecated. In addition to tables, it applies to source blocks, special blocks and images. See docstring for more information. +*** Export unnumbered headlines +Headlines, for which the property ~UNNUMBERED~ is non-nil, are now +exported without section numbers irrespective of their levels. The +property is inherited by children. ** Miscellaneous *** File names in links accept are now compatible with URI syntax Absolute file names can now start with =///= in addition to =/=. E.g., -- 2.1.2
Re: [O] [patch, ORG-NEWS] Document new options
Hi Rasmus, Rasmus ras...@gmx.us writes: Should these news go into ORG-NEWS? Or will someone else take care of this when 8.3 is released? Yes, applied, thanks! -- Bastien
Re: [O] [PATCH] org.el: Fix bindings of and for calendar scrolling
Marco Wahl writes: Since the fix is small and clear (AFAICT) and the tests pass I try to push it directly to maint. Please keep maint merged into master. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] Can org show live charts?
John Kitchin jkitchin at andrew.cmu.edu writes: I think the answer is sort of. I am no idle timer guru, and this code would probably not do what you want except for this file. The idea is to have a named table, use it as a data source in a named code block that generates the image. Then, make an elisp function that goes to that code block and run it, and set an idle timer to run the elisp function. I have this in my init file: Thanks, I'll give it a try. I'm a bit surprised org does not have this out of the box. E.g. a minor mode which when turned on keeps graphs marked for live update (with some tag or something) continuously up to date. It would be a great to show when demonstration org to somebody, that the graph is updated live when you change something in the table.
Re: [O] ODT export displays incorrect title and author in libreoffice
On Wednesday, 22 Oct 2014 at 19:33, Rasmus wrote: Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: I am not sure if my problem is with org or with libreoffice; most likely, the combination of the two! In any case, when I export to ODT, the title and author fields do not appear as they should, instead displaying DocInformation:Title and DocInformation:Created. See attached screenshot. I cannot reproduce. Does it happen from emacs -q and the latest Org? Hi Rasmus, Yes, with emacs -Q and org is up to date from yesterday. I have noticed that with emacs -Q, ox-odt picks up schema from /usr/share/emacs/etc/org/schema. However, there are no differences in the schema. There are differences in the .../org/styles but nothing that should affect this. Alternatively, and more likely, I wonder if it's the installation of libreoffice? Could I have some leftover customisation lurking somewhere? I don't use libreoffice often enough to be comfortable with it... thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
Re: [O] org-class and headers
Eric S Fraga e.fr...@ucl.ac.uk writes: On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote: Rasmus ras...@gmx.us 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... -- 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] ODT export displays incorrect title and author in libreoffice
Eric S Fraga e.fr...@ucl.ac.uk writes: On Wednesday, 22 Oct 2014 at 19:33, Rasmus wrote: Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: I am not sure if my problem is with org or with libreoffice; most likely, the combination of the two! In any case, when I export to ODT, the title and author fields do not appear as they should, instead displaying DocInformation:Title and DocInformation:Created. See attached screenshot. I cannot reproduce. Does it happen from emacs -q and the latest Org? Hi Rasmus, Yes, with emacs -Q and org is up to date from yesterday. Won't you pick up Org shipped with Emacs with emacs -Q? I have noticed that with emacs -Q, ox-odt picks up schema from /usr/share/emacs/etc/org/schema. However, there are no differences in the schema. There are differences in the .../org/styles but nothing that should affect this. I don't know. You can change the path of style files setting `org-odt-styles-dir'. For me the wrong dirs are also picked up. This might be a bug? Alternatively, and more likely, I wonder if it's the installation of libreoffice? Could I have some leftover customisation lurking somewhere? I don't use libreoffice often enough to be comfortable with it... Maybe you can reset it by: mv ~/.config/libreoffice{,.bak} Or something like that... —Rasmus -- Don't panic!!!