Re: [O] GFDL
Dnia 2013-03-20, o godz. 03:56:18 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): What about @tex \global\font\legalese=cmr5\global\legalese @end tex ... @tex \global\rm @end tex ? I don't have working texi2dvi on my computer, so the following is still untested, but might be better than the previous one: @tex \global\font\legalese=cmr5\aftergroup\legalese @end tex ... @tex \aftergroup\rm @end tex Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] python sessions
Am 20.03.2013 04:07, schrieb Nick Dokos: John Hendy jw.he...@gmail.com wrote: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. I don't - I get the same error as Gary. And looking at the code of org-babel-python-initiate-session-by-key, I don't understand how it's supposed to work: python-buffer is nil to begin with; the cond takes the first branch and starts a python session. When we come to (setq org-babel-python-buffers (cons (cons session python-buffer) (assq-delete-all session org-babel-python-buffers))) python-buffer is still nil, so we are cooked. Maybe python-buffer was set as a side-effect of run-python in earlier versions of emacs? If so, it does not seem to be the case now. Nick Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf.dirty @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-12-29 on alphaville AFAIU :session is broken, because Python shell as opened by run-python or py-shell isn't used by ob-babel. Seems ob-babel sends it's code w/ an own shell command, thus opening a new python shell internally every time. Did :session ever work? Then I might be wrong with this comment. Andreas
Re: [O] [BUG] ob-sql.el: probably an extra paren
Hi Nick, Nick Dokos nicholas.do...@hp.com writes: Compiling it I get This is fixed, thanks. -- Bastien
Re: [O] [html] nil getting inserted
Hi Samuel, Samuel Wales samolog...@gmail.com writes: I am getting this diff in HTML output in recent git master. I don't think I changed anything and I have no filters for links. I haven't tried it in emacs -Q though. Note the nil before the . Fixed, thanks. -- Bastien
Re: [O] python sessions
Am 20.03.2013 01:04, schrieb John Hendy: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 Hi John, let's point out though that matter is not at stake. As the OP got output, system Python must be a 2... Best, Andreas and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. It's probably got something to do with your setup; taking a look at your config should help others help you out. Best regards, John
[O] org-exp-bibtex.el
With the org-mode 8 new exporter, org-exp-bibtex.el doesn't work any longer. I tried to change export hook to org-export-before-preprocess-hook, but it is more complicated than I hoped. I am looking for a patch, not urgent. Many thanks. Below is my test file. ### #+BIBLIOGRAPHY: ~/Documents/org-mode/bib/library plain limit:t #+BIBLIOGRAPHY: ~/Documents/org-mode/bib/Books plain limit:t # \bibliographystyle{plain} # \bibliography{~/Documents/org-mode/bib/library, ~/Documents/org-mode/bib/Books} * An integrated map of genetic variation from 1,092 human genomes. :PROPERTIES: :Custom_ID: Abecasis2012 :BIB: [[bib::Abecasis2012]] :PAPER: [[paper:Abecasis2012][Abecasis2012]] :DATE: [2013-03-20 Wed 16:08] :END: Test\cite{Abecasis2012} ### Error in *Message* ### run-hook-with-args: Wrong number of arguments: #[nil Æ ÇÈebÉÊÈË#]ÌÍ!ÌÎ!ÏÌÐ!!ÑÒ=GÈ@ABC ÈDEZE@D@ÓQDACBCEAE=*ÔÕ \¼Ö×!ØÙ!FÚÛÜ!!GHÝrGqBÈIEE@IÞPcEAE+rGqßÈHÈà%,F@B@áCâFD\C)ãäáåæçèéC êPC$\à=Úëì!@ÈJEøE@JíJ!EAEå.îï!KrKqðñ LòóôP!ebÉõÈË#*ÌÍ!ÌÎ!B BebÉöÈË#Ñ÷Ë#-øù úQ-U û= Uüýþÿ°Ë#+ Ò= nÖM!ÖN!* [wconfig oebp-cite-plist opt style file org-export-current-backend current-window-configuration ((set-window-configuration wconfig)) nil re-search-forward ...] 11 (/home/dcslbw/.emacs.d/el-get/org-exp-bibtex/org-exp-bibtex.elc . 602) nil], 1 ### -- Sincerely, Li Bowen.
[O] Possible to collapse State List by default?
Hi, I wonder if it is possible to collapse the list of state changes below SCHEDULED by default; as I have lots of tasks which I'll be working on several days and use to clock in to track the time I have also lots of entries like the following example. SCHEDULED: 2013-01-30 Mi - State WAITINGfrom STARTED[2013-03-13 Mi 15:12] - State STARTEDfrom STARTED[2013-03-13 Mi 11:01] - State WAITINGfrom STARTED[2013-03-13 Mi 10:42] - State STARTEDfrom STARTED[2013-03-13 Mi 10:25] - State WAITINGfrom STARTED[2013-03-13 Mi 10:11] - State STARTEDfrom STARTED[2013-03-13 Mi 10:06] - State WAITINGfrom STARTED[2013-03-12 Di 19:10] - State STARTEDfrom STARTED[2013-03-12 Di 15:01] - State WAITINGfrom STARTED[2013-03-12 Di 13:48] - State STARTEDfrom STARTED[2013-03-12 Di 10:33] ... It would be nice if I had something like: SCHEDULED: 2013-01-30 Mi... similar to: :LOGBOOK:... I know, the list is not contained within a drawer but may someone can point to a solution. Thanks Martin -- | G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
Re: [O] Changing '_archive' extension to allow Easy PG encryption: _archive.gpg?
On 2013-03-19 08:20-0400, Nick Dokos wrote: 'Mash (Thomas Herbert) mash...@toshine.net wrote: Morning, I wanted to know how I would change the default '_archive' extension? I work with encrypted org files foo.gpg with Easy PG and the added header... # -*- mode: org; epa-file-encrypt-to: (mash...@toshine.net) -*- But today I discovered that when I archive my TODO items they are of course saved unencrypted to the archive file foo.gpg_archive. This really is not ideal situation! I tried adding my header to the _archive file but this doesn't work, I assume because the extension is not .gpg. Any ideas how would I change the default _archive extension to _archive.gpg or better setup a case where it would change the extension only if the org file is .gpg to begin with? I suppose could also look to setup a case for Easy PG to work with a different extension, but would prefer to define the change for org-mode instead. C-h v org-archive-TAB gives some idea of the variables that are there. org-archive-location is what you need to change in order to add the .gpg suffix. I have no idea however, whether that's enough to allow you to do what you want to do. Nick Nick, thanks. For those who are interested. I got this to work by amending my foo.gpg header line to... # -*- mode: org; epa-file-encrypt-to: (mash...@toshine.net) -*- #+ARCHIVE: %s_archive.gpg:: Then I had to amend my foo.gpg_archive.gpg header to... # -*- mode: org; epa-file-encrypt-to: (mash...@toshine.net) -*- This then allowed automatic encryption without me having to 'select recipient for encryption', etc. Thanks again, 'Mash
Re: [O] Include today's date in title?
Gary Oberbrunner ga...@oberbrunner.com writes: I'm primarily publishing to LaTeX/PDF from org. I have a title: #+TITLE: Weekly Status TODAYS_DATE_HERE How can I get it to automatically export with today's date? Hopefully without a full babel elisp code block? Any ideas? BTW, converted to new exporter today. Pretty painless. This appears to work: #+TITLE: The title {{{modification-time(%Y-%m-%d)}}} Look in the info manual, (org) Macro replacement. date instead of modification-time should work but doesn't for me. -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
Re: [O] Open PDF under Windows on specific page using PDF-XChange Viewer
AW alexander.willand at t-online.de writes: For the record: #+begin_src emacs-lisp (add-to-list 'org-file-apps '(\\.pdf::\\([0-9]+\\)\\' . \C:/Program Files/Tracker Software/PDF Viewer/PDFXCview.exe\ /A page=%1 %s)) #+end_src (add-to-list 'org-file-apps '(\\.\\(doc\\|docx\\|pdf\\|dct\\)$ . system)) works for me, if the viewer is set in the system options. -- Otto
[O] [PATCH] Locally scope the variable `org-agenda-tag-filter' in `org-agenda-filter-by-tag'
* lisp/org-agenda.el: Introduce a local variable tag-filter to replace the global variable `org-agenda-tag-filter'. This relates to the bug when trying to filter by tag in agenda view with entry-text shown. In `org-agenda-filter-apply' - `org-agenda-entry-text-mode', it shows error when the global variable `org-agenda-tag-filter' is set. Thus, the variable `org-agenda-tag-filter' shouldn't be set in advance. Modifying the global one will be done anyway in `org-agenda-filter-apply', which happens after calling (org-agenda-entry-text-mode). TINYCHANGE. --- lisp/org-agenda.el | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index afaf009..acb8cb0 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7333,6 +7333,7 @@ to switch to narrowing. (effort-prompt ) (inhibit-read-only t) (current org-agenda-tag-filter) +(tag-filter org-agenda-tag-filter) maybe-refresh a n tag) (unless char (message @@ -7373,24 +7374,24 @@ to switch to narrowing. ((equal char ?\r) (org-agenda-filter-show-all-tag) (when org-agenda-auto-exclude-function - (setq org-agenda-tag-filter '()) + (setq tag-filter '()) (dolist (tag (org-agenda-get-represented-tags)) (let ((modifier (funcall org-agenda-auto-exclude-function tag))) (if modifier - (push modifier org-agenda-tag-filter - (if (not (null org-agenda-tag-filter)) - (org-agenda-filter-apply org-agenda-tag-filter 'tag))) + (push modifier tag-filter + (if (not (null tag-filter)) + (org-agenda-filter-apply tag-filter 'tag))) (setq maybe-refresh t)) ((equal char ?/) (org-agenda-filter-show-all-tag) - (when (get 'org-agenda-tag-filter :preset-filter) - (org-agenda-filter-apply org-agenda-tag-filter 'tag)) + (when (get 'tag-filter :preset-filter) + (org-agenda-filter-apply tag-filter 'tag)) (setq maybe-refresh t)) ((equal char ?. ) - (setq org-agenda-tag-filter + (setq tag-filter (mapcar (lambda(tag) (concat + tag)) (org-get-at-bol 'tags))) - (org-agenda-filter-apply org-agenda-tag-filter 'tag) + (org-agenda-filter-apply tag-filter 'tag) (setq maybe-refresh t)) ((or (equal char ?\ ) (setq a (rassoc char alist)) @@ -7404,10 +7405,10 @@ to switch to narrowing. (and tag (setq a (cons tag nil (org-agenda-filter-show-all-tag) (setq tag (car a)) - (setq org-agenda-tag-filter + (setq tag-filter (cons (concat (if strip - +) tag) (if narrow current nil))) - (org-agenda-filter-apply org-agenda-tag-filter 'tag) + (org-agenda-filter-apply tag-filter 'tag) (setq maybe-refresh t)) (t (error Invalid tag selection character %c char))) (when (and maybe-refresh -- 1.7.12.4 (Apple Git-37)
[O] saving state of buffer
How would I save the state of the headlines? e.g.,: * Books * Movies * Music ** Analysis *** Classical Composers * Beethoven ** Eroica *** II. Marcia funebre: Adagio assai General Comments * Climax of the Movement The climax of the movement for me is the sudden prominence of the French Horn at measures 136 - 140 (9:21 - 9:36, Bernstein). . . . When I return to this buffer, I want all of this to be opened. The problem with the Emacs bookmarks is that the headlines get completely garbled.
Re: [O] latex figure scaling question, backward compatibility and outdated manual
sorry for this post. I should have read the mailing list more carefully. looks as if a) the issue is already under discussion and b) that the manual is for latest release whereas I had problems with the pre-release. Thomas Alexander Gerds t...@biostat.ku.dk writes: the following page from the official manual http://orgmode.org/manual/Images-in-LaTeX-export.html says #+ATTR_LaTeX: width=5cm,angle=90 however, the new exporter does not recognize this syntax. instead the following works: #+ATTR_LaTeX: :width 5cm I was learning about this by guessing around for some time ... it is surprisingly hard to edebug the export process (any hints?). next, the following educated guess does not work: #+ATTR_LaTeX: :width 5cm :angle 90 instead one needs to say #+ATTR_LaTeX: :width 5cm,angle 90 I am not sure whether these changes are very intuitive, or more intuitive than the old style. but, the changes interfere with the aim to have reproducible documents. now, I am ready to convert all my old documents to the new syntax. Would someone share a (elisp/sed/perl/other) macro that reliably goes through old org-mode files and converts the part of the syntax which is not compatible with the new exporter? [it is easy to convert (width=) to (:width) in lines that start with #+ATTR_LaTeX: but this is not the full story. Such a macro could then be applied to update the manual ... cheers Thomas -- Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark Office: CSS-15.2.07 (Gamle Kommunehospital) tel: 35327914 (sec: 35327901)
Re: [O] [BUG] ob-sql.el: probably an extra paren
Hi Nick, Nick Dokos wrote: Can we please make it an invariable practice to run `make test' before every push? Isn't it possible to put such in some sort of Git pre-commit hook (or pre-push hook), so that it gets automatically enforced? Best regards, Seb -- Sebastien Vauban
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:44 AM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 04:07, schrieb Nick Dokos: John Hendy jw.he...@gmail.com wrote: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. I don't - I get the same error as Gary. And looking at the code of org-babel-python-initiate-session-by-key, I don't understand how it's supposed to work: python-buffer is nil to begin with; the cond takes the first branch and starts a python session. When we come to (setq org-babel-python-buffers (cons (cons session python-buffer) (assq-delete-all session org-babel-python-buffers))) python-buffer is still nil, so we are cooked. Maybe python-buffer was set as a side-effect of run-python in earlier versions of emacs? If so, it does not seem to be the case now. Nick Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf.dirty @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-12-29 on alphaville AFAIU :session is broken, because Python shell as opened by run-python or py-shell isn't used by ob-babel. Seems ob-babel sends it's code w/ an own shell command, thus opening a new python shell internally every time. Did :session ever work? Then I might be wrong with this comment. Not only did it work, it currently works for me. I seem to remember bad interaction with python modes other than the one shipped with emacs. In my .emacs I have ;; Python ;; there are several modes. Currently using https://github.com/fgallina/python.el ;; hopefully oneday a glorious default python mode will be shipped with emacs and we won't need this anymore. ;; (add-to-list 'load-path ~/.emacs.d/izahn) ;; (require 'python) ;; (setq ;; python-shell-interpreter ipython ;; python-shell-interpreter-args ;; python-shell-prompt-regexp In \\[[0-9]+\\]: ;; python-shell-prompt-output-regexp Out\\[[0-9]+\\]: ;; python-shell-completion-setup-code ;;from IPython.core.completerlib import module_completion ;; python-shell-completion-module-string-code ;;';'.join(module_completion('''%s'''))\n ;; python-shell-completion-string-code ;;';'.join(get_ipython().Completer.all_completions('''%s'''))\n) ;; (require 'python-mode) ;; ;; python auto completion (require 'ac-python) All the python-mode and ipython mode stuff is commented out partly because it did not play nice with org-mode. Using the default python mode works for me. So, for those of you who are finding that this is not working, what python mode are you using? Best, Ista Andreas
Re: [O] Possible to collapse State List by default?
Hi Martin, Martin Butz m...@mkblog.org writes: I wonder if it is possible to collapse the list of state changes below SCHEDULED by default; as I have lots of tasks which I'll be working on several days and use to clock in to track the time I have also lots of entries like the following example. (setq org-log-into-drawer t) or (setq org-log-into-drawer LOGBOOK) Both are equivalent. You can also use this startup option in an Org file: #+STARTUP: logdrawer This is a FAQ, perhaps LOGBOOK is a better default value for `org-log-into-drawer'. What do you all think? -- Bastien
Re: [O] saving state of buffer
Hi Fourtytwo, 42 147 aeus...@gmail.com writes: When I return to this buffer, I want all of this to be opened. (info (Org)Visibility cycling) When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u TAB' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien
Re: [O] Open link to directory outside of emacs?
Hi James, James Harkins jamshar...@gmail.com writes: I'm unsure if org-mode's behavior is correct here. 1. Create a link to a directory in an org file, e.g. [[~/Documents/][My docs]]. 2. Put the point on the link and hit C-u C-u C-c C-o. The org manual says If you want to avoid opening in Emacs, use a C-u C-u prefix. I am doing that, but I get a dired buffer anyway. Org *tries* to open this directory, as the docstring says. But here the system does not know how to open directories. Check the docstring of `org-file-apps' on how to set it so that directories can be opened specially. HTH, -- Bastien
Re: [O] org-exp-bibtex.el
Hi Li, Li Bowen bowenl...@gmail.com writes: With the org-mode 8 new exporter, org-exp-bibtex.el doesn't work any longer. I tried to change export hook to org-export-before-preprocess-hook, but it is more complicated than I hoped. I am looking for a patch, not urgent. Many thanks. Yes, this is a known issue -- we are currently brainstorming on how to replace it. Not sure if we will be able to before 8.0, but we will try. Thanks, -- Bastien
Re: [O] GFDL
Hi Marcin, Marcin Borkowski mb...@wmi.amu.edu.pl writes: I don't have working texi2dvi on my computer, so the following is still untested, but might be better than the previous one: Thanks! It actually works _somehow_. But the display is ugly: @code{...} strings do not use the small size, and the line spacing is too big. Let us know when you can experiment and get good results. Best, -- Bastien
Re: [O] python sessions
Ista Zahn istaz...@gmail.com wrote: Did :session ever work? Then I might be wrong with this comment. Not only did it work, it currently works for me. I seem to remember bad interaction with python modes other than the one shipped with emacs. In my .emacs I have ... All the python-mode and ipython mode stuff is commented out partly because it did not play nice with org-mode. Using the default python mode works for me. So, for those of you who are finding that this is not working, what python mode are you using? The one distributed with emacs 24.3.50 (at least afaict: I don't think I'm doing twisted things but you never know :-) ). Question for you: what version of org mode? Nick
Re: [O] New Exporter html - latex - beamer
cberry at ucsd.edu writes: Robert Eckl eckl.r at gmx.de writes: [snip] I said You might be able to do what you want with filter functions. You can do that with this filter: But you will want to add something to it to treat links without the :windowenv: tag in the normal way , | #+BEGIN_SRC emacs-lisp | (defun filter-links-windowized (link backend info) | Rid :windowenv: from LINK desc and format per BACKEND. Ignore INFO. | (let ((clean-string (replace-regexp-in-string :windowenv: link))) Replace this line: | (if (eq backend 'latex) with these: (if (and (eq backend 'latex) (string-match :windowenv: link)) | (let ((wprefix \\begin{window}[0,r,) | (wpostfix}},{}]\n\\parbox{0.7\\textwidth}{) | (repstrng | \\1{includegraphics[width=0.28textwidth]\\2})) | (concat wprefix | (file-name-sans-extension | (replace-regexp-in-string | \\([^}]*}\\)\\({.*}\\) | repstrng | clean-string)) | wpostfix)) | clean-string))) | #+end_src ` then ordinary links like [[http://good.place.com][See good place]] will be handled in the usual manner by the latex backend Chuck
Re: [O] Include today's date in title?
Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: This appears to work: #+TITLE: The title {{{modification-time(%Y-%m-%d)}}} Look in the info manual, (org) Macro replacement. date instead of modification-time should work but doesn't for me. {{{date}}} will only work if #+DATE: is set. For other users, use {{{modification-time(...)}}} or {{{time()}}} (And yes, this will be documented...) -- Bastien
Re: [O] Possible to collapse State List by default?
Hi Bastien, Bastien wrote: Martin Butz m...@mkblog.org writes: I wonder if it is possible to collapse the list of state changes below SCHEDULED by default; as I have lots of tasks which I'll be working on several days and use to clock in to track the time I have also lots of entries like the following example. (setq org-log-into-drawer t) I definitely think that this should be made the default. or (setq org-log-into-drawer LOGBOOK) Both are equivalent. You can also use this startup option in an Org file: #+STARTUP: logdrawer This is a FAQ, perhaps LOGBOOK is a better default value for `org-log-into-drawer'. What do you all think? You mean: #+STARTUP: logbook ? Best regards, Seb -- Sebastien Vauban
Re: [O] python sessions
I am using a snapshot build of Emacs: emacs-trunk-r112044-20130314-w32-i386.zip, which says it is GNU Emacs 24.3.50.1 (i386-mingw-nt6.1.7601) of 2013-03-14 on VBOX on Windows 7/64. My python-mode comes from the python.el shipped with the above emacs, which says it is Version: 0.24.2. Org-mode is from git trunk: commit 3842b073c332256ebfeecb0b01f859bb720cb68f Author: Bastien Guerry b...@altern.org Date: Mon Mar 18 20:36:46 2013 +0100 On Wed, Mar 20, 2013 at 10:08 AM, Nick Dokos nicholas.do...@hp.com wrote: Ista Zahn istaz...@gmail.com wrote: Did :session ever work? Then I might be wrong with this comment. Not only did it work, it currently works for me. I seem to remember bad interaction with python modes other than the one shipped with emacs. In my .emacs I have ... All the python-mode and ipython mode stuff is commented out partly because it did not play nice with org-mode. Using the default python mode works for me. So, for those of you who are finding that this is not working, what python mode are you using? The one distributed with emacs 24.3.50 (at least afaict: I don't think I'm doing twisted things but you never know :-) ). Question for you: what version of org mode? Nick -- Gary
Re: [O] tangle files from non-code blocks?
Hi Zhenjiang, zhenjiang xu zhenjiang...@gmail.com writes: I am wondering, is there anyway to tangle contents inside # +begin_example ... #+end_example in a similar way to tangle a code block? It doesn't work now (or do I miss anything?). IMHO, it would be a useful feature, isn't it? I guess this is enough, no? #+BEGIN_SRC text :tangle test.txt Some text here. #+END_SRC #+BEGIN_SRC text :tangle test.txt Some more text here. #+END_SRC Yes, this is useful :) -- Bastien
[O] Timestamp practices?
I'm trying to give each header entry a timestamp. To do this I create a drawer like this: :PROPERTIES: :CUSTOM_ID: [2013-03-19 Tue 14:26] :END: Initially, I do C-u M-x org-insert-drawer. This gives me :PROPERTIES: :END: Then I do C-c C-x p and choose CUSTOM-ID. Then I insert a timestamp. Here's what it looks like (expanded): ** Links *** [[http://www.neo4j.org/][The World's Leading Graph Database]] :PROPERTIES: :CUSTOM_ID: [2013-03-19 Tue 14:26] :END: *** [[http://www.manning.com/carlson/][Redis: NoSQL; key-value; in-memory]] :PROPERTIES: :CUSTOM_ID: [2013-03-19 Tue 19:34] :END: [[ http://justinsboringpage.blogspot.com/2011/07/eredis-redis-client-in-emacs-lisp.html][eredis: a Redis client in emacs lisp]] :PROPERTIES: :CUSTOM_ID: [2013-03-19 Tue 19:42] :END: I'd like to know the best practice for adding such timestamps. Am I gaining anything by enclosing the timestamp in such an elaborate drawer? Are these two commands the best way to do this? Or is there a more automated approach? In general, I can't help but marvel at the ad-hoc, on-the-fly data management possibilities org-mode offers. It seems like the sky's the limit. But I'd like opinions on whether I'm stumbling along a blind alley.
Re: [O] Timestamp practices?
Hi Lawrence, Lawrence Bottorff galaxybeinglam...@gmail.com writes: I'd like to know the best practice for adding such timestamps. Am I gaining anything by enclosing the timestamp in such an elaborate drawer? It really depends on what you want to achieve, but I'd say no, in general. Are these two commands the best way to do this? Or is there a more automated approach? I would simply use a bare time-stamp like this * Headline 2013-03-20 mer. Use C-c . to insert the active time-stamp, or C-c ! to insert an inactive one, or use shift-up/down on the brackets to switch from active to inactive. In general, I can't help but marvel at the ad-hoc, on-the-fly data management possibilities org-mode offers. It seems like the sky's the limit. But I'd like opinions on whether I'm stumbling along a blind alley. In any case, using a time-stamp in CUSTOM_ID does not seem to be a good idea, as this id will be used as an anchor in various contexts (link search, HTML, etc.) So better use a bare time-stamp I'd say. HTH, -- Bastien
Re: [O] Possible to collapse State List by default?
Hi Bastian, great! Thanks a lot. Best Martin Am 20.03.2013 14:58, schrieb Bastien: Hi Martin, Martin Butz m...@mkblog.org writes: I wonder if it is possible to collapse the list of state changes below SCHEDULED by default; as I have lots of tasks which I'll be working on several days and use to clock in to track the time I have also lots of entries like the following example. (setq org-log-into-drawer t) or (setq org-log-into-drawer LOGBOOK) Both are equivalent. You can also use this startup option in an Org file: #+STARTUP: logdrawer This is a FAQ, perhaps LOGBOOK is a better default value for `org-log-into-drawer'. What do you all think? -- | G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
Re: [O] Timestamp practices?
Lawrence Bottorff galaxybeinglam...@gmail.com writes: I'm trying to give each header entry a timestamp. This is from Bernt Hansen and automagically inserts a timestamp each time you insert a new header - if you want so. If not, you can toggle the behaviour. Nice. , | (defvar bh/insert-inactive-timestamp t) | | (defun bh/toggle-insert-inactive-timestamp () | (interactive) | (setq bh/insert-inactive-timestamp (not bh/insert-inactive-timestamp)) | (message Heading timestamps are %s |(if bh/insert-inactive-timestamp ON OFF))) | | (defun bh/insert-inactive-timestamp () | (interactive) | (org-insert-time-stamp nil t t nil nil nil)) | | (defun bh/insert-heading-inactive-timestamp () | (save-excursion | (when bh/insert-inactive-timestamp | (org-return) | (org-cycle) | (bh/insert-inactive-timestamp | | (add-hook 'org-insert-heading-hook | 'bh/insert-heading-inactive-timestamp 'append) `- ,- | (global-set-key (kbd f9 T) 'bh/toggle-insert-inactive-timestamp) | (global-set-key (kbd f9 t) 'bh/insert-inactive-timestamp) `- -- cheers, Thorsten
Re: [O] Errors on start up when loading ox-md and ox-beamer (seems caused by recent commit)
On Tue, Mar 19, 2013 at 6:59 PM, Bastien b...@altern.org wrote: John Hendy jw.he...@gmail.com writes: On Tue, Mar 19, 2013 at 6:48 PM, Bastien b...@altern.org wrote: Hi John, how did you pull? by using git pull or make update? - git pull - make clean make make doc I'm kind of glad you asked, as this used to (I think) be the right method, but I have a vague notion that there's some built-in-org way now? ~$ make update will pull and make for you... ~$ make help ~$ make helpall are useful too. Awesome. Thanks for that -- didn't realize it would give org-specific info! From the descriptions, I don't understand the difference between: - make- build Org ELisp and all documentation - make autoloads - create org-loaddefs.el to load Org in-place Is =make= *also* making autoloads, and =make autoloads= is *only* making the autoload files? Nevermind. Just did make and saw a whir of making autoloads float across the screen. At the very least, I learned that I don't have to explicitly do =make doc= if I'm doing make :) I don't install to anywhere, so I'm only interested in compiling and loading right from the git repo vs. scattering files all over. All ears to documentation about a proper way, if there is one that's now recommended. I'd recommend ~$ make update Oh, btw, I fixed the problem in master, was my fault, not the installation fault... thanks for reporting this! Pull and re-make confirms the fix. Thanks! John -- Bastien
Re: [O] GFDL
Dnia 2013-03-20, o godz. 15:00:43 Bastien b...@altern.org napisał(a): Hi Marcin, Marcin Borkowski mb...@wmi.amu.edu.pl writes: I don't have working texi2dvi on my computer, so the following is still untested, but might be better than the previous one: Thanks! It actually works _somehow_. But the display is ugly: @code{...} strings do not use the small size, and the line spacing is too big. Let us know when you can experiment and get good results. Best, Can you send me the intermediate .tex file? (If not, write me that - I'll try to install texi2dvi on my box.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:08 AM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 01:04, schrieb John Hendy: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: snip You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 Hi John, let's point out though that matter is not at stake. As the OP got output, system Python must be a 2... True, which is why I clarified my version. The foo() command still worked for me; I simply had issues due to print() syntax changes between 2 - 3. So... I've tried to eliminate this and retried today with the following process (note setting the python command to python2): - Start emacs with `emacs -q` - M-x load-file ~/Desktop/minimal-config #+begin_src minimal-config ;; load path (add-to-list 'load-path ~/.elisp/org.git/lisp/) ;; setup babel languages (org-babel-do-load-languages 'org-babel-load-languages '((python .t ))) (setq org-babel-python-command python2) #+end_src - For reference $ python2 --version Python 2.7.3 On first I get a syntax error executing the first block: #+RESULTS: : first : ... ... ... File stdin, line 4 : print end first : ^ : SyntaxError: invalid syntax On a whim, I simply inserted a newline, and it worked. Here is the full file with my executed results (C-c C-c on each block): #+begin_src orgmode file * My Document The first block says: #+BEGIN_SRC python :exports results :results output :session *PyFoo* print first def foo(x): print In foo(%s)%x return x+1 print end first #+END_SRC #+RESULTS: : first : ... ... ... end first The result is: #+BEGIN_SRC python :exports results :results output :session *PyFoo* print hello print foo(100) print bye #+END_SRC #+RESULTS: : hello : In foo(100) : 101 : bye #+end_src orgmode file *Note:* I do not get a *PyFoo* session, only a *Python* buffer. When I got to kill emacs, here is the session info asking me if I want to kill the running buffer process: Python run *Python*/dev/pts/2 python2 -i -c import sys; sys.path.remove('') So, seems to work for me. This is on Arch Linux: - uname -a Linux hostname 3.8.3-2-ARCH #1 SMP PREEMPT Sun Mar 17 13:04:22 CET 2013 x86_64 GNU/Linux - emacs --version GNU Emacs 24.2.1 - M-x org-version Org-mode version 8.0-pre (release_8.0-pre-146-g73fe0a @ /home/jwhendy/.elisp/org.git/lisp/) Best regards, John Best, Andreas
Re: [O] python sessions
On Wed, Mar 20, 2013 at 10:38 AM, John Hendy jw.he...@gmail.com wrote: snip I've tried to eliminate this and retried today with the following process (note setting the python command to python2): - Start emacs with `emacs -q` Just caught this... I used -q accidentally instead of -Q. Re-did with -Q and get same results (successful block execution). John
Re: [O] python sessions
John Hendy jw.he...@gmail.com wrote: - M-x org-version Org-mode version 8.0-pre (release_8.0-pre-146-g73fe0a @ /home/jwhendy/.elisp/org.git/lisp/) That's pretty close to what I'm using. Can you do me a favor: start emacs -Q and evaluate the variable org-babel-python-buffers before and after executing a python block with a :session argument and post the results? Thanks, Nick
[O] Fwd: python sessions
[sorry, forgot to reply all] -- Forwarded message -- From: Gary Oberbrunner ga...@oberbrunner.com Date: Wed, Mar 20, 2013 at 12:11 PM Subject: Re: [O] python sessions To: nicholas.do...@hp.com After starting emacs -Q and loading my minimal setup (including require 'org): ((:default)) After loading the .org file and doing nothing else, it's the same. After evaling one code block: ((*PyFoo*) (:default)) But note that there is no buffer named *PyFoo* (there is one named *Python*). On Wed, Mar 20, 2013 at 12:06 PM, Nick Dokos nicholas.do...@hp.com wrote: John Hendy jw.he...@gmail.com wrote: - M-x org-version Org-mode version 8.0-pre (release_8.0-pre-146-g73fe0a @ /home/jwhendy/.elisp/org.git/lisp/) That's pretty close to what I'm using. Can you do me a favor: start emacs -Q and evaluate the variable org-babel-python-buffers before and after executing a python block with a :session argument and post the results? Thanks, Nick -- Gary -- Gary
Re: [O] Include today's date in title?
This seems to work for me: #+DATE: %Y-%m-%d Shripad Tucson, AZ On Wed, Mar 20, 2013 at 7:21 AM, Bastien b...@altern.org wrote: Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: This appears to work: #+TITLE: The title {{{modification-time(%Y-%m-%d)}}} Look in the info manual, (org) Macro replacement. date instead of modification-time should work but doesn't for me. {{{date}}} will only work if #+DATE: is set. For other users, use {{{modification-time(...)}}} or {{{time()}}} (And yes, this will be documented...) -- Bastien
[O] problem with figure captions / labels in LaTeX export
Hi all, First I would just like to thank all the people responsible for org-mode. It is an amazing product that has become an indispensable part of my workflow! I encountered a problem with LaTeX export that seems to affect org-versions 7.9.3f and 7.9.4. Specifically, exporting figure captions and labels using #+CAPTION and #+LABEL no longer seems to work. ### start of code snippet #+TITLE: My Important Paper #+AUTHOR:Dr. Nyan #+DATE: \today #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [] * Section 1 See Figure\nbsp{}\ref{fig:myfig} below #+CAPTION: This is a figure #+LABEL: fig:myfig file:myfig.pdf ### end of code snippet When I look in the LaTeX output after exporting, I see: See Figure~{}\ref{fig:myfig} below \includegraphics[width=.9\linewidth]{myfig.pdf} There is no figure caption and the label fig:myfig is unresolved. Thanks for looking into this! -Dale Barr
Re: [O] [BUG] ob-sql.el: probably an extra paren
Hi Sébastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Nick Dokos wrote: Can we please make it an invariable practice to run `make test' before every push? Isn't it possible to put such in some sort of Git pre-commit hook (or pre-push hook), so that it gets automatically enforced? If anyone knows how to setup an automated tests framework for Org, feel free to go ahead, we will use it and monitor broken tests to see what's wrong in the code or in the tests or in the environment running the tests. Testing is a nice habit to have, but let's not make it a coercive pre-requisit before pushing patches. My whole thinking here is well captured by Rich Hickey: http://codequarterly.com/2011/rich-hickey/ Fogus: You have been known to speak out against test-driven development. Do you mind elaborating on your position? Hickey: I never spoke out ‘against’ TDD. What I have said is, life is short and there are only a finite number of hours in a day. So, we have to make choices about how we spend our time. If we spend it writing tests, that is time we are not spending doing something else. Each of us needs to assess how best to spend our time in order to maximize our results, both in quantity and quality. If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem. I’m certain that, for me, this produces better solutions, with fewer defects, than any other use of my time. A bad design with a complete test suite is still a bad design. Best, -- Bastien
Re: [O] Possible to collapse State List by default?
Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: (setq org-log-into-drawer t) I definitely think that this should be made the default. Me too. Let's wait for other votes/arguments. You mean: #+STARTUP: logbook No, I mean #+STARTUP: logdrawer -- Bastien
Re: [O] saving state of buffer
Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == allow me to save and reopen the buffer in its current configuration. From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. mit freundlichen Grüßen, 42 2013/3/20 Bastien b...@altern.org Hi Fourtytwo, 42 147 aeus...@gmail.com writes: When I return to this buffer, I want all of this to be opened. (info (Org)Visibility cycling) When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u TAB' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien
Re: [O] Include today's date in title?
shripad sinari shripad.sin...@gmail.com writes: This seems to work for me: #+DATE: %Y-%m-%d And might be a nice addition to the FAQ on Worg. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] python sessions
Am 20.03.2013 17:06, schrieb Nick Dokos: John Hendy jw.he...@gmail.com wrote: - M-x org-version Org-mode version 8.0-pre (release_8.0-pre-146-g73fe0a @ /home/jwhendy/.elisp/org.git/lisp/) That's pretty close to what I'm using. Can you do me a favor: start emacs -Q and evaluate the variable org-babel-python-buffers before and after executing a python block with a :session argument and post the results? Thanks, Nick Hi, started from Emacs -Q checking the example given. Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) (:result-params output replace) (:rowname-names) (:colname-names)) Result: (:session) Result: nil HTH, Andreas Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.14) of 2013-03-05 Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef...) current state: == (setq org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metadown-hook '(org-babel-pop-to-session-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '((python . py) (emacs-lisp . el)) org-babel-load-languages '((sh . t) (python . t)) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] saving state of buffer
On 03/20/2013 06:00 PM, 42 147 wrote: Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == allow me to save and reopen the buffer in its current configuration. From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. (require 'saveplace) (setq-default save-place t) works for me. It just opens the place where I had the point, nothing more, but that's what I need most.
Re: [O] Confusion about attr_latex and new exporter
On Tue, Mar 19, 2013 at 1:49 PM, Bastien b...@altern.org wrote: Hi John, John Hendy jw.he...@gmail.com writes: Thanks for the clarification, though regardless of the current state... what is the consensus on what it *should* be? The old lingo was: - #+attr_latex: width=Xcm - #+attr_html: width=Xpx ... and the new lingo is #+attr_latex: :width Xcm #+attr_html: :width Xpx for images. Images allow :width :height :alt attributes, while other elements like links and tables allow only the :options attribute. Upon fresh pull to Org-mode version 8.0-pre (release_8.0-pre-146-g73fe0a), I confirm that =#+attr_html: :width value= works as described above. Thanks! John I updated ox-html.el so that it respects this syntax. Nicolas, would it be okay to make (org-export-read-attribute :attr_html element) return title=\Title\ instead of nil when the element's attributes are like this #+attr_html: title=Title ? Thanks, -- Bastien
Re: [O] python sessions
[ ... ] AFAIU :session is broken, because Python shell as opened by run-python or py-shell isn't used by ob-babel. Seems ob-babel sends it's code w/ an own shell command, thus opening a new python shell internally every time. Did :session ever work? Then I might be wrong with this comment. Not only did it work, it currently works for me. That's good news, so it might be fixed soon. I seem to remember bad interaction with python modes other than the one shipped with emacs. Shipping should not affect the code ;) Well, if you feel disturbed by python-mode.el, please file a bug-report at https://bugs.launchpad.net/python-mode python-mode.el prepares some keys and fontifying differently but should not touch python.el commands. In case it does, probably should change that... Andreas [ ... ]
Re: [O] python sessions
Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? Nick (:result-params output replace) (:rowname-names) (:colname-names)) Result: (:session) Result: nil
Re: [O] [Out-of-Thread] Re: [RFC] Org syntax (draft)
Hi again Thank you all for the responses. So as a neewb again, I dont really understand fully all the technical specifications from the above posts, what do you guys recommended i do if i want to start moving and using org now full time in terms of color support? should i use the current emp. method, use another method suggested above which will be 100% supported, wait with my move to org (what is the rough time frame for the new specification)? I would greatly appreciate any help as i am very keen to move over to orgmode full time best Z
Re: [O] python sessions
On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos nicholas.do...@hp.com wrote: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? I was thinking the concern was over not having the session named properly, but might be wrong (Andreas could confirm). I've not used python prior to this, but I use R almost daily in Org and if I do #+begin_src R :session R, I get a buffer actually named =R=. In this case, I expected the buffer name would be *PyFoo*. Checking if it was an issue with asterisks, I used =:session py= and still just get the default *Python* buffer created. John Nick (:result-params output replace) (:rowname-names) (:colname-names)) Result: (:session) Result: nil
Re: [O] python sessions
John Hendy jw.he...@gmail.com wrote: On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos nicholas.do...@hp.com wrote: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? I was thinking the concern was over not having the session named properly, but might be wrong (Andreas could confirm). I guessed Andreas tried with an unnamed session (but I agree it would be best if he confirms): afaics, if I use a session name, it's passed correctly in the params argument of org-babel-execute:python as (:session . foo), but in the later processing, org-babel-python-buffers is not set correctly. I've not used python prior to this, but I use R almost daily in Org and if I do #+begin_src R :session R, I get a buffer actually named =R=. In this case, I expected the buffer name would be *PyFoo*. Checking if it was an issue with asterisks, I used =:session py= and still just get the default *Python* buffer created. Yes, I think it's ob-python's problem: but as I said before, I don't understand why it works for you (and Ista Zahn). Nick
Re: [O] saving state of buffer
(require 'saveplace) (setq-default save-place t) works for me. It just opens the place where I had the point, nothing more, but that's what I need most. This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: all non top-level headlines below point are hidden. At least for me. 2013/3/20 42 147 aeus...@gmail.com Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == allow me to save and reopen the buffer in its current configuration. From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. mit freundlichen Grüßen, 42 2013/3/20 Bastien b...@altern.org Hi Fourtytwo, 42 147 aeus...@gmail.com writes: When I return to this buffer, I want all of this to be opened. (info (Org)Visibility cycling) When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u TAB' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:15 PM, Nick Dokos nicholas.do...@hp.com wrote: John Hendy jw.he...@gmail.com wrote: On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos nicholas.do...@hp.com wrote: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? I was thinking the concern was over not having the session named properly, but might be wrong (Andreas could confirm). I guessed Andreas tried with an unnamed session (but I agree it would be best if he confirms): afaics, if I use a session name, it's passed correctly in the params argument of org-babel-execute:python as (:session . foo), but in the later processing, org-babel-python-buffers is not set correctly. I've not used python prior to this, but I use R almost daily in Org and if I do #+begin_src R :session R, I get a buffer actually named =R=. In this case, I expected the buffer name would be *PyFoo*. Checking if it was an issue with asterisks, I used =:session py= and still just get the default *Python* buffer created. Yes, I think it's ob-python's problem: but as I said before, I don't understand why it works for you (and Ista Zahn). I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. Best, Ista Nick
Re: [O] python sessions
Ista Zahn istaz...@gmail.com wrote: Yes, I think it's ob-python's problem: but as I said before, I don't understand why it works for you (and Ista Zahn). I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. For me, it does not work at all: I don't get python buffers, period (forget about what they are named :-) ) Nick
Re: [O] python sessions
I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. Best, Ista Nick
Re: [O] python sessions
Am 20.03.2013 19:15, schrieb Nick Dokos: John Hendy jw.he...@gmail.com wrote: On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos nicholas.do...@hp.com wrote: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? I was thinking the concern was over not having the session named properly, but might be wrong (Andreas could confirm). I guessed Andreas tried with an unnamed session yes, tried the example given, ah, see misinterpreted the spot, thanks, Andreas
Re: [O] saving state of buffer
42, Try this: Move the point to some headline. Press C-c C-x p v TAB ENTER a TAB ENTER Observe how lines, like :PROPERTIES:, were added to your headline. Press C-u C-u TAB to simulate closing the file and reopening it. I know that this isn't exactly what you're looking for. You're looking for org-mode to automatically track and save the folding state. I'd like that, too. But maybe this VISIBILITY property will suffice for now. Cheers, --Dave From: emacs-orgmode-bounces+david.loyall=nebraska@gnu.org [mailto:emacs-orgmode-bounces+david.loyall=nebraska@gnu.org] On Behalf Of 42 147 Sent: Wednesday, March 20, 2013 13:28 PM To: Org Mode Subject: Re: [O] saving state of buffer (require 'saveplace) (setq-default save-place t) works for me. It just opens the place where I had the point, nothing more, but that's what I need most. This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: all non top-level headlines below point are hidden. At least for me. 2013/3/20 42 147 aeus...@gmail.commailto:aeus...@gmail.com Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == allow me to save and reopen the buffer in its current configuration. From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. mit freundlichen Grüßen, 42 2013/3/20 Bastien b...@altern.orgmailto:b...@altern.org Hi Fourtytwo, 42 147 aeus...@gmail.commailto:aeus...@gmail.com writes: When I return to this buffer, I want all of this to be opened. (info (Org)Visibility cycling) When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u TAB' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien
Re: [O] python sessions
Am 20.03.2013 18:25, schrieb Nick Dokos: Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Seems `org-babel-execute':python doesn't get the session flag. Edebug: org-babel-execute:python org-babel-execute:python executing Python code block... [4 times] Result: ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace output) (:hlines . no) (:padnewline . yes) (:session) (:result-type . output) Sure it does: ^^ What it does with it is another matter however. Am I missing something? Nick (:result-params output replace) (:rowname-names) (:colname-names)) Result: (:session) Result: nil At least for unnamed session it's set to nil here let* ((session (org-babel-python-initiate-session... later on it takes the wrong route: (defun org-babel-python-evaluate (session body optional result-type result-params preamble) Evaluate BODY as Python code. (if session (org-babel-python-evaluate-session session body result-type result-params) (org-babel-python-evaluate-external-process body result-type result-params preamble))) Best, Andreas
[O] `org-export-define-backend' and its friends are now defuns (was: Build fail with emacs 24.3.1)
Bastien b...@altern.org writes: Anyway, `org-export-define-backend' and its friends are now defuns, since there is no good reason for them to be macros. This broke my setup and I had to dig (git log -p) to figure out what to do (basically quote everything) Instead of (org-export-define-derived-backend my-latex latex :translate-alist ((template . my-latex-template-fun))) write (org-export-define-derived-backend 'my-latex 'latex :translate-alist '((template . my-latex-template-fun))) [There are now double quotes in the ascii backend, which I guess are not needed.] Obvious, when you think about it, but I'm a bit dense when the byte-compiler tells me that my-latex-template-fun is a malformed function. A little more prominent warning would have been much appreciated. -- Florian Beck
[O] Unescape :help-echo in links
Hi, I use a lot of custom links (for citations) and cannot stand the escaped mess in the help-echo. So I've been using the patch below for quite some time without any noticable slowdown. diff --git a/lisp/org.el b/lisp/org.el index bf74afd..470f93d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5806,10 +5806,7 @@ by a #. (if (and (re-search-forward org-bracket-link-regexp limit t) (not (org-in-src-block-p))) (let* ((hl (org-match-string-no-properties 1)) -(help (concat LINK: hl)) -;; FIXME: Above we should remove the escapes. But that -;; requires another match, protecting match data, a lot -;; of overhead for font-lock. + (help (concat LINK: (save-match-data (org-link-unescape hl (ip (org-maybe-intangible (list 'invisible 'org-link 'keymap org-mouse-map 'mouse-face 'highlight -- Florian Beck
Re: [O] org-mode live documentation?
Aloha LB, Lawrence Bottorff galaxybeinglam...@gmail.com writes: Here's something from http://orgmode.org/worg/org-contrib/babel/intro.html : If you are viewing the Org-mode version of this document in Emacs, place point anywhere inside a block and press C-c C-c to run the code1 (and feel free to alter it!). How can I get such live documentation? You can click on the `Show Org source' button at the bottom left of the page, then cut and paste into Emacs. hth, Tom -- Thomas S. Dye http://www.tsdye.com
[O] Programmatically insert source-blocks
Hi List, it probably a command everybody knows, but I looked for it several times and just missed it: 'insert a source-block'. I know about Chap. 15.2. of the manual (Easy Templates), thats not what I mean. To reformulate my question: Why doesn't (the most relevant function I have found) ,-- | (org-babel-demarcate-block optional ARG) `-- have a few more optional arguments, e.g. like this ,-- | (org-babel-demarcate-block optional LANG ARG rest args) `-- so that it can be called (e.g.) like this ,-- | (org-babel-demarcate-block optional emacs-lisp nil :results output) `-- without asking the user for input (inserting a new src-block around point or region)? There are so many functions that deal with source-blocks, but the most basic one - insert a new src-block for language xyz with args u v w - is not there. At least not for non-interactive use. At least I did not find it ;) -- cheers, Thorsten
Re: [O] python sessions
On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed It fails to name the python process buffers. Everything else works as expected. Consider this example: 8-cut here8 #+BEGIN_SRC python :exports results :results output :session *foo* def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *bar* def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *foo* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : Traceback (most recent call last): : File stdin, line 1, in module : NameError: name 'bar' is not defined #+BEGIN_SRC python :exports results :results output :session *bar* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : Traceback (most recent call last): : File stdin, line 1, in module : NameError: name 'foo' is not defined : 102 8-cut here8 the foo function exists when I use :session foo (and not with :session bar), and the bar function exists when I uses :session bar (and not with :session foo). That equals works in my book. The only thing that doesn't work is that I have buffers . * tmp.org 1657 Org ~/Desktop/tmp.org * *Python*2332 Inferior Python: * *Python* 332 Inferior Python: instead of . * tmp.org 1657 Org ~/Desktop/tmp.org * *foo* 332 Inferior Python: * *bar* 332 Inferior Python: This is with GNU Emacs 24.2.1 and Org-mode version 8.0-pre (release_8.0-pre-54-gb5a853 Best, Ista But I do get separate python buffers (.e.g., *Python*, *Python*2) for each session, and python blocks get executed in the right python process. To me that equals works, but if the issue is that the buffers don't get named with the value of :session then no, that doesn't work for me either. Best, Ista Nick
[O] org-mode meeting in Berlin
I try to establish a org-mode meeting in Berlin, Germany. I'm thinking about a casual meeting in the evenings at some bar on a monthly basis. Contact me if you are interested in getting in touch with other orgmode users in real life. Best, Henrik
Re: [O] python sessions
Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Andreas
[O] Copying subtrees with footnotes
Hi, I need to copy subtrees between org-buffers, but `org-copy-subtree' ignores footnotes (which is technically correct, I guess). Is there any way to automate this? -- Florian Beck
Re: [O] GFDL
Dnia 2013-03-20, o godz. 16:25:25 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): Can you send me the intermediate .tex file? (If not, write me that - I'll try to install texi2dvi on my box.) OK, my fault; I thought that the process looks like this: .texi - .tex - dvi/pdf. So. I am not an expert at texinfo - and it seems that it is not very configurable - but I managed to devise this (very ugly) hack: @c put this at the beginning of doclicense.texi @tex \global\font\legalese=cmr5 \global\font\legalesett=cmtt5 \global\font\legalesesl=cmti5 \global\let\rm=\legalese \global\let\tt=\legalesett \global\let\sl=\legalesesl \global\baselineskip=6pt \global\legalese @end tex It has still a few problems: one font is not changed (and I tried a few tricks to change it - to no avail:(...) - I'd suggest dropping the slanted style on the last page; the copyright sign is broken (I'd suggest using (C) instead); the header is also set in smaller font (and I have no simple idea how to circumvent it; I guess it would be doable, after some digging in texinfo.texi - not this time, though, sorry). The problem is, that plain TeX (unlike LaTeX) does not have any font management/selection system - just mapping commands to filenames. On top of that, texinfo.tex uses its own system (which I don't have enough time now to fathom). A mess, in one word. HTH anyway -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] Bug?: org-babel-load-file not autoloaded in Emacs 24.3
Hello all, I currently have the vast majority of my .emacs configuration in .org files that rely on =org-babel-load-file=. Before updating to Emacs 24.3 I could rely on autoloads to complete the initialization. After updating today I get the following error: =Symbol's function definition is void: org-babel-load-file= Is it intentional that org-babel-load-file is no longer autoloaded and that either (require 'org) or (require 'org-loaddefs) is needed to use it when starting emacs? Regards, Jon
Re: [O] python sessions
On Wed, Mar 20, 2013 at 3:53 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed Oops, sorry I totally misread this before. I guess my last email didn't make much sense! It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Unnamed sessions works as expected: #+BEGIN_SRC python :exports results :results output :session def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : 102 Andreas
Re: [O] org-check.org confusion
FYI, I don't think that email is involved here. I think that [lawrence]@[lawrence-ThinkPad-T61].[11138]:[1363708367] ...is: [username]@[hostname].[pid or port]:[unix timestamp] 1363708367 = Tue, 19 Mar 2013 15:52:47 GMT Dear orgmode users: what does that represent? Is it a socket? A named pipe? Just curious, thanks, --Dave From: emacs-orgmode-bounces+david.loyall=nebraska@gnu.org [mailto:emacs-orgmode-bounces+david.loyall=nebraska@gnu.org] On Behalf Of Lawrence Bottorff Sent: Wednesday, March 20, 2013 15:06 PM To: emacs-orgmode@gnu.org Subject: [O] org-check.org confusion I got the org-check.orghttp://org-check.org in my Emacs buffer. I do C-u C-c * . I watch Messages throw this: Re-applying formulas to full table...(line 73) Re-applying formulas to 73 lines...done Re-applying formulas...done [2 times] Auto-saving... But there is no advertised re-write with results placed into the results column. I then look in the directory where org-check.orghttp://org-check.org is -- and I see a .#org-check.orghttp://org-check.org - lawrence@lawrence-ThinkPad-T61.11138:1363708367mailto:lawrence@lawrence-ThinkPad-T61.11138:1363708367 I'm guessing org-check.orghttp://org-check.org tried to email me results? The org-check.orghttp://org-check.org file has no email in-buffer property I can find. Please advise. LB
Re: [O] python sessions
Ista, what OS are you on? Maybe this (or part of it anyway) is only a Windows problem? On Wed, Mar 20, 2013 at 4:12 PM, Ista Zahn istaz...@gmail.com wrote: On Wed, Mar 20, 2013 at 3:53 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed Oops, sorry I totally misread this before. I guess my last email didn't make much sense! It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Unnamed sessions works as expected: #+BEGIN_SRC python :exports results :results output :session def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : 102 Andreas -- Gary
Re: [O] org-check.org confusion
Loyall, David david.loy...@nebraska.gov writes: Dear orgmode users: what does that represent? (info (emacs)Interlocking) Christopher
Re: [O] org-check.org confusion
Any details about how this is involved with this issue? I have an # org-check.org# in this directory too. Being totally a beginner with elisp hacking, I don't know how to trace out this behavior. On Wed, Mar 20, 2013 at 3:32 PM, Christopher Schmidt christop...@ch.ristopher.com wrote: Loyall, David david.loy...@nebraska.gov writes: Dear orgmode users: what does that represent? (info (emacs)Interlocking) Christopher
Re: [O] Programmatically insert source-blocks
Hi, Thorsten, Here's one way, and pointers to more: http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00406.html Yours, Christian Thorsten Jolitz writes: Hi List, it probably a command everybody knows, but I looked for it several times and just missed it: 'insert a source-block'. I know about Chap. 15.2. of the manual (Easy Templates), thats not what I mean. To reformulate my question: Why doesn't (the most relevant function I have found) ,-- | (org-babel-demarcate-block optional ARG) `-- have a few more optional arguments, e.g. like this ,-- | (org-babel-demarcate-block optional LANG ARG rest args) `-- so that it can be called (e.g.) like this ,-- | (org-babel-demarcate-block optional emacs-lisp nil :results output) `-- without asking the user for input (inserting a new src-block around point or region)? There are so many functions that deal with source-blocks, but the most basic one - insert a new src-block for language xyz with args u v w - is not there. At least not for non-interactive use. At least I did not find it ;)
[O] Unwanted scrolls from org-agenda-todo
Hi all, my Arch Linux has just received an update to Emacs 24.3 that comes with new shiny ( slightly outdated :) org-mode (org-version: 7.9.3f). I ran into a little annoyance, though. Suppose `-' represents top of the window and `0' cursor position. I type `C-c a a', `o' to `delete-other-windows' and get the following agenda listing (details omitted): - TODO task 1 TODO task 2 TODO task 3 0 TODO task 4 TODO task 5 After I press `t' for `org-agenda-todo' I get: - 0 DONE task 4 TODO task 5 `org-agenda-todo' seems to scroll (up or down - depending on how you're looking at it) in a way to make the task, currently marked as DONE, be the first line in the window. I briefly looked at source code of `org-agenda-todo' but could find anything odd. Though, I'm, by far, not an expert. So, got any clues? Thanks, Miro
Re: [O] Copying subtrees with footnotes
Not a direct answer to your question, but: I find that inline footnotes solve a lot of problems: locality of reference is a huge deal both cognitively and for organization; they cannot be put in the wrong sections by mistake; they can't get numbers mixed up; they can't get deleted or commented without the corresponding part doing so in the normal case; it is not necessary to follow them to check to see if they are there or what they are or where they are; they can't get refiled or separated from their definitions by headline additions; and they trigger fewer numbering bugs. They also, apparently, can be copied more easily. Samuel On 3/20/13, Florian Beck f...@miszellen.de wrote: Hi, I need to copy subtrees between org-buffers, but `org-copy-subtree' ignores footnotes (which is technically correct, I guess). Is there any way to automate this? -- Florian Beck -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. There is NO hope without action. This means YOU.
[O] problems with org-protocol + capture templates
Hi to all, I'm using org-mode as personal day planner with almost all the configuration of http://doc.norang.ca/org-mode.html I try to use org-protocol to send links to emacs using the config of worg. But when emacs open i can not select the template of the capture mode (it's weird months ago was working) and i don't know were is my mistake. this is my keybindidng var orgProtoString = 'org-protocol://capture://'+ encodeURIComponent(gBrowser.currentURI.spec) + '/' + encodeURIComponent(gBrowser.contentWindow.document.title) + '/' + encodeURIComponent(content.window.getSelection()); gBrowser.loadURI(orgProtoString); my capture template (setq org-capture-templates (quote ((t todo entry (file ~/en uso/2013/org/refile.org) * TODO %?\n%U\n%a\n :clock-in t :clock-resume t) (r respond entry (file ~/en uso/2013/org/refile.org) * NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n :clock-in t :clock-resume t :immediate-finish t) (n note entry (file ~/en uso/2013/org/refile.org) * %? :NOTE:\n%U\n%a\n :clock-in t :clock-resume t) (j Journal entry (file+datetree ~/Dropbox/en uso/2013/org/diary.org) * %?\n%U\n :clock-in t :clock-resume t) (w org-protocol entry (file ~/en uso/2013/org/refile.org) * TODO Review %c\n%U\n :immediate-finish t) (p Phone call entry (file ~/en uso/2013/org/refile.org) * PHONE %? :PHONE:\n%U :clock-in t :clock-resume t) (h Habit entry (file ~/en uso/2013/org/refile.org) * NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \%Y-%m-%d %a .+1d/3d\)\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n and the .desktop file in ./local/share/applications [Desktop Entry] Name=org-protocol Exec=emacs %u Type=Application Terminal=false Categories=System; MimeType=x-scheme-handler/org-protocol; reggards Alvar
[O] Errors after upgrading emacs to 24.3.1 and org to 7.9.4
I have upgraded emacs from version 24 to 24.3.1 via homebrew on os x mountain lion and every time I start emacs I get error: error: Invalid face, modeline I have also upgraded org to version 7.9.4 via emacs M-x package-list option and now my custom keys don't work: when I press ^C-c it used to give me option as to where I want to put something: either project, someday/maybe, read and review or tasks. Now I get error: C-c c is undefined (setq org-capture-templates '((t Tasks entry (file+headline ~/org/gtd_home.org Tasks) ** %?\n %i Added:%U) (p Project entry (file+headline ~/org/gtd_home.org Projects) ** %?\n %i Added:%U) (r Read and Review entry (file+headline ~/org/gtd_home.org Read and Review) ** %?\n %i Added:%U) (s Someday/ Maybe entry (file+headline ~/org/gtd_home.org Someday/ Maybe) ** %?\n %i Added:%U) (j Journal entry (file+datetree ~/org/journal.org) * %?\nEntered on %U\n %i\n %a))) ^C-t which used to give me todo, cancel etc. don't seem to work as well: (setq org-todo-keywords '((sequence TODO(t) | DONE(d)) (sequence | CANCELED(c Please help.
Re: [O] Copying subtrees with footnotes
Samuel Wales samolog...@gmail.com writes: I find that inline footnotes solve a lot of problems: Absolutly. The main reason I don't generally inline footnotes is that I don't want to *see* them. Basically, footnotes are for readers that are not my primary audience; sometimes footnotes are only for me and I keep them only for drafting. Either way, they are noise in the paragraph. Same thing, when I take notes and want to see the main points at a glance while keeping reflections out of the way. I thought about using custom links for footnotes (which would allow me to hide the definition), but I'm not sure that would work the same way. Can I have other (custom) links inside the link path (or inside an inline footnote defintion)? Thanks for the idea, I have to investigate. Still, the original questions stands. Maybe `org-copy-subtree' and `org-paste-subtree' could be adapted? Problem is, these functions use kill-region internally, and I see no easy way to add the footnote information. -- Florian Beck
[O] Org tutorials
I searched the mailing list and did not find any reference to the following. Is there a reason why Richard Dillon's YouTube Hack Emacs org-mode talks are not included in the Org Tutorials? For instance An overview of Org Mode - http://www.youtube.com/watch?v=6W82EdwQhxU Org Mode in Depth:Managing Structure - http://www.youtube.com/watch?v=nsGYet02bEk There may be others. They're part of a multipart Emacs series. I believe that they provide another introduction to Org Mode even if slightly out of date. Charlie Millar
Re: [O] problems with org-protocol + capture templates
Hi Alvar, Alvar Maciel wrote: Hi to all, I'm using org-mode as personal day planner with almost all the configuration of http://doc.norang.ca/org-mode.html I try to use org-protocol to send links to emacs using the config of worg. But when emacs open i can not select the template of the capture mode (it's weird months ago was working) and i don't know were is my mistake. this is my keybindidng var orgProtoString = 'org-protocol://capture://'+ encodeURIComponent(gBrowser.currentURI.spec) + '/' + encodeURIComponent(gBrowser.contentWindow.document.title) + '/' + encodeURIComponent(content.window.getSelection()); gBrowser.loadURI(orgProtoString); my capture template (setq org-capture-templates (quote ((t todo entry (file ~/en uso/2013/org/refile.org) * TODO %?\n%U\n%a\n :clock-in t :clock-resume t) (r respond entry (file ~/en uso/2013/org/refile.org) * NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n :clock-in t :clock-resume t :immediate-finish t) (n note entry (file ~/en uso/2013/org/refile.org) * %? :NOTE:\n%U\n%a\n :clock-in t :clock-resume t) (j Journal entry (file+datetree ~/Dropbox/en uso/2013/org/diary.org) * %?\n%U\n :clock-in t :clock-resume t) (w org-protocol entry (file ~/en uso/2013/org/refile.org) * TODO Review %c\n%U\n :immediate-finish t) (p Phone call entry (file ~/en uso/2013/org/refile.org) * PHONE %? :PHONE:\n%U :clock-in t :clock-resume t) (h Habit entry (file ~/en uso/2013/org/refile.org) * NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \%Y-%m-%d %a .+1d/3d\)\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n AFAIK, no, you can't dynamically select your template. The default template for org-protocol is bound to `w'. Though, you can change that for your Emacs sessions. Best regards, Seb -- Sebastien Vauban
Re: [O] Copying subtrees with footnotes
On 3/20/13, Florian Beck f...@fbeck.net wrote: Samuel Wales samolog...@gmail.com writes: I find that inline footnotes solve a lot of problems: Absolutly. The main reason I don't generally inline footnotes is that I don't want to *see* them. Basically, footnotes are for readers that are Others have proposed a command to collapse and expand inline footnotes. This would be trivial, involving invisibility property. Do you think that would help? -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. There is NO hope without action. This means YOU.
Re: [O] Programmatically insert source-blocks
Christian Moe m...@christianmoe.com writes: Hi Christian, Here's one way, and pointers to more: http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00406.html thanks for the links. I mean, it is not t difficult to write a function like ,-- | (defun org-insert-block (lang) |(interactive Mlanguage: ) |(insert (format #+begin_src %s\n \n#+end_src lang)) |(goto-char (- (point) 10))) `-- or to write insert statements like ,--- | (insert (format #+begin_src %s\n \n#+end_src lang)) `--- in a program - but I find it strange that this is not part of core Org-mode functionality. There are dozens of functions that deal with existing code-blocks, but none (non-interactive) that creates/inserts a code-block. So here is my FEATURE REQUEST: either modify `org-babel-demarcate-block' so that it can be used to insert a language-specific code-block (with args?) non-interactively, or add something like `org-insert-block' to Org-mode's core. I would prefer signature ,-- | (defun org-insert-block (lang rest args)...) `-- to be able to specify the src-block headline exactly in a program that uses this function. -- cheers, Thorsten
Re: [O] python sessions
On Wed, Mar 20, 2013 at 4:25 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: Ista, what OS are you on? Maybe this (or part of it anyway) is only a Windows problem? Maybe -- I'm on Arch Linux. On Wed, Mar 20, 2013 at 4:12 PM, Ista Zahn istaz...@gmail.com wrote: On Wed, Mar 20, 2013 at 3:53 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: Am 20.03.2013 20:42, schrieb Ista Zahn: On Wed, Mar 20, 2013 at 2:43 PM, Andreas Röhler andreas.roeh...@easy-emacs.de wrote: I guess it depends on the definition of works. I don't get python buffers with the name of the :session variable. Reads as it works only with named sessions, but fails with unnamed Oops, sorry I totally misread this before. I guess my last email didn't make much sense! It fails to name the python process buffers. May you try still an unnamed session as sent by OP? Unnamed sessions works as expected: #+BEGIN_SRC python :exports results :results output :session def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : 102 Andreas -- Gary
Re: [O] `org-export-define-backend' and its friends are now defuns
Hi Florian, Florian Beck f...@miszellen.de writes: [There are now double quotes in the ascii backend, which I guess are not needed.] Not sure what you mean here, can you explain? Obvious, when you think about it, but I'm a bit dense when the byte-compiler tells me that my-latex-template-fun is a malformed function. A little more prominent warning would have been much appreciated. Indeed -- I wanted to announce this together with some other changes I didn't finish yet. The change is 28 hours old, though, so let me underline this again: if you rely on master for your regular setup, prepare to be patient and to ping the mailing list for things that break. Thanks, -- Bastien
Re: [O] Unwanted scrolls from org-agenda-todo
Hi Miro, Miro Bezjak bezjak.m...@gmail.com writes: `org-agenda-todo' seems to scroll (up or down - depending on how you're looking at it) in a way to make the task, currently marked as DONE, be the first line in the window. I briefly looked at source code of `org-agenda-todo' but could find anything odd. Though, I'm, by far, not an expert. So, got any clues? This is a bug in 7.9.3f which have been fixed in master, you'll be able to get rid of it by updating to 8.0. Sooonish. -- Bastien
Re: [O] Copying subtrees with footnotes
Hi Florian, Florian Beck f...@fbeck.net writes: Still, the original questions stands. Maybe `org-copy-subtree' and `org-paste-subtree' could be adapted? Instead of adapting those function, I'd have a function to inline external footnotes--and vice versa. This function would be helpful in this case but in other situations too. Any taker? -- Bastien
Re: [O] Unescape :help-echo in links
Hi Florian, Florian Beck f...@miszellen.de writes: I use a lot of custom links (for citations) and cannot stand the escaped mess in the help-echo. So I've been using the patch below for quite some time without any noticable slowdown. Looks good. Can you resend it as a proper patch with a changelog? Thanks! -- Bastien
Re: [O] python sessions
On Wed, Mar 20, 2013 at 8:22 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I've attached a patch which works for me, at least in simple tests. It should set the buffer name more correctly in session mode. I also added a new defcustom for the python command to use for session mode specifically; that is required for Windows, and I don't think it hurts on other OSes. Is this fixing *everything* for you, or just the named sessions? Just wondering if your original issue is fixed, or if you're still having issues. If it was fixed... what was it (out of curiosity)? Sorry... still haven't rebooted into Windows to see if I can replicate on Windows as well. John On Wed, Mar 20, 2013 at 8:20 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: On Wed, Mar 20, 2013 at 1:00 PM, John Hendy jw.he...@gmail.com wrote: Some other things I noticed when modifying your custom config (just to clarify): - Org-mode git repo is located at /emacs/site-lisp/org-mode/lisp? - You shouldn't need (perhaps even as strongly as shouldn't use) =(require 'org)= Ah, I see -- once I add the proper dir, the proper version of org-mode will get autoloaded from there (even with emacs -Q). But it wouldn't actually hurt, would it? -- Gary -- Gary