[O] bug#14374: bug#14374: Possibly incorrect custom :types
Thank you. I have already fixed the ones you sent - most were indeed issues. Regards - Carsten On 10.5.2013, at 03:26, Glenn Morris r...@gnu.org wrote: Carsten Dominik wrote: I would like to leave things in Emacs as they are and fix this with the following sync, is that acceptable? Sure, no rush. (cus-test.el is in the admin/ directory in the Emacs repo. It needs some updating, it's not checking everything at present, so there could be more of these. I will send them along if I find them.)
Re: [O] [PATCH] Do not indent option keywords
Hi Achim, by decoration you mean font-lock support? Maybe this would be a better fix: Modified lisp/org.el diff --git a/lisp/org.el b/lisp/org.el index 745fb82..43df094 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5867,7 +5867,8 @@ by a #. ((or (equal dc1 +results) (member dc1 '(+begin: +end: +caption: +label: +orgtbl: +tblfm: +tblname: +results: - +call: +header: +headers: +name:)) + +call: +header: +headers: +name: + +options:)) (and (match-end 4) (equal dc3 +attr))) (add-text-properties beg (match-end 0) - Carsten On 9.5.2013, at 22:34, Achim Gratz strom...@nexgo.de wrote: That was not the patch I was trying to send, sorry. Second try: From 990257c497aa9fb0b8250d770c8e899762cc7abc Mon Sep 17 00:00:00 2001 From: Achim Gratz strom...@stromeko.de Date: Thu, 9 May 2013 22:30:08 +0200 Subject: [PATCH] org.el: do not indent option keyword lines * lisp/org.el (org-indent-line): Keep option keyword lines at column zero so they don't lose their decoration. --- lisp/org.el | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 08570c3..b357c90 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21932,6 +21932,11 @@ (defun org-indent-line () (org-inlinetask-in-task-p))) (inline-re (and inline-task-p (org-inlinetask-outline-regexp))) + (opt-re (org-make-options-regexp + '(CATEGORY TODO COLUMNS STARTUP ARCHIVE + LINK PRIORITIES CONSTANTS PROPERTY DRAWERS + SETUPFILE OPTIONS) + \\(?:[a-zA-Z][0-9a-zA-Z_]*_TODO\\))) column) (if (and orgstruct-is-++ (eq pos (point))) (let ((indent-line-function (cadadr (assoc 'indent-line-function org-fb-vars @@ -21976,6 +21981,8 @@ (defun org-indent-line () (org-get-indentation (match-string 0 (t (org-get-indentation (match-string 0)) + ;; Option keywords + ((looking-at opt-re) (setq column 0)) ;; This line has nothing special, look at the previous relevant ;; line to compute indentation (t -- 1.8.2.1 Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
Re: [O] Change title and export filename based on code value?
On 8.5.2013, at 20:06, Gary Oberbrunner ga...@oberbrunner.com wrote: I'd like to change the title of my report, and the exported pdf filename, based on a value I can change in the org-mode source. I have a source block like this: #+NAME: reporttype #+BEGIN_SRC elisp :results value silent :exports results Foo #+END_SRC I figured out how to do the title: #+TITLE My Report: call_reporttype()[:results raw] Results which is pretty neat (but wasn't easy to figure out, I'll work on that in the doc). ...but I'd also like to set the exported PDF filename based on the reporttype, but I'm not sure there is an option for that. Is there? And if there is, is there a way to interpolate my reporttype into it? As Nicolas says, there is no support for this. But if you are exporting specific subtrees, you can give export file names for subtrees using the EXPORT_FILE_NAME property. - Carsten
Re: [O] Unexpected relative reference behaviour
Hi Guido, @I references are unfortunately not yet supported on the left hand side of a formula. I hope that some day they will, but currently this is not the case. - Carsten On 9.5.2013, at 11:04, Guido Van Hoecke gui...@gmail.com wrote: Hi, Using this table | Grand total | 19.55 || |--+---+| | 2013-05-09 Thu | 1.23 | v2 | | 2013-05-04 Sat | 5.76 | v1 | | 2013-05-14 Tue | 3.78 | v1 | | 2013-04-24 Wed | 8.78 | v2 | #+TBLFM: @1$2=vsum(@I..@);%.2f I want the formula to be relative to the first hline so, according to the manual, it should be possible to change @1$2 into @I-1$2 | Grand total | 19.55 || |--+---+| | 2013-05-09 Thu | 1.23 | v2 | | 2013-05-04 Sat | 5.76 | v1 | | 2013-05-14 Tue | 3.78 | v1 | | 2013-04-24 Wed | 8.78 | v2 | #+TBLFM: @I-1$2=vsum(@I..@);%.2f But this produces very strange results. Hitting C-c * with the cursor in @$2 produces: | Grand total | 19.55 || |--+---+| | 2013-05-09 Thu | 1.23 | v2 | | 2013-05-04 Sat | 5.76 | v1 | | 2013-05-14 Tue | 3.78 | v1 | | 2939977.00 | 19.55 | v2 | #+TBLFM: @I-1$2=vsum(@I..@);%.2f Why does it change 2013-04-24 Wed into 2939977.0, and 8.78 into 19.55? Hitting C-u C-c * with the cursor in @$2 messes up the complete table and results in: | 0.00 | 30.32 || |++| | 0.00 | 30.32 | v2 | | 4409973.00 | 59.41 | v1 | | 0.00 | 113.06 | v1 | | 7349950.00 | 222.34 | v2 | #+TBLFM: @I-1$2=vsum(@I..@);%.2f Am I correct to assume that this is at least unexpected, and probably erroneous behaviour? Guido -- Consider a spherical bear, in simple harmonic motion... -- Professor in the UCB physics department
Re: [O] org-search-view skips over commented subtrees
On 8.5.2013, at 00:14, Samuel Wales samolog...@gmail.com wrote: Hi Bastien, On 5/7/13, Bastien b...@gnu.org wrote: IMHO this would be too much, since the let-binding solution is there already. I won't object to whatever decision is made, but it made me curious: is it not there for inheritance? This raises another question. Is it possible to do a let for each of the built-in views? Yes, by creating a custom view using the same keys as the built-in view. Also, is it possible to do a let for the view that you get when you RET on a timestamp? No, this is currently not possible. - Carsten Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Re: [O] M-RET inside the first second-level heading of the first first-level heading
On 7.5.2013, at 23:34, John Hendy jw.he...@gmail.com wrote: On Tue, May 7, 2013 at 4:54 AM, Bastien b...@gnu.org wrote: Hi John, John Hendy jw.he...@gmail.com writes: On Fri, Apr 26, 2013 at 1:54 AM, Bastien b...@gnu.org wrote: Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: 2. Place cursor at the beginning of ** bacon and press M-RET and org creates a first-level heading. This should now be fixed. Thanks for reporting this, There were some same/similar/related issues as well, and I'm still not getting perfect results. Using a minimal config (below), if I create this in a new file * test ** test1 ** test2 and then fold on * test, I get this: * test...2 I do have (setq require-final-newline t) in my config, which prevents this. What happens is this: if you don't have the config above, the folding will get wrong and display the 2 from the end of the buffer. Also, after navigating to the end of * test...2 (with it folded) and issuing M-RET, I get a new second level heading after ** test2. I would have expected a new first level headline since I did M-RET on a first level headline. Or is that the default behavior? If you are before the ... ellipsis, you are on a first level headline and M-RET will insert a first level headline. Otherwise you are on a second level headline (test2) and it will insert a second level headline. Ah, that now makes sense. But... just to be clear, take this case: * Headline1 - list1 - list2 Now fold it: * Headline1cursor... If I do M-RET at cursor, I get: * Headline1 * cursor - list1 - list2 Is that how it's supposed to work? My use case is generally to have a new headline after * Headline1 *and* it's contents, not putting contents inside the new headline. C-RET seems to behave more like I'd expect. In reading the manual, I think I was just confused on usage based on the definition of C-RET, however this in the description of M-RET is confusing: #+begin_quote If the command is used at the end of a folded subtree (i.e., behind the ellipses at the end of a headline), then a headline like the current one will be inserted after the end of the subtree. Calling this command with C-u C-u will unconditionally respect the headline's content and create a new item at the end of the parent subtree. #+end_quote It makes it seem like my original case in which the cursor is behind (after?) the ... should insert a same-level headline after the end of the current subtree (which I would assume means that headline and all contents). Am I reading that incorrectly? It doesn't really talk about the behavior if you're before the ellipsis. Yes, this is also a bit confusing. I think it would be desirable if it worked as described in the manual, but this is not what is happening. For now, I fixed the manual. - Carsten Thanks for clarifying, John If so, I guess my only concern is the folding of the end of a headline if there's no hard return after it into the ellipsis of it's parent. Yes. Maybe M-RET could/should handle this corner-case but since `org-insert-heading' is deserving a full rewrite, I'm not going to try to handle this corner-case myself... let's just keep it in mind when doing the rewrite. Thanks for spotting it, -- Bastien
Re: [O] [PATCH] Do not indent option keywords
Carsten Dominik writes: by decoration you mean font-lock support? Yes, but I also don't think these should ever become indented in the first place. That's debatable of course, the syntax as defined by org-element does not require this IIRC. Maybe this would be a better fix: Modified lisp/org.el diff --git a/lisp/org.el b/lisp/org.el index 745fb82..43df094 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5867,7 +5867,8 @@ by a #. ((or (equal dc1 +results) (member dc1 '(+begin: +end: +caption: +label: +orgtbl: +tblfm: +tblname: +results: - +call: +header: +headers: +name:)) + +call: +header: +headers: +name: + +options:)) (and (match-end 4) (equal dc3 +attr))) (add-text-properties beg (match-end 0) Sure, that helps too and has certainly less potential for controversy. I think we should make an effort to shift most if not all the regex stuff in org.el into org-element. There's far too much duplication with subtle differences sprinkled all over the place to get match data to work with and it's almost hopeless to try and find all such uses for a single element. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] bug#14346: 24.3; beginning-of-visual-line jumps to previous line in org-mode
On 7.5.2013, at 03:34, E Sabof esa...@gmail.com wrote: Even if the behavior doesn't change (soon), could the equivalent of the following be implemented in org-mode? It's the only place where this has been problematic for me. (defadvice org-beginning-of-line (after smart-point-adjustment activate) (setq disable-point-adjustment (or (not (invisible-p (point))) (not (invisible-p (max (point-min) (1- (point (defadvice org-end-of-line (after smart-point-adjustment activate) (setq disable-point-adjustment (or (not (invisible-p (point))) (not (invisible-p (max (point-min) (1- (point I have implemented these in Org master, so this will eventually mode into emacs as well. - Carsten Evgeni On Sat, May 4, 2013 at 2:27 PM, E Sabof esa...@gmail.com wrote: Wouldn't it be better if forward/backward-char kept the old behavior, and the rest of the commands did something similar to this in the end: (setq disable-point-adjustment (preceding-or-following-character-visible-p)) I'm not entirely sure whether it would be better, but at the moment, I can't think of a case where it wouldn't. Evgeni On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii e...@gnu.org wrote: Date: Sat, 4 May 2013 12:17:35 +0100 From: E Sabof esa...@gmail.com Cc: 14...@debbugs.gnu.org I see what you mean. But it still looks like a bug - whether I follow the above recipe, or press C-e C-a, the point will (should?) go to the same position, but the behavior is different. The behavior depends on the direction point was moving before ending up in the invisible text. It's a heuristic, and as every heuristic, it sometimes fails.
[O] bug#14379: Several Org source files cannot be loaded in isolation
Package: org-mode (This report refers to the version of Org in the Emacs trunk.) Several Org files cannot be loaded in isolation, by which I mean that eg emacs -batch -l ob-C fails. This may have no practical consequences, but seems like bad form (eg it causes problems for automated testing). The list is: ob-C.el ob-asymptote.el ob-awk.el ob-clojure.el ob-fortran.el ob-haskell.el ob-io.el ob-java.el ob-latex.el ob-lisp.el ob-maxima.el ob-ocaml.el ob-perl.el ob-picolisp.el ob-python.el ob-ruby.el ob-scala.el org-ctags.el For all but the last, the problem is: Symbol's value as variable is void: org-babel-tangle-lang-exts For org-ctags, the problem is: Symbol's function definition is void: case (because the `case' macro from cl is used in the default value of a defcustom, which is not evaluated till load time.). This one is probably a real bug.
Re: [O] [Exporter] Export of property drawers
Hello, Christian Moe m...@christianmoe.com writes: Nicolas, do I understand correctly that the contents of a property drawer will not export? Correct Back before I switched to the new exporter, all I had to do to export properties was to add #+OPTIONS: d:t but I notice this doesn't work, nor does d:(PROPERTIES). No, it won't. See docstring for `org-export-with-drawers'. Property drawers are very different from regular drawers. Properties are sometimes used to make simple databases of useful stuff. (I compiled a bunch of research notes like that just before before switching to the new exporter!) It would be nice to have an easy way to print them without having to figure out how to do it with filters or defadvices. Through macros, you can already access to specific properties, e.g.: {{{property(ARCHIVE)}}} There is no function to dump the whole database in the export buffer because it contains many Org-specific entries which are irrelevant and because there are many ways to dump it. That's not what you asked, but the following function: #+begin_emacs-lisp (defun my-database-dump (backend) (goto-char (point-min)) (while (re-search-forward ^[ \t]*:PROPERTIES nil t) (let ((element (org-element-at-point))) (when (eq (org-element-type element) 'property-drawer) (goto-char (org-element-property :end element)) (insert #+BEGIN_EXAMPLE\n (buffer-substring (org-element-property :begin element) (progn (goto-char (org-element-property :end element)) (skip-chars-backward \r\t\n) (forward-line) (point))) #+END_EXAMPLE\n) #+end_emacs-lisp when added to `org-export-before-parsing-hook', will wrap every property drawer within an example block so it can appear in the export output. Regards, -- Nicolas Goaziou
Re: [O] Problem with Google Calendar Synchronization
Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: Guido Van Hoecke gui...@gmail.com writes: [...] I have attached the corrected patch. I don't know whether I have access to Worg. Would you mind updating it? Okay; I'll try to do this early next week. Hang on, I am still looking into the UTC aspect. Right now the offset is dependent upon the execution time rather than upon the date being converted. I'll keep you posted. Guido -- NOTICE: Anyone seen smoking will be assumed to be on fire and will be summarily put out.
Re: [O] Unexpected relative reference behaviour
Hi Carsten, @I references are unfortunately not yet supported on the left hand side of a formula. I hope that some day they will, but currently this is not the case. Thanks for the info. Guido -- Those who cannot remember the past are condemned to repeat it. -- George Santayana
Re: [O] Extending ODT export
Thanks Takaaki! That did the trick. Now things work as they should. :) Takaaki ISHIKAWA writes: Dear Julian, Sorry, the code is an old setting for the previous org. Please try org-odt-preferred-output-format. #+BEGIN_SRC emacs-lisp (setq org-odt-preferred-output-format pdf) (setq org-odt-convert-processes '((LibreOffice /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to %f%x --outdir %d %i) (unoconv unoconv -f %f -o %d %i))) #+END_SRC Best, Takaaki On May 8, 2013, at 12:06 AM, Takaaki ISHIKAWA tak...@ieee.org wrote: Dear Julian, When I use soffice with exec-path setting, the ODT export is failed like you. So currently, I use the following setting: #+BEGIN_SRC emacs-lisp (setq org-export-odt-preferred-output-format pdf) (setq org-export-odt-convert-processes '((LibreOffice /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to %f%x --outdir %d %i) (unoconv unoconv -f %f -o %d %i))) #+END_SRC It works fine for me. Best regards, Takaaki Ishikawa On May 7, 2013, at 10:51 PM, Julian M. Burgos jul...@hafro.is wrote: Hi Christian, The value for org-odt-convert-processes is ((LibreOffice soffice --headless --convert-to %f%x --outdir %d %i) (unoconv unoconv -f %f -o %d %i)) soffice is in my path, so I can run it from any directory. Carsten, I have permission in /home. That is where I had my trial org file. I have the same problem if I put my org file in other directory. Julian Carsten Dominik writes: On 7 mei 2013, at 14:29, Christian Moe m...@christianmoe.com wrote: Hi, Possible checks: What value do you have for org-odt-convert-processes? Does the command it provide launch LibreOffice services on your system? On my Mac, the default soffice command is not recognized out of the box; providing the full path to soffice (/Applications/LibreOffice.app/Contents/MacOS/soffice) helps. Also, it only seems to work when LibreOffice isn't already running, though I may be wrong about that (I just tried this for the first time). Another check: Do you have write permissions in /home ? Why is it trying to write the file to that location? - Carsten Yours, Christian Julian M. Burgos writes: By the way, it also fails with the pdf and doc options... Julian M. Burgos writes: Hello everyone, I want to export via ODT directly into a docx format. Following the instructions in the manual, I added (setq org-odt-preferred-output-format docx) to my .emacs file. But if I try to do an export I get the following error message: Export to /home/trial.docx failed I am using org-mode 8.0.2, LibreOffice 3.5.7.2, and Fedora 17. Any ideas? Julian -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is -- Takaaki ISHIKAWA tak...@ieee.org GITI, Waseda University :) http://about.me/takaxp -- Takaaki ISHIKAWA tak...@ieee.org GITI, Waseda University :) http://about.me/takaxp -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] odt export not working
Nick, I meant to include (setq org-export-backends '(odt)) in my .emacs file. I did that, and now I get the odt exporter as an option when I do C-c C-e. I usually try no to use things that make changes to my .emacs file direcly because I generate my .emacs file from an .org file (through tangling). Any customization would get lost next time I make a change and tangle my .emacs file (which is quite often!). Julian Nick Dokos writes: Julian M. Burgos jul...@hafro.is writes: Ok, I see what you mean. So I should do (setq org-export-backends '(odt)) or something like that. Fair enough. :) That's *not* what Nicolas suggested and it's *not* what you should do. Just do C-h v org-export-backends and click the Customize link, then mark all the (additional) backends you want to use. Please read the documentation of the variable: simply setting it in the middle of an emacs session will *not* work. Nick Nicolas Goaziou writes: Julian M. Burgos jul...@hafro.is writes: Right... I did not saw it. And even if I did, I would not know that the package needed for loading the back-end for ODT is called ox-odt. You don't need to know that. The manual tells you to customize `org-export-backends' instead. Regards, -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] Bibliography
Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. This may be the cleaner solution: http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00164.html Vikas
Re: [O] [Exporter] Export of property drawers
Hello Nicolas, thank you for the clarification and examples, they helped a lot and I got it working as I wanted it. Regards, Alex Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Alexander Baier lexi.ba...@gmail.com writes: i want to export property drawers of an org-file to ASCII. How do I do this? I got the impression, that the exporter does not touch the properties drawers. So I started to fiddle with the exporter but got no satisfying results out of it. You can either define a new back-end, as you did, or defadvice the current one. This is what i tried so far: The elisp i wrote in this process: === (defun org-tut-ascii-translater-property-drawer (drawer backend info) (let ((prop (org-element-property :properties drawer))) (format %S prop))) ;; i just wanted to see, if anything arrives here There is no `:properties' attribute for property drawers. Also you are mixing translators and filters: arguments for translators are ELEMENT CONTENTS INFO. Use, for example: (defun my-ascii-property-drawer (drawer contents info) contents) (org-export-define-derived-backend 'my-ascii 'ascii :translate-alist '((template . org-tut-ascii-translater-property-drawer))) Replace `template' with `property-drawer'. You also need to define a translator for `node-property' elements, e.g., (defun my-ascii-node-property (node-prop contents info) (concat (org-element-property :key node-prop) : (org-element-property :value node-prop))) and (org-export-define-derived-backend 'my-ascii 'ascii :translate-alist '((property-drawer . my-ascii-property-drawer) (node-property . my-ascii-node-property))) Regards,
Re: [O] [Exporter] Export of property drawers
Thanks, Nicolas, That's very useful to know. And although d:t was a lot simpler, I understand the point that people will want to customize how they want to export their databases anyway. Your information below is enough to get me started and may save me days of work. Yours, Christian Nicolas Goaziou writes: Through macros, you can already access to specific properties, e.g.: {{{property(ARCHIVE)}}} There is no function to dump the whole database in the export buffer because it contains many Org-specific entries which are irrelevant and because there are many ways to dump it. That's not what you asked, but the following function: #+begin_emacs-lisp (defun my-database-dump (backend) (goto-char (point-min)) (while (re-search-forward ^[ \t]*:PROPERTIES nil t) (let ((element (org-element-at-point))) (when (eq (org-element-type element) 'property-drawer) (goto-char (org-element-property :end element)) (insert #+BEGIN_EXAMPLE\n (buffer-substring (org-element-property :begin element) (progn (goto-char (org-element-property :end element)) (skip-chars-backward \r\t\n) (forward-line) (point))) #+END_EXAMPLE\n) #+end_emacs-lisp when added to `org-export-before-parsing-hook', will wrap every property drawer within an example block so it can appear in the export output. Regards,
Re: [O] Problem with Google Calendar Synchronization
Guido Van Hoecke gui...@gmail.com writes: [...] Hang on, I am still looking into the UTC aspect. Right now the offset is dependent upon the execution time rather than upon the date being converted. Yes, if by execution time you mean by the time zone of the computer running the script. This is definitely a problem and one which I gave up trying to solve. Mind you, it did cause me no end of problems last year and this year again when I moved from the UK to Australia and then back again... I'll keep you posted. Okay. No rush from my point of view. I would love to see a solution to this problem! -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0.2-94-g5a1400
[O] org-babel and compilation log
Dear all, I'm managing my dotEmacs in an org file which is tangled and byte-compiled using a small function -- (defun mh-generate-dot-and-byte-comp () (interactive) Tangle current buffer and generate the dot emacs which is byte compiled (with-current-buffer dotEmacs.org (org-babel-tangle)) (byte-compile-file ~/.emacs.el)) I'm asking is there any way to switch, in case of error or warning, from the Compilation Log file to the original org-mode file (dotEmacs.org) instead of .emacs.el. Thanks, Mohamed
Re: [O] org-babel and compilation log
Mohamed mohamed.hi...@gmail.com writes: Dear all, I'm managing my dotEmacs in an org file which is tangled and byte-compiled using a small function -- (defun mh-generate-dot-and-byte-comp () (interactive) Tangle current buffer and generate the dot emacs which is byte compiled (with-current-buffer dotEmacs.org (org-babel-tangle)) (byte-compile-file ~/.emacs.el)) You may want to use `org-babel-load-file', unless you prefer to run this manually. I'm asking is there any way to switch, in case of error or warning, from the Compilation Log file to the original org-mode file (dotEmacs.org) instead of .emacs.el. Look at the `org-babel-tangle-jump-to-org' function, for it to work you may need to tangle with the :comments header argument set to link. Best, Thanks, Mohamed -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] require a feature: merge many contacts which have the same name.
Feng Shu tuma...@gmail.com writes: I think org-contacts.el shoule have the feature which can merge many contacts which have the same name into one, for example: #+begin_example * name :PROPERTIES: :EMAIL: [[mailto:a...@a.com]] [[mailto:b...@b.com]] :PHONE: [[tel:123456789]] :ALIAS:a :END: * name :PROPERTIES: :EMAIL: [[mailto:c...@a.com]] [[mailto:d...@b.com]] :PHONE: [[tel:987654321]] :ALIAS:b :END: * name :PROPERTIES: :EMAIL: [[mailto:e...@a.com]] [[mailto:f...@b.com]] :PHONE: [[tel:111]] :ALIAS:c :END: #+end_example how can I get the result: #+begin_example * name :PROPERTIES: :EMAIL: [[mailto:a...@a.com]] [[mailto:b...@b.com]] [[mailto:c...@a.com]] [[mailto:d...@b.com]] [[mailto:e...@a.com]] [[mailto:f...@b.com]] :PHONE: [[tel:123456789]] [[tel:987654321]] [[tel:]] :ALIAS:a b c :END: #+end_example Hi Feng, It's noted, I'll see what I can do this week-end. -- Daimrod/Greg pgpgoAyLvZ17T.pgp Description: PGP signature
Re: [O] org-babel and compilation log
Eric Schulte schulte.eric at gmail.com writes: You may want to use `org-babel-load-file', unless you prefer to run this manually. Hello Eric, Thank you for this swift reply. I didn't know this before. But my point here is to byte compile my .emacs.el for the next session. (I have dotEmacs.org - .emacs.elc) Look at the `org-babel-tangle-jump-to-org' function, for it to work you may need to tangle with the :comments header argument set to link. Great this is really what I'm looking for. Thanks a lot !! Mohamed
Re: [O] org-babel and compilation log
I didn't know this before. But my point here is to byte compile my .emacs.el for the next session. (I have dotEmacs.org - .emacs.elc) `org-babel-load-file' does support an optional compile argument. , | org-babel-load-file is an interactive autoloaded compiled Lisp | function in `org.el'. | | (org-babel-load-file FILE optional COMPILE) | | Load Emacs Lisp source code blocks in the Org-mode FILE. | This function exports the source code using `org-babel-tangle' | and then loads the resulting file using `load-file'. With prefix | arg (noninteractively: 2nd arg) COMPILE the tangled Emacs Lisp | file to byte-code before it is loaded. | | [back] ` Look at the `org-babel-tangle-jump-to-org' function, for it to work you may need to tangle with the :comments header argument set to link. Great this is really what I'm looking for. Thanks a lot !! Great, happy to help. -- Eric Schulte http://cs.unm.edu/~eschulte
[O] Problem with docview
I am trying to link to a specific page in a pdf file using org-docview. For example, I have a org file with the following header ** [[docview:~/Desktop/2013_test.pdf::3][Digital modulation notes]] However, when I double click on the link I get the following error Invalid image file name `nil' Does anybody know to fix this problem ? Thanks M
[O] unexpected appearance of x^2 in pdf file
Dear list, I may be under a misapprehension, but I expected the pdf output (created by C-c C-e l p) from the attached org file to show similar results for both lines. Instead, however, the simple x^2 outside of the verbatim environment puts the caret above the 2 even though I have set #+OPTIONS: ^:nil This seems to be because org-mode exports x^2 as x\^2 in the tex file. I think exporting it as x\^{}2 would give a better result. Is there another way to get the appearance I'm looking for without using the verbatim environment? Thanks for your advice, Paul PS. I'm using Emacs 24.2.1 with Org mode 8.0.2. caret_symbol.org Description: Binary data
Re: [O] [PATCH] Do not indent option keywords
On 10.5.2013, at 08:39, Achim Gratz strom...@nexgo.de wrote: Carsten Dominik writes: by decoration you mean font-lock support? Yes, but I also don't think these should ever become indented in the first place. That's debatable of course, the syntax as defined by org-element does not require this IIRC. Well, which are the ones you think should never become indented? OPTIONS, TITLE, of maybe you mean the whole suite of keywords? I sometimes put the setup below a major headline * setup or so, to make them hide away and give the buffer a clean look. Depending on indentation setting it then does make some sense to allow indentation. So I think the font-lock fix is more important than the indentation one. Please read on below. Maybe this would be a better fix: Modified lisp/org.el diff --git a/lisp/org.el b/lisp/org.el index 745fb82..43df094 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5867,7 +5867,8 @@ by a #. ((or (equal dc1 +results) (member dc1 '(+begin: +end: +caption: +label: +orgtbl: +tblfm: +tblname: +results: - +call: +header: +headers: +name:)) + +call: +header: +headers: +name: + +options:)) (and (match-end 4) (equal dc3 +attr))) (add-text-properties beg (match-end 0) Sure, that helps too and has certainly less potential for controversy. I think we should make an effort to shift most if not all the regex stuff in org.el into org-element. There's far too much duplication with subtle differences sprinkled all over the place to get match data to work with and it's almost hopeless to try and find all such uses for a single element. What do you mean? Do you meant to use the org-elemnt parser and base also font-lock on it? Or do you mean all the definitions of regexp constants. This sounds desirable - but it also sounds like an extremely daunting task with possibilities for problems in side effects of regexp matching that will be difficult to find and might only show after a long time. I guess we could start such a process one regexp at a time. - Carsten
Re: [O] [PATCH] Do not indent option keywords
Carsten Dominik writes: Well, which are the ones you think should never become indented? OPTIONS, TITLE, of maybe you mean the whole suite of keywords? OPTIONS, TITLE, PROPERTY for sure. But as I said, someone else may actually want them to indent, so making sure they don't drop their font-lock-properties when indented is a better idea. I think we should make an effort to shift most if not all the regex stuff in org.el into org-element. There's far too much duplication with subtle differences sprinkled all over the place to get match data to work with and it's almost hopeless to try and find all such uses for a single element. What do you mean? Do you meant to use the org-elemnt parser and base also font-lock on it? Yes, but I'm not sure it is fully up to the task yet. But it ought to be, since there is no point in defining the syntax of the same piece of Org in more than one place. Or do you mean all the definitions of regexp constants. That too. Although as you note, this is fraught with peril. But if we'd see it through, then the result would be a lot less troublesome to maintain. Look at all the places in org.el where a match for headline tags is constructed for instance… This sounds desirable - but it also sounds like an extremely daunting task with possibilities for problems in side effects of regexp matching that will be difficult to find and might only show after a long time. I guess we could start such a process one regexp at a time. Please see http://thread.gmane.org/gmane.emacs.orgmode/69065/focus=71563 for a patch that attempts to implement some of this for node properties. It doesn't yet do away with the regex in org.el since there's no obvious convention for org-element to produce match data that can be used by the caller -- but if there was, then the regex could move into org-element I'd think. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] Problem with docview
Marvin Doyley marvin...@gmail.com writes: I am trying to link to a specific page in a pdf file using org-docview. For example, I have a org file with the following header ** [[docview:~/Desktop/2013_test.pdf::3][Digital modulation notes]] However, when I double click on the link I get the following error Invalid image file name `nil' Does anybody know to fix this problem ? Seems to work here[fn:1]. One thing that seems slightly broken is that if the file is huge and docview takes a while to convert it, then the goto-page part does not seem to be effective: , | (defun org-docview-open (link) | (when (string-match \\(.*\\)::\\([0-9]+\\)$ link) | (let* ((path (match-string 1 link)) | (page (string-to-number (match-string 2 link | (org-open-file path 1) ;; let org-mode open the file (in-emacs = 1) | ;; to ensure org-link-frame-setup is respected | (doc-view-goto-page page) | ))) ` It stays on p.1 in that case. It works OK for small files. Can you turn on debug-on-error and post the backtrace? Footnotes: [fn:1] Org-mode version 8.0.2 (release_8.0.2-72-gccfe83 @ /home/nick/elisp/org-mode/lisp/) -- Nick
Re: [O] unexpected appearance of x^2 in pdf file
Paul Stansell paulstans...@gmail.com writes: I may be under a misapprehension, but I expected the pdf output (created by C-c C-e l p) from the attached org file to show similar results for both lines. Instead, however, the simple x^2 Try =x^2= or ~x^2~ instead? outside of the verbatim environment puts the caret above the 2 even though I have set #+OPTIONS: ^:nil This seems to be because org-mode exports x^2 as x\^2 in the tex file. I think exporting it as x\^{}2 would give a better result. Is there another way to get the appearance I'm looking for without using the verbatim environment? Thanks for your advice, Paul PS. I'm using Emacs 24.2.1 with Org mode 8.0.2. #+OPTIONS: ^:nil toc:nil x^2 \begin{verbatim} x^2 \end{verbatim} -- Nick
Re: [O] Babel blocks not indented
On Thu, May 9, 2013 at 8:32 PM, J. David Boyd da...@adboyd.com wrote: Julien Cubizolles j.cubizol...@free.fr writes: Eric Schulte schulte.e...@gmail.com writes: Julien Cubizolles j.cubizol...@free.fr writes: I'm new to babel and I'm experiencing a strange problem. A src_block created with s TAB is not indented as the heading it's in. Here is an example: Try TAB s TAB instead. That's what I was doing but it seems the problem lies with org-indent-mode and is also present with regular text. Apparently, disabling and re-enabling seems to fix it. I'll investigate further. Julien. I change my mode to whatever my src is in when I want indenting to work properly, then change it back when I want to see it as an org file again. Dave I've brought this up before, but I think there's value in SRC blocks /not/ being indented, and in fact, I would love it if there were a way to make the contents of the SRC blocks /not/ be indented (as opposed to the default 2 space offset). Whitespace often matters, particularly when working with Python, and every now and then I find myself having to manually delete the extra spacing when pasting code into the Python interpreter. Other times I want to paste code snippets from SRC blocks into source files -- again, indentation gets in the way. I agree that it's aesthetically appealing, but my workflow would be easier without it. --Leo
Re: [O] Problem with Google Calendar Synchronization
Hi Eric, Guido Van Hoecke gui...@gmail.com writes: [...] Hang on, I am still looking into the UTC aspect. Right now the offset is dependent upon the execution time rather than upon the date being converted. Yes, if by execution time you mean by the time zone of the computer running the script. This is definitely a problem and one which I gave up trying to solve. Mind you, it did cause me no end of problems last year and this year again when I moved from the UK to Australia and then back again... What I meant is that running the script during winter time applies the winter time offset to all times, and running during summer time would apply the summer time offset to all times. As far as handling the tz difference between th file and the computer, I suggest to use a remote shell to a computer that has the same time zone as the file. The offsets will be different, and probably the switchover times too. Not something to handle in an awk script, I am afraid. Okay. No rush from my point of view. I would love to see a solution to this problem! The attached patch provides a solution. UTC times are corrected with the offset appropriate to that specific time. This will work for full hour offsets as well as offsets with any number of minutes (e.g. -0145, +0230). Still, this conversion uses the computer's time zone... I added some additional configuration options that allow for easy tailoring of the script's behaviour: # set to 1 or 0 to yes or not output a header block with TITLE, # AUTHOR, EMAIL etc... header = 1; # set to 1 or 0 to yes or not output the original ical preamble as # comment preamble = 1; # set to 1 to output time and summary as one line starting with # the time (value 1) or to 0 to output the summary as first line # and the date and time info as a second line condense = 0; # set to 1 or 0 to yes or not output the original ical entry as a # comment (mostly useful for debugging purposes) original = 1; # google truncates long subjects with ... which is misleading in # an org file: it gives the unfortunate impression that an # expanded entry is still collapsed; value 1 will trim those # ... and value 0 doesn't touch them trimdots = 0; # change this to your name author = Eric S Fraga # and to your email address emailaddress = e.fr...@ucl.ac.uk I left the default values to produce the output as you initially intended. I prefer to toggle preamble, condense, original and trimdots, but that is very subjective. With kind regards, --- ical2org.awk.orig 2013-05-09 14:15:14.0 +0200 +++ ical2org.awk 2013-05-10 23:33:50.0 +0200 @@ -9,9 +9,22 @@ # Note: change org meta information generated below for author and # email entries! # -# Known bugs: -# - not so much a bug as a possible assumption: date entries with no time -# specified are assumed to be independent of the time zone. +# Caveats: +# +# - date entries with no time specified are assumed to be local time zone; +# same remark for date entries that do have a time but do not end with Z +# e.g.: 20130101T123456 is local and will be kept as 2013-01-01 12:34 +# where 20130223T123422Z is UTC and will be corrected appropriately +# +# - UTC times are changed into local times, using the time zone of the +# computer that runs the script; it would be very hard in an awk script +# to respect the time zone of a file belonging to another time zone: +# the offsets will be different as well as the switchover time(s); +# (consider a remote shell to a computer with the file's time zone) +# +# - the UTC conversion entirely relies on the built-in strftime method; +# the author is not responsible for any erroneous conversions nor the +# consequence of such conversions # # Eric S Fraga # 20100629 - initial version @@ -27,101 +40,105 @@ # no further revision log after this as the file was moved into a git # repository... # -# Last change: 2011.01.28 16:08:03 +# Last change: 2013.05.10 23:33:50 #-- -# a function to take the iCal formatted date+time, convert it into an -# internal form (seconds since time 0), and adjust according to the -# local time zone (specified by +-UTC_offset calculated in the BEGIN -# section) +BEGIN { +### config section -function datetimestamp(input) -{ -# convert the iCal Date+Time entry to a format that mktime can understand +# maximum age in days for entries to be output: set this to -1 to +# get all entries or to N0 to only get enties that start or end +# less than N days ago +max_age = -1; +max_age = 7; + +# set to 1 or 0 to yes or not output a header block with TITLE, +# AUTHOR, EMAIL etc... +header = 1; + +# set to 1 or 0 to yes or not output the original ical preamble as +# comment +preamble = 1; + +# set to 1 to output time and summary as one
Re: [O] Babel blocks not indented
Leo Alekseyev dnqu...@gmail.com writes: I've brought this up before, but I think there's value in SRC blocks /not/ being indented, and in fact, I would love it if there were a way to make the contents of the SRC blocks / not/ be indented (as opposed to the default 2 space offset). Whitespace often matters, particularly when working with Python, and every now and then I find myself having to manually delete the extra spacing when pasting code into the Python interpreter. Other times I want to paste code snippets from SRC blocks into source files -- again, indentation gets in the way. I agree that it's aesthetically appealing, but my workflow would be easier without it. --Leo Does this help? , | org-edit-src-content-indentation is a variable defined in `org-src.el'. | Its value is 2 | | Documentation: | Indentation for the content of a source code block. | This should be the number of spaces added to the indentation of the #+begin | line in order to compute the indentation of the block content after | editing it with M-x org-edit-src-code. Has no effect if | `org-src-preserve-indentation' is non-nil. ` -- Nick
[O] filter included files
Hi, I like to include files from the network to document their status at the time of publication e.g.: #+INCLUDE: /host:/etc/iptables/iptables.rules example But sometimes I'd like to do some more filtering (sed, whatever), to remove passwords or other sensible information from the output. Is their a 'best practice' to achieve this goal? -- Regards, Oliver