Re: [O] Keeping metadata/notes about files and directories
See the custom commands for the agenda in the manual. You can create a command to do a search in specific files. The framework would be splitting your big org file into multiple files and creating a custom search that search only in those particular files. Of course you would need to change this custom command definition if you add more files, but with the idea of using one file per year from the other thread that means updating the custom command only once an year. I didn't test this so see how searching in all of these files scale when compared to searching in one big file, but I imagine it would be faster. -- Darlan Cavalcante Moreira Christoph Groth writes: Dear all, I just wrote under the subject “Re: Managing articles in org mode and collaboration”. This posting puts the other one in a broader context. While thinking about organizing articles, I asked myself: Wouldn’t it be useful to keep metadata/notes about *various* kinds of files/sub-directories/projects inside org-mode (or something similar)? One example is a collection of programming projects. Just like for articles, it would be useful to add notes and metadata to each project. The same is true for many other archive-like collections of things that grow over time. The same problems appear as described in the other posting (namely scaling and searching). I know that there have been discussions about this in the past, and I know that there’s org-annotate-file. Is there anyone who uses a scheme like this (for 1000 items, say) in practice? Christoph
Re: [O] org-crypt doesn't automatically encrypt on save
One note first, if you change org-modules manually like that you must make sure this change is done before org-mode is loaded. I prefer to use the customize interface just for org-modules for that reason. I also add org-crypt to org-modules like you do. If I open my password.org file and open it directly I will have the same behaviour you get. Maybe the save magic does not work reliable when org-crypt is loaded through org-modules, I'm not sure. When I call my function that requires org-crypt and calls org-crypt-use-before-save-magic before opening my password file everything works. But I only do it like this because I have a single file with encrypted entries and I prefer to delay loading org-crypt initialization. I profiled my configuration some time ago and decided to do that to reduce i little bit the initialization time. Since you already require org-crypt, just add (org-crypt-use-before-save-magic) after the require and see if that solves your problem. Rémi Letot writes: Darlan Cavalcante Moreira darc...@gmail.com writes: You need to load org-crypt and call org-crypt-use-before-save-magic before you open the org file. I have this in my config: (add-to-list 'org-modules 'org-crypt) (require 'org-crypt) So I think that's what is done. I also checked org-mode-hook on a fresh start of emacs, and it does include a stanza for org-encrypt-entries. C-h v org-mode-hook begins with this: - Value: (#[nil \300\301\302\303\304$\207 [org-add-hook before-save-hook org-encrypt-entries nil t] 5] - So I think that part is ok. Now I visit a new file, say test.org, which doesn't exist yet. I create one heading with a bit of content, tag it as :crypt:, and save the file. Bam, it's not encrypted. Now I call M-x org-encrypt-entries, and the heading is encrypted. So org-crypt does work, I can decrypt and encrypt headings manually, but it won't do it automatically. And indeed, before-save-hook is nil in a fresh org file and stays so when I visit an org file. Now I call M-x org-mode on that file, add a space so it is modified and I can save it, call C-x C-s, and it is encrypted as it should. org-mode set before-save-hook to (org-encrypt-entries t) as it should. Only I have to manually call org-mode once the file is open, it won't do it automatically. I C-x k the file, re-visit it, and I have to call M-x org-mode on it again before it will automatically encrypt the headings. All other org-mode functionnality seems to work fine. Any idea ? Thanks,
Re: [O] org-crypt doesn't automatically encrypt on save
You need to load org-crypt and call org-crypt-use-before-save-magic before you open the org file. For instance, my configuration for org-crypt is --8---cut here---start-8--- (autoload 'org-decrypt-entry org-crypt.el Decrypt the content of the current headline. t) (autoload 'org-decrypt-entries org-crypt.el Decrypt all entries in the current buffer. t) (autoload 'org-encrypt-entry org-crypt.el Encrypt the content of the current headline. t) (autoload 'org-encrypt-entries org-crypt.el Encrypt all top-level entries in the current buffer. t) (with-eval-after-load org-crypt ;; Automatically encrypts everything that has the tag crypt ;; when you save the file (org-crypt-use-before-save-magic) (setq org-tags-exclude-from-inheritance (quote (crypt Project))) (setq org-crypt-key 8NUMBERS) (setq org-crypt-disable-auto-save t) ) --8---cut here---end---8--- Only this gives the same problem you have. When I decrypt an entry org-crypt is finally loaded but since I'm already visiting the file then the save magic will not kick in. In my case I only have one file where I use org-crypt and I define the function below --8---cut here---start-8--- (defun my-find-senhas-org-heading nil (interactive) (require 'org-crypt) (find-file ~/org/passwords.org) ) --8---cut here---end---8--- If I often used org-crypt in any org file I would always require org-crypt and call org-crypt-use-before-save-magic in my Emacs configuration, but since I only use for this particular file, then defining a function to visit this file works better for me. hob...@poukram.net writes: Hello org-mode World, is anyone successfully using org-crypt with org-crypt-use-before-save-magic ? I set it up as per the docs, but apparently the org-mode before-save-hook is not populated with org-encrypt-entries as it should when I open an org buffer, meaning that crypt tagged headlines are not encrypted when I save the file *but* it works if I manually call M-x org-mode after opening the file... In summary: C-x C-f test.org / M-x org-decrypt-entry / C-x C-s does not reencrypt the entry C-x C-f test.org / M-x org-mode / M-x org-decrypt-entry / C-x C-s does work as expected. Any idea ? I'm using the Emacs Starter Kit, so that might interfere, but I can't see how and where... Thanks, -- Rémi -- Darlan Cavalcante Moreira darc...@gmail.com
Re: [O] easy way to link to file in attachment directory?
I have this #+LINK: attach elisp:(org-open-file (org-attach-expand %s)) in all of my org-mode files. In fact, I have this line, among others, in an org-mode setup file which is included in all of my org-mode files using #+SETUPFILE: Then I can create a link to an attachment with [[attach:filename_without_any_path.extension][description]] Also, just after attaching a new file org will automatically store the link so that you can use C-c C-l to include the link. -- Darlan Cavalcante Moreira darc...@gmail.com mirko.vuko...@gmail.com writes: Hello, Is there a way to insert a link to a file in the attachment directory? Currently, I open the attachment directory in emacs and copy the full path. then in the document I create the link using org-insert-link (C-u C-c C-l). Thanks, Mirko
[O] Latex Preview Equations(with C-u C-u)
Recently the latex preview equation in org-mode was improved. Particularly 'C-c C-c' no longer removes the latex equations overlays, and now we have a single function, org-toggle-latex-fragment, to create/remove the image and overlays. I think these changes were very good. One small inconvenient, however, is that I usually pass two prefix arguments, 'C-u C-u', to org-toggle-latex-fragment to render everything in the buffer. If I add a new equation and then call org-toggle-latex-fragment again with 'C-u C-u' org-mode will simply remove the overlays. This was not a problem when there was a single function that only created overlays and another to remove them. I think having a 'toggle function' is better, but if the user passes two prefix arguments he wants to render everything in the buffer, even if there are already equations overlays in the buffer. Could org-mode be changed to behave like that? -- Darlan Cavalcante Moreira
Re: [O] Export formats: Is there an in-house Emacs final format?
As I understand, C-c C-x C-v (org-toggle-inline-images) will only show images inline, not latex fragments (equations). For latex you want C-c C-x C-v (org-preview-latex-fragment). I have a folder with org files as my personal knowledge archive and I use both org-toggle-inline-images and org-preview-latex-fragment. Org-mode is indeed very nice for this conversation with myself use case. Obviously you still get better (prettier) results if you export the org file, but I rarely need to do that. -- Darlan mank...@gmail.com writes: Hi Lawrence, emacs (in a window, not in the terminal) allows display of images. C-c C-x C-v will display your LaTeX equations as graphics in the buffer. No need for other software. You could also look at UTF-8 mode (C-c C-x \) to display \alpha and x_y as their respective greek and subscript sympbols, for example. And finally you could look into various pretty-symbol modes so your text and even python code looks more analog. With pretty symbols np.sum(sqrt(x)) looks like the greek sum and the sqrt symbols. A cheap ASCII view would be: Ev(x) -k. On Tue, 25 Feb 2014, Lawrence Bottorff wrote: I'm a beginner, and I'm trying to imagine how I'd use org mode to create a sort of running conversation with myself. That is, I'd like to do a form of journaling where I could make notes to myself, which would include the usual text as outlne-hierarchy, hyperlinks too, but also babel code chunks, as well as any sort of mathematical formulae I might want to include. It's this last requirement that seems to be the hardest. As far as I can tell, the readability of my raw org file would go out the window when I started trying to put in math formulae. As I understand, you basically do raw Tex markup for math stuff -- and you can only see the results when you export to something external to Emacs like html for a browser or PDF for a PDF viewer. Is this correct? And for my title question, is there a native in-house i.e., the final product is viewable in Emacs, export that would be rich enough (text, images, and math symbols)? Besides the embedding of a PDF viewer in a buffer trick, Emacs seems to have only Info. Does Info allow images and fairly normal-looking math symbols? Or is final product always an off-site, extra-Emacs business? Lawrence Bottorff North Shore MN -- Darlan Cavalcante Moreira darc...@gmail.com
Re: [O] style the tags with colors in theme
That is strange. It works for me and has being working for a long time. For reference, my org-mode version is 8.06 and Emacs version is 24.3.50.2. Maybe it is something related to you configuration. Try to start Emacs with a different and minimum configuration including setting org-tag-faces and see it that has an effect. If it works, then you will need to bisect your configuration to isolate what makes it stop working. -- Darlan Cavalcante Moreira darc...@gmail.com zelt...@gmail.com writes: thx again for the answer but it dosent see to work here: https://paste.xinu.at/KlvP/ this is what i have in my config: (setq org-tag-faces '( (mru :inherit org-done :box nil :underline t :height 1.2) (Fav :foreground blue :box nil :underline t :height 1.2))) i restarted emacs but still see fav as a regular tag with out a foreground of blue etc any ideas what im doing wrong? - The ATTACH tag is automatically added when I attach a file to a headline (see Attachments in the org-mode manual [[info:org#Attachments]]). It's the only tag I like to change appearance and thus I used it as an example. But the same procedure should work with other tags. A very important detail is that you need to restart Emacs. In the documentation of org-tag-faces it says If you set it with Lisp, a restart of Emacs is required to activate the changes. Therefore, put something like the code below in your initialization file and restart Emacs and it should work --8---cut here---start-8--- (setq org-tag-faces '( (SomeTag :inherit org-done :box nil :underline t :height 1.2) (SomeOtherTag :foreground blue :box nil :underline t :height 1.2))) --8---cut here---end---8--- I think that the tags don't need to be in org-tag-alist for this to work. On Tue, Jul 23, 2013 at 11:19 PM, Darlan Cavalcante Moreira darc...@gmail.com wrote: The ATTACH tag is automatically added when I attach a file to a headline (see Attachments in the org-mode manual [[info:org#Attachments]]). It's the only tag I like to change appearance and thus I used it as an example. But the same procedure should work with other tags. A very important detail is that you need to restart Emacs. In the documentation of org-tag-faces it says If you set it with Lisp, a restart of Emacs is required to activate the changes. Therefore, put something like the code below in your initialization file and restart Emacs and it should work --8---cut here---start-8--- (setq org-tag-faces '( (SomeTag :inherit org-done :box nil :underline t :height 1.2) (SomeOtherTag :foreground blue :box nil :underline t :height 1.2))) --8---cut here---end---8--- I think that the tags don't need to be in org-tag-alist for this to work. -- Darlan Cavalcante Moreira darc...@gmail.com zelt...@gmail.com writes: Thx Darlan but i cant seem to get it to work. i have tried both adding ATTACH in the top of my org file: #+TAGS: Fav(f) todo(t) mru(m) bind(b) ATTACH(a) and also in my org config: (setq org-tag-alist '((@work . ?w) (@ATTACH . ?a) (@dl . ?d) (@preR . ?p) (@fav . ?f)(@linux . ?l))) and added your line to my config yet nothing happned when i add the ATTACH tag, what am i missing here? best z On Tue, Jul 23, 2013 at 2:45 PM, Darlan Cavalcante Moreira darc...@gmail.com wrote: I use the code below for the ATTACH tag --8---cut here---start-8--- (setq org-tag-faces '((ATTACH :inherit org-done :box nil :underline t :height 1.2))) --8---cut here---end---8--- -- Darlan Cavalcante Moreira darc...@gmail.com b...@gnu.org writes: Hi Xebar, Xebar Saram zelt...@gmail.com writes: does anyone know how (if there is a way) to style the tags with colors in a theme? IE to have tags with a different fg/bg from default and even better yet to define a different color for each tag? See this: C-h v org-tag-faces RET HTH,
Re: [O] style the tags with colors in theme
I use the code below for the ATTACH tag --8---cut here---start-8--- (setq org-tag-faces '((ATTACH :inherit org-done :box nil :underline t :height 1.2))) --8---cut here---end---8--- -- Darlan Cavalcante Moreira darc...@gmail.com b...@gnu.org writes: Hi Xebar, Xebar Saram zelt...@gmail.com writes: does anyone know how (if there is a way) to style the tags with colors in a theme? IE to have tags with a different fg/bg from default and even better yet to define a different color for each tag? See this: C-h v org-tag-faces RET HTH,
Re: [O] shortcut to create a heading already with todo included
Capture is the way to go for a general (and anyware) way to create TODOs. But for something simple, you can use M-return to create a new headline in org-mode and M-S-return to create a headline with a TODO. -- Darlan Cavalcante Moreira darc...@gmail.com ohwoeo...@gmail.com writes: Hi, This task is handled with capture templates. Here's how I do it: (setq org-capture-templates '((t Todo entry (file+headline (concat org.d gtd.org) Tasks) * TODO %^{Brief Description} %^g\n%?\nAdded: %U %i\n) ;; more templates here )) (global-set-key (kbd C-~) 'org-capture) regards, Oleh On Tue, Jul 23, 2013 at 2:48 PM, Xebar Saram zelt...@gmail.com wrote: Hya guys i know this is probably a silly question but does anyone know how to make a shortcut that inserts a heading which already includes a TODO state? i have a main file named todo.org in which all heading are todos. each time i need to do a 2 step process: add heading and then add a todo state, so im looking for a quicker way to add a todo item (IE a keybind to add a already todo header). another better solution if possible would be maybe reassign the C-Enter keybind to create a todo header only in a specific file (todo.org) if thats possible? thx alot in advance Z
Re: [O] Several questions about beamer export
I don't think you can change the behavior of a link type to take into account somethink similar to graphicspath, but you can easily define custom link types: For instance, put this in your org-file --8---cut here---start-8--- #+LINK: fig file:my_figure_path/%s --8---cut here---end---8--- Then you will be able to You write a link such as --8---cut here---start-8--- [[fig:some_figure.png]] --8---cut here---end---8--- ps: Remember to do C-c C-c in the #+LINK line after you insert it. -- Darlan Cavalcante Moreira darc...@gmail.com ndo...@gmail.com writes: Julien Cubizolles j.cubizol...@free.fr writes: Nick Dokos ndo...@gmail.com writes: Julien Cubizolles j.cubizol...@free.fr writes: * in LaTeX you can use \graphicspath to define the directories in which to look for picture files. Does org mode offer the same possibility ? No special mechanism afaik, but there is a general one. Did you try adding something like #+LATEX_HEADER: \graphicspath{{images/}} I wasn't clear enough in my question. I would like the links in orgmode made relative to a common root defined in the preamble. Ah, OK - I misunderstood. AFAIK, the answer is no.
Re: [O] Automatically adding local variables to tangled file
It's a good idea to have useful information in the tangled file that can help these functions. But since org-mode can already tangle with comments containing useful information, isn't this enough to detect that the file is a tangled file? On the other hand, a local variable in the tangled files to set the buffer to read-only could be very useful to avoid the mistake of editing the tangled files directly. -- Darlan At Wed, 05 Jun 2013 16:04:59 +0200, Rainer M Krug wrote: Hi I am trying to improve my workflow of literate programming of R in org. My org file is tangled into many R files and I am using ESS to debug. If an error occurs, I can jump via ESS to the .R file, and in a second step via calling org-babel-tangle-jump-to-org into the org file where the buggy line sits. Now this is error prone, as one (or is it only me?) is easily tempted to edit the R file which is reverted after the next tangle. So I was thinking: what about calling org-babel-tangle-jump-to-org directly from ESS. Vitalie Spinu looked into this option, and came up with the following suggestion: If the tangled .R file contains a local variable, one could easily identify that it is a tangled file and call org-babel-tangle-jump-to-org and would be at the line causing the error. Therefore my question: Would it be possible and reasonable, to add a local variable to each tangled file which identifies the file as an file tangled from an org mode file? He added the following to his config file to test the approach: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) |(put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | |(defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (basic-save-buffer)) | |(add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` and he also already added automatic redirection to the org mode file via org-babel-tangle-jump-to-org to ESS on SVN. To keep backwards compatibility, a variable org-babel-tangle-add-tangled-file-variable could be introduced, which can have the following values: - nil :: (default) do not add anything - t :: org-babel-tangled-file is added as t to the tangled files - name :: org-babel-tangled-file is set to the org file name - path :: org-babel-tangled-file is set to the path of the org file - all :: org-babel-tangled-file is set to the full name including path of the org file I can even imagine many more possibilities for the use of local file variables to store meta data in the tangled file (VCS info comes to mind, which would enable one to even go back to older revisions based on the tangled code rather easily). Cheers, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] Let's discuss citation and Org syntax
I prefer the [cite:citekey] syntax similar to [fn:number] for footnotes. But no matter which syntax is chosen I think we can easily make reftex work with it. All we need is to set the variable reftex-cite-format [1] to a string with the desired format. For the syntax [cite:citekey] the string would be [cite:%l]. [1] We probably need to make that a local variable in org-mode buffers so that the global value is kept on default for latex buffers. -- Darlan At Thu, 23 May 2013 10:05:37 +0200, Christian Moe wrote: Matt Price writes: On Wed, May 22, 2013 at 5:02 AM, Christian Moe m...@christianmoe.com wrote: I have a rough, working example of this enabling Zotero cites for ODT export (attached). Hi Christian, I'm really interested in this, as I use Zotero not only for writing but for group bibliographies in my courses. The broader conversation about the appropriate syntax is a bit beyond me, Hi, Matt, As the org-zotero-export.el shows, getting Zotero references from Org into ODT is pretty simple. That framework could be implemented whatever syntax we end up with to take care of the details. I'm interested in feedback on the syntax, though -- that is, on the way I'm using the description part of the link to convey various bits of information to Zotero. Is it worth pursuing, or would people prefer other ways of doing it? If worth pursuing, could it be improved? (1) How do you get the Zotero cite keys right now, and what method do you think would ultimately be the best to try for? The best to try for: Something with as brilliant an interface as RefTex... Since this thread is on citation syntax, I think I'll gather my thoughts about how to get there (zotero-plain? Zotero Server API? sqlite? word processor plugin emulation?), and about your other questions, and start another Zotero-related thread in a day or two. Right now: I'm still depending on Quick Copy with a custom Zotero translator. That is, I tab from Emacs to Firefox, look up a reference in the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the clipboard. Tab back to Emacs, yank the link, manually tweak the description as necessary. RefTex it ain't, and it's cumbersome for multiple citations, but it works. Yours, Christian
Re: [O] Tbl: precision for cells
If everything fail you can always process the table with babel to create a new table the way you like. You could add a function for that to the library of babel to have it always available. It is less convenient then a format specifier for the whole table as you want, but it is a very powerful and flexible way. -- Darlan At Sun, 19 May 2013 16:05:33 +0200, Suvayu Ali wrote: On Sun, May 19, 2013 at 06:11:03AM +0200, Manfred Lotz wrote: I know that I could add ;%.2f to each formula in the table. However, I would like to specify %.2f only one time for the whole table. The format specifier is per formula. I do not know of any way to have a per table format specifier, sorry. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] [babel] sbe not working properly
I have my own difficulties using sbe and decided to try your example. I even created the shell babel block below which does the same think as the python code #+NAME: epoch2dayshell(epoch=1) #+begin_src sh echo `date --d @$epoch -u +[%F %a %T]` #+end_src but I got the same result. Actually, I realize a small detail. In your example, when you evaluated the table formula you got as result the 1970 date. However, this does not mean that your python code was executed. You got that answer because you have evaluated the python code previously with the default argument (equal to 1) and thus you had #+RESULTS: epoch2day : [1970-01-01 Thu 00:00:01] in your file. If you erase the #+RESULTS and reevaluate the table you will get an ERROR. That indicates that sbe is not calling the babel block as I (and probably you too) was expecting. However, looking at sbe's documentation I can't see anything wrong with the formula you wrote. I'm still confused on how to correctly use sbe. -- Darlan At Thu, 11 Apr 2013 16:26:12 +0200, Karl Voit wrote: Hi! I want to define a babel function named epoch2day which I am able to use in a table to convert UNIX epoch times to Org-mode time stamps: #+NAME: epoch2day(epoch=1) #+BEGIN_SRC python :results output time = epoch import datetime strtime = str(time) datetimestamp = datetime.datetime.utcfromtimestamp(int(strtime[:10])) print datetimestamp.strftime('[%Y-%m-%d %a %H:%M:%S]') #+END_SRC #+RESULTS: epoch2day : [1970-01-01 Thu 00:00:01] ... this works so far. However, in a table I can't overwrite the default value with a column value: | epoch | day | |---+---| | 1262675465119 | [1970-01-01 Thu 00:00:01] | #+TBLFM: $2='(sbe epoch2day (epoch $1)) ... but $2 should be: [2010-01-05 Tue 07:11:05] On [1] I found another example: #+name: add1(x=1) :results silent #+begin_src python return x + 1 #+end_src #+RESULTS: add1 : 2 | foo | bar | 3 | 2 | #+TBLFM: @1$4='(sbe add1 (x $3)) #+CALL: add1(x=2) #+RESULTS: add1(x=2) : 2 So this simple example does not work either at my side[2]. What is my error? Or did I found a bug? Thanks! 1. http://stackoverflow.com/questions/9595310/org-babel-sbe-syntax 2. Org-mode 1af215bb4668bf3e778175e68fcaf from git -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: get Memacs from https://github.com/novoid/Memacs https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] Editing folded headlines and ellipses
At Tue, 12 Mar 2013 13:45:27 +0100, Bastien wrote: Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: That is another nice feature of org-mode I didn't know about. I just documented it in the manual, thanks! I set the variable to 'error now.. Any reason why nil is the default? IMO setting it to non-nil would be too intrusive for most users. That is true, but in this case I think it is a good thing, specially for new users. I have edited some invisible part by mistake in the past, but because I saw my mistake I could undo until the buffer was not marked as modified anymore (I save a lot, therefore this was enough). Nowadays I'm always careful to avoid this, but having org-mode do that for me gives me some piece of mind that I won't mess with my precious org-mode files by mistake.. In my case I don't think I'll ever need to edit invisible text by hand. The only time I edit invisible text is when performing some search and replacement in some region containing folded subtrees (or in the whole buffer), but this works even org-catch-invisible-edits is set to error, which is great for me. I don't know which option would be a better default, but I think nil is not the one (unless there is some performance loss I didn't see due to the check). -- Darlan -- Bastien
Re: [O] Repeated tasks, but only for a limited period (of time)
Instead of using a repeater you can clone the task. Just create the task the way you like it (with a schedule and a deadline) for the first day and then call 'M-x org-clone-subtree-with-time-shift'. Org-mode will ask you the number of clones it should create and the time shift. Just specify the time shift as '1d' and you are done. -- Darlan At Tue, 12 Mar 2013 11:06:30 -0400, Rick Hanson wrote: [1 text/plain; ISO-8859-1 (7bit)] Hi everyone, I've already RTFMed for this, but I still don't see how to do the following. Fact: I can add a repeater to a time stamp (like +1d) in org-mode so that a task shows up in my agenda as an every day item. Question: Can I restrict this repetition to, say, 1 week? For instance, I have a task I have to perform every day this week, /but only for this week/. So if I were to pull up my agenda for this week, I should see the task posted every day of this week, but if I then hit the f key to go forward a week, I should *not* see that task in this (the following) week. This is a not deal-breaker if not possible. I can just get rid if the task at the end of the week (but it's state, of course, that I have to keep in my mind, instead of committing it to the magic of org-mode). Thanks a lot of any help! (My apologies if it's in the manual and I missed it.) Best, --Rick [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] Editing folded headlines and ellipses
That is another nice feature of org-mode I didn't know about. I set the variable to 'error now.. Any reason why nil is the default? At Sun, 10 Mar 2013 10:57:15 +0100, Suvayu Ali wrote: Hi Bastien, On Sun, Mar 10, 2013 at 10:34:26AM +0100, Bastien wrote: Suvayu Ali fatkasuvayu+li...@gmail.com writes: I remember someone (maybe Bastien) putting in a safeguard quite sometime back that would unfold a headline with a warning when you tried to edit near the ellipses. This was to protect against accidental edits. I see this not there anymore, can we have it back? You mean `org-catch-invisible-edits'? It's still here... Ah, I missed it since I did not have that variable set. Thanks and sorry for the noise. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] [babel] Commenting out src blocks for tangling
I also converted my Emacs configuration to an org-mode file a long time ago and I hit the same spot you did. As you, I initially assumed (wished) that the COMMENT marker would disable tangling of blocks in that subtree. After that I found out the tangle property, which solves the problem but has no visual indication as you mentioned. Nowadays I use both approaches. Whenever I set the tangle property to no I also set the COMMENT mark and vice-verse. It is just a very minor annoyance to do both things and I'm used to it now. -- Darlan At Wed, 27 Feb 2013 19:32:41 +, Eric S Fraga wrote: Alan L Tyree alanty...@gmail.com writes: [...] G'day Eric, If I understand your problem correctly, doesn't the property :tangle: do what you want? Yes, thanks; Aaron Ecay has also pointed out to me. It works and does exactly what I said I needed. And you have both been very polite :-) -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1285-g6cc600
Re: [O] How to use org-capture with dynamic ID targets?
It works! Thanks Eric. The backquote plus ',' did the job. I now understand why my previous attempts didn't work and I can imagine what would be necessary to implement the feature I requested (not worth it). -- Darlan At Tue, 29 Jan 2013 13:26:05 +0800, Eric Abrahamsen wrote: Darlan Cavalcante Moreira darc...@gmail.com writes: At Thu, 24 Jan 2013 20:01:47 +0100, Bastien wrote: Did you tried this? (setq org-capture-templates `((f The template description table-line (id ,some_variable) this is the template content :table-line-pos II-1 :immediate-finish t))) This is something I'll have to keep in mind. However, I don't expect this to be a problem since I start Emacs everyday. It is enough for me if I can set the ID to a variable (before setting org-capture-templates) and it uses the variable value as the ID, instead of trying to interpret the variable name as the ID. In fact, even if I ever need to change the variable value after org-capture-templates was set I'm fine by just reevaluating (setq org-capture-templates ...) again so that it sees the new value. Exactly. Simple using the value of whatever list object I put there. Be it a variable value or a function that provides the. I'm fine if the value provided by a variable or a function is only read when org-capture-templates is set. My lisp knowledge is very limited to what I have seen in my Emacs initialization (and a lot of trying and error). But I have never seen @ used in lisp nor I know what terms to search for it.. All this above is pretty much exactly what you're looking for. Check out the Backquote section of the elisp manual for a pretty good introduction. If you quote using a backtick (`) rather than an apostrophe ('), you can use the comma (,) later on to evaluate variable values, see the example at top. I don't believe you need the @ here, but the manual section I mentioned explains it. I used to do this in my agenda commands, but it wasn't really practical because of the only evaluate once problem. If you restart emacs every day, that won't really be an issue for you. E
Re: [O] How to use org-capture with dynamic ID targets?
At Thu, 24 Jan 2013 20:01:47 +0100, Bastien wrote: Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: everything works as expected and a table in the headline with ID someIDstring is used. However, if I try (f The template description table-line (id some_variable) this is the template content :table-line-pos II-1 :immediate-finish t) Can you provide the full (setq org-capture-templates ...) s-expression? Hi Bastien, First I created an org-mode file with the following content to act as the target. --8---cut here---start-8--- * Test table :PROPERTIES: :ID: MyTestID :END: | | Nome | Valor | |---++---| | | something | 12.00 | | | something else | 23.45 | |---++---| | # | Total | 35.45 | #+TBLFM: @4$3=vsum(@2..@-1);%.2f --8---cut here---end---8--- The capture template is something as simple as --8---cut here---start-8--- (setq org-capture-templates '( (f Add a new product and value) (ff Table table-line (id MyTestID) || %^{Product} | %^{Value} | :table-line-pos II-1 :immediate-finish t))) --8---cut here---end---8--- This works as expected, but for my use case each month the target should be a different table (which I create with a different ID). Obviously manually changing the capture template each month is error prone and easy to forget. Therefore, tried to change the ID to a function providing the new target or a variable. For instance the code below. --8---cut here---start-8--- (setq myIDVar MyTestID) (setq org-capture-templates '( (f Add a new product and value) (ff Table table-line (id myIDVar) || %^{Product} | %^{Value} | :table-line-pos II-1 :immediate-finish t))) --8---cut here---end---8--- When I try to capture with this second template Emacs complains that it cannot find the target ID myIDVar. What I expected is that it would search for the ID MyTestID that is the value of myIDVar and not for an ID myIDVar I have also tried the code below and it does not work either --8---cut here---start-8--- (defun some-function-return-the-id () DOCSTRING (interactive) MyTestID) (setq org-capture-templates '( (f Add a new product and value) (ff Table table-line (id (some-function-return-the-id)) || %^{Product} | %^{Value} | :table-line-pos II-1 :immediate-finish t))) --8---cut here---end---8--- Did you tried this? (setq org-capture-templates `((f The template description table-line (id ,some_variable) this is the template content :table-line-pos II-1 :immediate-finish t))) then it does not work even if some_variable or (some_function) provides the correct ID value. It seems that (id something) will always interpret something as a string (no matter if I put it inside quotes or not). Yes, it expects a string. Is it possible to achieve what I want with the current org-capture implementation? See above. The problem being, of course, that the capture template for f will use some_variable *statically* -- if the value of the some_variable variable changed after you evaluated the s-expression (setq org-capture-templates ...) then the new value will not be known. This is something I'll have to keep in mind. However, I don't expect this to be a problem since I start Emacs everyday. It is enough for me if I can set the ID to a variable (before setting org-capture-templates) and it uses the variable value as the ID, instead of trying to interpret the variable name as the ID. In fact, even if I ever need to change the variable value after org-capture-templates was set I'm fine by just reevaluating (setq org-capture-templates ...) again so that it sees the new value. If not, consider this as a feature request. What feature exactly? To allow a function here that would dynamically set the id? Exactly. Simple using the value of whatever list object I put there. Be it a variable value or a function that provides the. I'm fine if the value provided by a variable or a function is only read when org-capture-templates is set. The reason behind this is that each month I want a different target table for this capture template and I already implemented a function that returns the correct ID. If I can somehow make the ID target type use the return value of this function then this capture template will use the correct table each month. If not, I would be forced to manually change the capture template in the beginning of each month
Re: [O] Using Org/babel for Emacs config files (was: OT: Learning ELISP)
I also have my Emacs configuration in org mode and it is really great. Before moving to an org-mode initialization file I had multiple elisp files and the main initialization file loaded the individual files. But having everything in one place with the outline and search powers of org-modemuch better. You can even put todos there if you want. There are many benefits of using tags in your initialization. You can, for instance, put a Keybinds tag in all headlines that change some keybindings. You can put a Flymake tag in all headlines configuring flymake for the different programming languages you use. If you need to locate the flymake configuration specific for python, for instance, all that is necessary is to do a tag search for the Flymake and Python tags. Note that Emacs does not evaluate your initialization org-mode file directly. It tangles all elisp blocks in that file to an elisp file and then load that elisp file as usual. The tangling can be slow if you have many blocks, but it only does that once after editing the org-mode file. Therefore, you don't get a performance hit by having your initialization in an org-mode file. You can also take advantage of this tangle process. For instance, I have a Themes headline where each child headline configures Emacs with a different theme. I set the TANGLE property of all of these headlines to no except one. Then Emacs will use that theme. You can easily enable/disable big parts of your configuration like this and I find it easier then commenting and uncommenting different parts of an elisp file. For visual feedback, I like to add the COMMENT keyword in the headlines where I have set the TANGLE property to no. -- Darlan At Wed, 23 Jan 2013 15:40:35 +0100, Karl Voit wrote: Hi! * Jonathan Arkell jonath...@criticalmass.com wrote: I am a huge advocate of using org files and literate programming in your config files. Great. I am not completely convinced to convert my config to org/babel but I am not oppose either. Not sure, if there are that many advantages, that it is worth my effort, that's all. A few reasons why: - Makes it easy to logically group sections of your init and configuration Well, this is also possible with pure elisp and comments. Folding is a different topic tough. - Agenda tags search on your initialization file? Yes please! Extremely useful for those cross-cutting bits. I have tags like keybinding, osx and linux, and working on others as appropriate. Hm. Interesting but I guess this is not my use-case (except for :keybinding:). I do use (when (system-is-linux) ... ) and similar all over my configuration. Although I am a huge fan of tagging, I don't see the use when editing my emacs config (yet). - Add TODOs to your init file. I am using ~/org/mainfile.org - * shorts - ** TODO do this :hostname: all the time. Also for my config tasks. No worries: I do see your point but I like to have all my sysadmin-tasks combined in mainfile.org/shorts. So maybe this is just me. Here is my example, but I stand on the shoulders of giants: https://github.com/jonnay/emagicians-starter-kit Thanks for sharing! One thing which I would appreciate would be that it is more easy to write documentation (including URLs; outside of elisp sections) in org. Naive question: Are there any performance issues with not being able to compile my config.org to config.elc as it is possible with config.el files? -- Karl Voit
[O] How to use org-capture with dynamic ID targets?
I'm trying to set-up some org-capture templates using the ID target type. However, I need the ID to be determined either as the return value of a function or as the value of a variable. When I use a template such as --8---cut here---start-8--- (f The template description table-line (id someIDstring) this is the template content :table-line-pos II-1 :immediate-finish t) --8---cut here---end---8--- everything works as expected and a table in the headline with ID someIDstring is used. However, if I try --8---cut here---start-8--- (f The template description table-line (id some_variable) this is the template content :table-line-pos II-1 :immediate-finish t) --8---cut here---end---8--- or --8---cut here---start-8--- (f The template description table-line (id (some_function)) this is the template content :table-line-pos II-1 :immediate-finish t) --8---cut here---end---8--- then it does not work even if some_variable or (some_function) provides the correct ID value. It seems that (id something) will always interpret something as a string (no matter if I put it inside quotes or not). Is it possible to achieve what I want with the current org-capture implementation? If not, consider this as a feature request. The reason behind this is that each month I want a different target table for this capture template and I already implemented a function that returns the correct ID. If I can somehow make the ID target type use the return value of this function then this capture template will use the correct table each month. If not, I would be forced to manually change the capture template in the beginning of each month (something I will definitely forget). -- Darlan
Re: [O] Fixes for org-capture-templates-contexts
By a great coincidence I just discovered org-capture-templates-contexts yesterday but could not make it work yet (didn't have much time to investigate it). Is it possible to have capture templates that do not appear in any buffer but can be called from lisp? The idea is that I'm implementing some org-capture templates right now that I only intend to call via (org-capture nil 'some letter') and never via C-c c. Maybe today is my luck day and it is exactly this new not-in-buffer context you have just added? ps: this rule affecting all sub-templates will also be very userful. -- Darlan At Thu, 10 Jan 2013 21:04:54 + (UTC), Paul Sexton wrote: org-capture-templates-contexts currently appears not to work. The structure that the function 'org-contextualize-validate-key' expects to find in the variable seems quite different from the structure described in the docstring. Here are fixed versions of the functions 'org-contextualize-validate-key' and 'org-contextualize-keys', both from org.el. I have also added some functionality: - new context specifiers in-buffer and not-in-buffer - in-mode and not-in-mode expect a symbol, not a regexp. - if a rule specifies a template that has 'sub-templates', those sub-templates will also be affected by the rule. For example if you have templates 't', 'ta', 'tb' and 'tc', you can specify a rule for 't' which will affect all of them. I have also rewritten the docstring for org-capture-templates-contexts, from org-capture.el. (defcustom org-capture-templates-contexts nil Alist of capture templates and valid contexts. Each entry in the alist takes the form: (KEY [USUAL-KEY] CONTEXT [CONTEXT...]) Where: KEY :: a string of one or more letters, identifying a capture template. USUAL-KEY :: if supplied, this is the string that identifies the capture template in `org-capture-templates', while KEY becomes the string which will be used to select the template only in the present context (see below). CONTEXT :: a context definition. Each context definition (CONTEXT) takes the form: FUNCTION or (SPECIFIER . ARGUMENT) Where: FUNCTION :: either a lambda form or a symbol naming a function. The function must take no arguments. SPECIFIER :: a symbol matching one of the context specifiers listed below. ARGUMENT :: either a string regular expression (for in-file and in-buffer), or a symbol (for in-mode). Here are the available context specifiers: in-file: command displayed in files matching regex in-buffer: command displayed in buffers matching regex in-mode: command displayed if major mode matches symbol not-in-file: command not displayed in files matching regex not-in-buffer: command not displayed in buffers matching regex not-in-mode: command not displayed when major mode matches symbol For example, if you have a capture template \c\ and you want this template to be accessible only from `message-mode' buffers, use this: '((\c\ (in-mode . message-mode))) If you include several context definitions, the agenda command will be accessible if at least one of them is valid. If the template specified by KEY has sub-templates, they will also be affected by the rule (unless they have their own rules). For example, if you have a template `t' and sub-templates `ta', `tb' and `tc', then a rule for `t' will affect whether all of those contexts are accessible. You can also bind a key to another agenda custom command depending on contextual rules. '((\c\ \d\ (in-file . \\\.el$\) (in-buffer \scratch\))) Here it means: in files ending in `.el' and in buffers whose name contains `scratch', use \c\ as the key for the capture template otherwise associated with \d\. \(The template originally associated with \q\ is not displayed to avoid duplicates.) :version 24.3 :group 'org-capture :type '(repeat (list :tag Rule (string :tag Capture key) (string :tag Replace by template) (repeat :tag Available when (choice (cons :tag Condition (choice (const :tag In file in-file) (const :tag Not in file not-in-file) (const :tag In mode in-mode) (const :tag Not in mode not-in-mode)) (regexp)) (function :tag Custom function)) (defun org-contextualize-validate-key (key contexts) Check CONTEXTS for agenda or capture KEY. (let (clause context res) (while (setq clause (pop contexts)) (destructuring-bind (context-key old-key . context-list) clause (mapc (lambda (context)
Re: [O] How to add content from a file to a table automatically
Thank you Eric and Jambunathan for your answers. If I process the whole table with babel to manually add the lines from the external file than I would have to take care of updating the formula for the Total value as well as making sure the new content was added before the Total line, right?. The later is simple, but updating the formula could be complicated. Meanwhile, I'm investigating using org-capture for this. For instance, if I use a template such as #+begin_src emacs-lisp (f test table-line (file+headline test.org Test table) (file path/food.org) :table-line-pos II-1 :immediate-finish t) #+end_src where the food.org file has a single line then I can capture with #+begin_src emacs-lisp (org-capture nil f)' #+end_src and org-capture will place the content from the food.org file in a table in the Test Table headline of the test.org file. The advantage of using org-capture instead of pure babel is that it will already put the content in the correct place and update the formulas. However, the formulas are updated correctly only if I capture a single line each time. I think a combination of babel with org-capture is my best option. Once that is working I will use your timer approach for automating this (while I investigate inotify suggested by Jambunathan). -- Darlan At Wed, 09 Jan 2013 22:10:37 -0700, Eric Schulte wrote: #+Title: Periodically Rerun a Code Block Here's the lisp code to define a function to continually re-run a code block. Evaluate the following code block, then =M-x continually-run=, press ENTER and then type in the name of the code block to continually run (in this case date). #+begin_src emacs-lisp :results silent (defvar continual-runners nil Holds running block timers (so they may be canceled).) (defun run-block-in-buffer (name buffer) (save-match-data (with-current-buffer buffer (save-excursion (org-babel-goto-named-src-block name) (with-local-quit (undo-boundary) (with-temp-message (format re-running %s name) (org-babel-execute-src-block)) (undo-boundary)) (defun continually-run (name) Continually run the supplied code block name. The code block is assumed to be in the current buffer. (interactive scode block to continually run: ) (let ((run-buffer (current-buffer))) (add-to-list 'continual-runners (run-at-time nil 5 'run-block-in-buffer name run-buffer #+end_src Here's the code block to be continually re-run. #+Name: date #+begin_src sh date #+end_src And here are the results which will be continually updated. #+RESULTS: date : Wed Jan 9 22:04:08 MST 2013 Execute the following to stop all continually updating code blocks. #+begin_src emacs-lisp :results silent (mapc #'cancel-timer continual-runners) #+end_src
[O] How to add content from a file to a table automatically
Is there a way to detect when a file changes and then add the content from it (if any, the file could be empty) to a specified org-mode table? Each line in that file is already constructed in a way that it could be copied and pasted to the table directly (but I can change that if it makes things easier). For instance, suppose I have the table below --8---cut here---start-8--- #+TBLNAME: FoodJanuary2013 | | *Place* | *Date* | *Debit (R$)* | *Credit (R$)* | |---+---+--+--+---| | | Some name | [2013-01-07 Seg] | 0.00 | 10.00 | |---+---+--+--+---| | # | | *Total* | 0.00 | 10.00 | #+TBLFM: @3$4=vsum(@2..@-1);%.2f::@3$5=vsum(@2..@-1);%.2f --8---cut here---end---8--- and a file food.txt that was modified externally (Dropbox sync) and now has the content below --8---cut here---start-8--- | # | place name | [2013-01-08 Ter] | 0.00 | 12.50 | | # | other place | [2013-01-09 Qua] | 9.30 | 0.00 | --8---cut here---end---8--- I'd like the table to be automatically updated to include these two new lines so that it should now corresponds to --8---cut here---start-8--- #+TBLNAME: FoodJanuary2013 | | *Place* | *Date* | *Debit (R$)* | *Credit (R$)* | |---+-+--+--+---| | | Some name | [2013-01-09 Qua] | 0.00 | 10.00 | | # | place name | [2013-01-08 Ter] | 0.00 | 12.50 | | # | other place | [2013-01-09 Qua] | 9.30 | 0.00 | |---+-+--+--+---| | # | | *Total* | 9.30 | 22.50 | #+TBLFM: @5$4=vsum(@2..@-1);%.2f::@5$5=vsum(@2..@-1);%.2f --8---cut here---end---8--- Adapting the formula as org-mode would automatically do if I typed enter twice before the last hline is important, but updating the total value is not (although nice), since I can do that with C-u C-u C-c * later when I actually see the table. After that the content of the file should be erased to prevent future additions of the same information. Any hints on how to do the different parts for this are welcome. -- Darlan Ps: I use the latest org-mode and Emacs versions (from git and bzr, respectively) in a Linux box. The motivation for all this is that I use org-mode tables to control my expenses, but I want to be able to add new expenses from my android phone. Using the tasker app (REALLY good) I could create a simple UI to add the expense to a file that will be synced using Dropbox (one file for each category, which corresponds to a different table). All of this is working and now I the next step is the one described in this e-mail.
Re: [O] monthly budget with year summary using tables
The templates I mentioned is not an org-mode feature. I use the excellent yasnippets for that. In my case, I created a finanças file (finances in Portuguese) in the ~/.emacs.d/snippets/org-mode/ folder (my main snippets folder). Then, in my main org-mode file I put the cursor in the proper place, type finanças and press TAB. The template is expanded and I can start adding whatever I want. Because the template is in the org-mode sub-folder of may snippets folder, it will only expand in org-mode buffers. The only caveat is that since my template includes table formulas, which have $, I have to escape these with a backslash because the $ symbols has a special meaning in yasnippets templates. Also, in order to get the current month and year (used to create unique names for the tables as well as IDs for each category headline) I have the following elisp functions in my Emacs configuration file --8---cut here---start-8--- (defun get-current-year() (interactive) (format-time-string %Y (current-time)) ) (defun get-current-month() (interactive) (capitalize (format-time-string %B (current-time))) ) --8---cut here---end---8--- I'll put the whole yasnippets template at the end of this e-mail but org-mode provides us with such a high flexibility that each person has its own taste on how thinks should be organized. Maybe you should first create the org-mode structure for this the way you want and then turn it into a template for easily replication. It will take a couple or trial and error to get it right, but you will fell at home with it. -- Darlan The template is included below --8---cut here---start-8--- # -*- mode: snippet -*- #name : finaças # contributor: Darlan Cavalcante Moreira # -- * ${1:`(get-current-month)`} ${2:`(get-current-year)`}$0 *** Alimentação :PROPERTIES: :ID: $1$2Alimentação :END: Gastos com Alimentação em dinheiro ou em conta corrente. Não inclui gastos com alimentação no cartão de crédito. #+TBLNAME: Alimentacao$1$2 | | *Local* | *Data* | *Débito (R\$)* | *Cartão (R\$)* | |---+-+-+---+---| | | Nada| | 0.00 | 0.00 | |---+-+-+---+---| | # | | *Total* | 0.00 | 0.00 | #+TBLFM: @3\$4=vsum(@2..@-1);%.2f::@3\$5=vsum(@2..@-1);%.2f *** Pagamento de contas :PROPERTIES: :ID: $1$2Contas :END: Aqui entram fatura do cartão do mês passado, plano de saúde, Ateneu, etc.. #+TBLNAME: Contas$1$2 | | *Conta* | *Data* | *Débito (R\$)* | *Cartão (R\$)* | |---+---++---+---| | | GEAP || 0.00 | 0.00 | | | Celular || 0.00 | 0.00 | | | Ateneu|| 0.00 | 0.00 | | | Fatura Cartão || | x | |---+---++---+---| | # | *Total* || 0.00 | 0.00 | #+TBLFM: @6\$4=vsum(@2\$4..@-1);%.2f::@6\$5=vsum(@2\$5..@-2);%.2f *** Entretenimento :PROPERTIES: :ID: $1$2Entretenimento :END: #+TBLNAME: Entretenimento$1$2 | | *Tipo de Gasto* | *Data* | *Débito (R\$)* | *Cartão (R\$)* | |---+-++---+---| | | Entretenimento || 0.00 | 0.00 | |---+-++---+---| | # | *Total* || 0.00 | 0.00 | #+TBLFM: @3\$4=vsum(@2..@-1);%.2f::@3\$5=vsum(@2..@-1);%.2f *** Carro e Transporte :PROPERTIES: :ID: $1$2Carro :END: #+TBLNAME: Carro$1$2 | | *Tipo de Gasto* | *Data* | *Débito(R\$)* | *Cartão (R\$)* | |---+-++--+---| | | Gasolina|| 0.00 | 0.00 | | | Taxi|| 0.00 | 0.00 | |---+-++--+---| | # | *Total* || 0.00 | 0.00 | #+TBLFM: @4\$4=vsum(@2..@-1);%.2f::@4\$5=vsum(@2..@-1);%.2f *** Diversos :PROPERTIES: :ID: $1$2Diversos :END: Gastos diversos #+TBLNAME: Diversos$1$2 | | *Tipo de Gasto* | *Data* | *Débito (R\$)* | *Cartão (R\$)* | |---+-++---+---| | | Nada|| 0.00 | 0.00
Re: [O] monthly budget with year summary using tables
A have a setup similar to the one you ask, using tables, but I don't need babel for that. Basically, I have a Finances headline in my main org file, whose children are years headlines. In the beginning of each month I create a new headline for that month in the current year using a template so that I have something similar to * Finances ... * 2013 * January * Food * Bills * Entertainment * Car and transportation * Misc * Total Each of the category has a table where I put the expenses for that category and each table computes its total value. For instance, the table in the Food category is something like #+TBLNAME: FoodJanuary2013 | | *Place*| *Date* | *Debit (R$)* | *Card (R$)* | |---++--+--+-| | | Some place | [2013-01-03 Qui] |10.00 |0.00 | |---++--+--+-| | # || *Total* |10.00 |0.00 | #+TBLFM: @3$4=vsum(@2..@-1);%.2f::@3$5=vsum(@2..@-1);%.2f where I add the expense either to the Debit column (when I pay with cash or my debit card) or to the Card column (when I pay with the credit card). Notice that the table has a unique name with the category, month and year (all of this is created automatically with a template). In the Total category I have a table that uses remote references to get the total value of each category. This table gives me a glimpse of my expenses so far (I can even plot it to see how much I spent in each category, for instance, this is a good use of babel). This table is similar to #+TBLNAME: ExpensesJanuary2013 | | *Category* | *Debit (R$)* | *Card (R$)* | |---++---+---| | # | Entertainment | | | | # | Bills | | | | # | Food | | | | # | Car and transportation | | | | # | Misc | | | |---++---+---| | # | *Total*| | | | # | Total + Credit | | | #+TBLFM: @2$3=remote(EntertainimentJaneiro2013,$LR4);%.2f::@2$4=remote(EntertainimentJaneiro2013,$LR5);%.2f::@3$3=remote(BillsJaneiro2013,$LR4);%.2f::@3$4=remote(BillsJaneiro2013,$LR5);%.2f::@4$3=remote(FoodJaneiro2013,$LR4);%.2f::@4$4=remote(FoodJaneiro2013,$LR5);%.2f::@5$3=remote(CarJaneiro2013,$LR4);%.2f::@5$4=remote(CarJaneiro2013,$LR5);%.2f::@6$3=remote(MiscJaneiro2013,$LR4);%.2f::@6$4=remote(MiscJaneiro2013,$LR5);%.2f::@7$3=vsum(@2..@-1);%.2f::@7$4=vsum(@2..@-1);%.2f::@8$3=@-1$3+@-1$4;%.2f In the end, org can do what you want the way you want. -- Darlan At Wed, 2 Jan 2013 14:21:12 -0500, Carl Bolduc wrote: I would like to move my budget from MS Excel to Org-Mode. I currently have one Excel sheet per month with all the transactions as well as a summary sheet that uses sumif functions. Assuming the following format for the monthly table: #+tblname: january | date | transaction | amount | category | |--+-++---| | 01 | iga | 50 | groceries | | 01 | echo| 30 | car | | 02 | iga | 47 | groceries | How can I get the following summary table? | category | january | february | |---+-+--| | groceries | 97 | | | car | 30 | | I found this post on the mailing list that suggest to use babel: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg22736.html However, I need help to understand how I can put the resulting sums inside the summary table. Thanks, Carl
Re: [O] How to customize the heading definition in org-mode
At Sat, 10 Nov 2012 07:58:40 -0800, David Rogers wrote: But for this specific need (organizing the Emacs configuration with org-mode), there is really no need for changing the headline definition. You instead change your Emacs configuration to 'real' org-mode files with the actual configuration inside Emacs-lisp src blocks. This is much more powerful. As Memnon Anon mentioned, you only need a minimal configuration in your init.el file and the rest can go all in one or more org files that you load with org-babel-load-file. I have converted my configuration to an org-mode file a good time ago and I can tell you it is VERY worth the time invested. You can benefit from all org-mode features. What org-babel-load-file does is tangling all of the Emacs-lisp src blocks (only emacs-lisp blocks) to an Emacs lisp file and then load that file. The org-babel-load-file function is smart enough to only tangle the org file if something has changed. Therefore the delay caused by the tangle process only happens when you change something. A bonus side effect of this tangling process is that you can disable a whole part of your Emacs configuration easily simple by setting the 'TANGLE' property of a headline containing the source blocks you want to disable to 'no'. -- Darlan On Sat, 10 Nov 2012 10:38:41 + (UTC) Memnon Anon gegendosenflei...@googlemail.com wrote: Avner Moshkovitz avnermoshkov...@lighthausvci.com writes: I looked for an equivalent to this in org-mode but couldn't find a way to customize the heading definition. Is there a way to do so? AFAIK, the * is a fixed part of the org syntax and is not customizable. Yes, there was a discussion here not so long ago - the result of the discussion was (and I'm only paraphrasing) It's true there is no way to change it, and we're intentionally keeping it that way to prevent needless complexity in org-mode. -- David
Re: [O] Header Jumping
You can also pass C-u two times to go to the last refiled/captured headline, that is, C-u C-u C-c C-w and C-u C-u C-c c. At Thu, 25 Oct 2012 00:02:22 +1100, tony day wrote: Esben Stien b...@esben-stien.name writes: Is there some way to go directly to a node? F.ex, I have: * foo ** bar.. ** baz.. ** hukarz.. I do C-c a s to search for baz, which brings up a buffer with baz somewhere in there and I have to move down the list to hit TAB on baz. Whoever crafted org-refile thought ahead. C-u C-c C-w selects and jumps to the header selected rather than doing a refiling. Just played around with that and =bookmark-set= and it works nicely with norang settings eg #+begin_src emacs-lisp ; Targets include this file and any file contributing to the agenda - up to 4 levels deep (setq org-refile-targets (quote ((nil :maxlevel . 2) (org-agenda-files :maxlevel . 2 ; Use full outline paths for refile targets - we file directly with IDO (setq org-refile-use-outline-path t) ; Targets complete directly with IDO (setq org-outline-path-complete-in-steps nil) ; Allow refile to create parent tasks with confirmation (setq org-refile-allow-creating-parent-nodes (quote confirm)) ; every header is a refile target (setq org-refile-target-verify-function nil) ; use IDO (setq org-completion-use-ido t) (defun org-jump () (interactive) (bookmark-set org-jumped-from) (org-refile t nil nil Jump) (bookmark-set org-jumped-to)) (defun org-jump-back() (interactive) (if (equal (point) (bookmark-get-position org-jumped-from)) (bookmark-jump org-jumped-to) (if (bookmark-get-position org-jumped-to) (bookmark-jump org-jumped-from (bind-key C-. j 'org-jump) (bind-key C-. l 'org-jump-back) #+end_src tony
Re: [O] Sagemath with org-babel?
I have done this in the past, I don't have the files anymore. However, as Tom says it is very easy to modify the templates to make org work with sage. I remember I only needed some search and replace to make it work. Also, you may want to have a look at sage-mode first if you haven't already. http://wiki.sagemath.org/sage-mode With sage mode installed its is a simple matter to make C-c ' edit the source code in sage-mode. -- Darlan At Mon, 06 Aug 2012 11:33:47 -1000, t...@tsdye.com (Thomas S. Dye) wrote: Aloha Johan, Babel can be configured to support new languages, see http://orgmode.org/worg/org-contrib/babel/languages.html#develop Someone will need to write language specific functions to support code block evaluation in sage. There is a template for this. The functions written for other languages provide good examples of what the sage-specific functions might look like. hth, Tom Johan Ekh ekh.jo...@gmail.com writes: Hi all, sage is not listed under languages that can be used with org-babel. But it is based on Python, is it possible to use it with org-babel? /Johan Sent from my iPad -- Thomas S. Dye http://www.tsdye.com
Re: [O] How to turn off font-lock-mode per file
Add a file local variable. M-x add-file-local-variable Write mode for the variable and font-lock-mode for its value (without quotes). I tested this and it worked. -- Darlan At Wed, 27 Jun 2012 09:01:52 -0700 (PDT), Enda enda...@yahoo.com wrote: [1 text/plain; us-ascii (7bit)] How do you turn off font-lock-mode per file (an org file)? Best wishes, Enda [2 text/html; us-ascii (7bit)]
Re: [O] Searching linked files
See the variable org-agenda-text-search-extra-files. It seems to be exactly what you want. -- Darlan Cavalcante At Wed, 20 Jun 2012 09:16:49 -0400, Marvin Doyley marvin...@gmail.com wrote: Hi there, Does anybody now how to search the content of a linked file ? I have a master file that is included in org-agenda file list. This file contains links to other research project related org files. Unfortunately, is seems that only way to search the content of the link file is to include it in the agenda file list, ideally I prefer not to do this. To illustrate the problem, lets say I have a file myfile.org, which is included in the list of org agenda files. myfile.org contains the following * Apples * Pears * [[file:~/test.org][Farmers]] Similarly, test.org contains * Jack - Cheapest supplier of Apples - Deliver * Joe - Pear supplies and other vegetables * Bill - Potential supplier Lets say I want to do a keyword search for vegetables, I would hit C-a s. The problem is that unless I include test.org in the agenda file list, it doesn't work. I appreciate any help or suggestion. Cheers M
Re: [O] Ido org-refile results in misfiling
One thing that may help is using C-space to lock previous matches with ido completion. For instance, you start ido completion (does not matter in which context: buffers, files, functions, etc) and start typing This will give you a bunch of matches. Then use C-space to lock these matches and it is like starting ido completion again but limited to whatever matched the previous typing. Using this method when you have many matches is usually much easier then trying to find what you want in a single pass. -- Darlan At Thu, 31 May 2012 19:51:36 -0700, Samuel Wales samolog...@gmail.com wrote: Ido and org-refile are a superb combination that enhances Org significantly. It is a killer feature IMO. However, in my usage there is a substantial risk of misfiling: 1) If I start from a fresh Emacs, myorg is sufficient to select computer/emacs/org/myorg/. This is good. 2) If I refile something to computer/emacs/org/myorg/strategy and examples/various todo kw and maybe some tags/, various is enough to select it. Note that this is below myorg. Also good. 3) (Just as an aside, if I then refile something else to the same entry, I don't even need to enter various. It is the default. A nice feature.) 4) Now suppose I want to refile something to myorg. I enter myorg but I get various. Detail on this subtle issue is below: === My expectation is that if myorg selects myorg once, it should always do so no matter what my refile history is. This expectation is violated. It violates a sort of referential transparency. The same narrowing inputs should produce the same narrowed outputs (in my expectation at least). I suspect that the reason for the unexpected behavior is related (in some way) to the defaulting in 3, which is useful. However, the false defaulting in 4 is NOT useful in any obvious way. === Proposed solution: I think that as soon as the user starts selecting something, the default should be discarded. === With my expectation, it is never necessary to check the offered olpaths except as a confirmation. With the current behavior, checking is always necessary because in edge cases, there will be a guaranteed misfile. Here is why: the only reason that default showed up at all is that the narrowing input /happened/ to match both headlines. Otherwise the default would have been discarded. So it is an edge case that allowed the offer to misfile. In other cases, the correct default would be provided. If I wanted various, RET would be sufficient. User checking is significantly more error-prone because one olpath is a substring of the other. Likewise, the requirement to navigate in the list is burdensome as 4 is never useful as far as I can tell. === Is there any way to fix this? I tried looking at ido customizations and got lost. If you can't reproduce witn your ido settings, I'll try to provide an MCE at some point. Might take a while though. Thanks. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com
Re: [O] Agenda view with bibliographic references
What if you manually set the category property of each reference to a short title for the reference? The category appears in the agenda and you can use it as a sort strategy. -- Darlan At Mon, 14 May 2012 09:42:23 +0200, G. Martin Butz b...@sym.net wrote: Hallo to all, as I have quite a few bibliographic references scattered around several files, I build myself a custom agenda view, gathering all references (tagged with bib) using the column view. (setq org-agenda-custom-commands '((l Literaturliste tags Bib ((org-agenda-remove-tags t) (org-agenda-overriding-columns-format %80ITEM %20FILE) (org-agenda-view-columns-initially t)) (org-agenda-sorting-strategy '(alpha-up)) (org-agenda-compact-blocks t)) )) I wonder, if it is possible to get an alphabetically sorted list of all entries without having them displayed filewise. Right now my agenda view displayes the entries like: a_item | x.org m_item | x.org b_item | y.org n_item | y.org aso. What I would like is the following a_item | x.org b_item | y.org m_item | x.org n_item | y.org aso. Or - if this is not possible - can I at least show a short version of the file name (like in the ordinary agenda view)? Right now the column file displays the full file path which I do not need. Can anybody help? Many thanks in advance Martin -- | G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
Re: [O] Inline LaTeX fragments in emacs buffer
I don't think breaking the equation into multiple lines is supported by org. It may work but it is not guaranteed. I write the whole equation as a single line and I don't have any problems, besides the equation being harder to read and modify later. Ps: I have the same use case scenario: writing notes with equations when I watch the classes of the coursera courses. I also write the relevant equation in a comment in the MATLAB/Octave when implementing the programming exercises. -- Darlan At Mon, 14 May 2012 17:52:11 +0300, Dov Grobgeld dov.grobg...@gmail.com wrote: I got it. Org-mode erroneously interpreted the + sign on the second row as a list token. Rearranging the latex text so that it does not start with - or + is a workaround. On Mon, May 14, 2012 at 5:47 PM, Dov Grobgeld dov.grobg...@gmail.comwrote: Thanks for the help. It makes my coursera ml-class notes easier to read. One issue I had when I tried exporting to HTML with the dvnpng option the following equation: \[ J(\theta) = - \frac{1}{m} \left[\sum_{i=1} ^m y^{(i)} \log h_\theta(x^{(i)})+(1-y^{(i)})\log(1-h_\theta(x^{(i)}))\right] + \frac{\lambda}{2m}\sum_{j=1} ^n \theta_j ^2 \] in the png output I got the following trailing text:ORG-LIST-END-MARKER . Is this a known bug? Regards, Dov On Sun, May 13, 2012 at 8:55 PM, Darlan Cavalcante Moreira darc...@gmail.com wrote: org-preview-latex-fragment is really great but what is even better is that it also works outside org-mode! This makes my life a lot easier. I set C-c P as a global key-binding for org-preview-latex-fragment and C-c p to org-ctrl-c-ctrl-c. Then I can preview equations all equations in ANY buffer with C-u C-u C-c P. It's great to write equations in comments of some programming buffer (no matter which programming language) and being able to render the equations right there. -- Darlan At Sun, 13 May 2012 00:46:51 +0200, Daimrod daim...@gmail.com wrote: Dov Grobgeld dov.grobg...@gmail.com writes: Is there any way of getting org-mode to display inline LaTeX fragments in the emacs buffer? E.g. I would like to be able to type: The size of the hypotenuse is $\sqrt{a^2+b^2}$ and then the buffer immediately shows: The size of the hypotenuse is √a²+b² where √a²+b² is a png image rendered via dvipng. I assume a toggle would switch between either seeing the formula or seeing the source of the formula, just like for the display of inline images. Also, pressing a backspace when the cursor is at the end of the formula should erase the trailing $ sign, and turn off image display of the formula, just like for [[links][name]]. Has anything like this been implemented? Thanks! Dov Yes, you can produce a preview image with C-c C-x C-l. See (info (org) Previewing LaTeX fragments) and (info (org) Embedded LaTeX)
Re: [O] Inline LaTeX fragments in emacs buffer
org-preview-latex-fragment is really great but what is even better is that it also works outside org-mode! This makes my life a lot easier. I set C-c P as a global key-binding for org-preview-latex-fragment and C-c p to org-ctrl-c-ctrl-c. Then I can preview equations all equations in ANY buffer with C-u C-u C-c P. It's great to write equations in comments of some programming buffer (no matter which programming language) and being able to render the equations right there. -- Darlan At Sun, 13 May 2012 00:46:51 +0200, Daimrod daim...@gmail.com wrote: Dov Grobgeld dov.grobg...@gmail.com writes: Is there any way of getting org-mode to display inline LaTeX fragments in the emacs buffer? E.g. I would like to be able to type: The size of the hypotenuse is $\sqrt{a^2+b^2}$ and then the buffer immediately shows: The size of the hypotenuse is √a²+b² where √a²+b² is a png image rendered via dvipng. I assume a toggle would switch between either seeing the formula or seeing the source of the formula, just like for the display of inline images. Also, pressing a backspace when the cursor is at the end of the formula should erase the trailing $ sign, and turn off image display of the formula, just like for [[links][name]]. Has anything like this been implemented? Thanks! Dov Yes, you can produce a preview image with C-c C-x C-l. See (info (org) Previewing LaTeX fragments) and (info (org) Embedded LaTeX)
Re: [O] export image generated by python code.
Remember that when you execute the code via C-c C-c it is run in a temporary file which is not in the same folder as the org file from where it was generated from. Maybe you are reading some data from a file and Python is not able to locate the file when run with C-c C-c. Put :results output in the header and then print the current working directory to see what I mean. If this is the problem, use the full path to load any data you need in the python code. Remember you can use variables in org-babel to pass this path to python, such as :var datapath=some_path_or_lisp_function_to_get_the_path in the babel header.. -- Darlan At Mon, 30 Apr 2012 15:54:34 +0200, Khoroshyy Petro khoros...@gmail.com wrote: Hi all. After some struggle, I can see inline pictures in my org file. The problem was python execution. If I execure the code in python-mode shell, it generates a picture. I the code executed via C-c C-c, the output picture file is empty. I still do not know how to solve it. And I have encountered another problem. The 'result' image is not exported, even if I add play with :export option. Any recommendations how to solve those? Thanks Petro #+BEGIN_SRC python :file estimated_spectra_cl.png import pylab from scipy import optimize import numpy as np import pylab as plt . plt.figure() plt.plot(spectra[:,0],spectra[:,1:]) plt.grid(1) # plt.show() plt.savefig(estimated_spectra_cl.png,dpi=100) #+END_SRC #+RESULTS: [[file:estimated_spectra_cl.png]]
Re: [O] Simplify repeated same section with different variable value
If you like the call method (which is the best one IMHO) you can also add the foo function to the library of babel. In this way you will be able to call it from any org file without having to put the definition of the foo function in each of them. -- Darlan At Tue, 24 Apr 2012 10:44:27 -0400, Nick Dokos nicholas.do...@hp.com wrote: Rainer M Krug r.m.k...@gmail.com wrote: On 24/04/12 14:36, Myles English wrote: On Tue, 24 Apr 2012 14:22:48 +0200, Rainer M Krug said: Hi I have a section which I want to repeat for different variable values. At the moment I am copying them, but I do not like it at all: ** Species one :PROPERTIES: :var: SPECIES=sp1 :END: *** Data Checks Here is some text #+header: :results output #+begin_src R checkData(species=SPECIES) #+end_src ** Species 2 :PROPERTIES: :var: SPECIES=sp2 :END: *** Data Checks Here is some text #+header: :results output #+begin_src R checkData(species=SPECIES) #+end_src I am sure there must be an easier way with org? How about using yasnippet? Yasnippets would help in filling the file with the repeated code - but if I want to change e.g. some text to some more text, I still have to do it manually. Nevertheless, if I could define the org section once and repeat it with different variable values, this would enable me to change it only once. Use the #+call mechanism: --8---cut here---start-8--- * subroutine #+name: foo #+BEGIN_SRC elisp :var x=1 (* x x) #+END_SRC * call #+call: foo(4) #+RESULTS: foo(4) : 16 * call #+call: foo(5) #+RESULTS: foo(5) : 25 --8---cut here---end---8--- Nick
Re: [O] [odt] Export of LaTeX Fragments
Since org already accepts \SomeCommandName, maybe org-mode could provide some very basic functionality for the user to provide definitions for these macros for each (desired) output format. For instance, there could be a list similar to #+begin_src emacs-lisp ( (somecommand :html 'somecommand-html-export :latex ; somecommand-latex-export :buffer 'somecommand-buffer-change) (someothercomand :html someothercomand-html-export) ) #+end_src The export function definitions should be provided by the user for each desired export format and any unspecified format should do what org-mode does right now. The buffer format would be a function for changing the way the command (and its argument) look in the org-buffer. I'm no lisp programmer and this is probably no the best way to implement this feature, but I think this flexibility could allow orgers to tweak org-mode to their needs easily. -- Darlan At Mon, 23 Apr 2012 17:08:13 +0200, Bastien b...@altern.org wrote: Torsten Wagner torsten.wag...@gmail.com writes: However, whats with \, \mbox{} \noindent and maybe some others? They helped me to tweak the formatting at some points where the standard stuff did not make much sense. There commands are meaningful in a TeX context, and there is not necessary a precise translation of their meanings in other contexts like ODT documents. In Org file, it is better to stick to Org syntax -- even if some flexibility is allowed with \noindent and friends while converting to LaTeX. -- Bastien
Re: [O] Auto tag based on buffer contents?
I don't think there exist an autotag feature, but you can use template expansions [1] to put the sender's name as a tag in the headline. For instance, you could use the template expansions %:from, %:fromname or %:fromaddress. But I don't know how this will play if you also use the template expansion that prompt for tags. [1] http://orgmode.org/manual/Template-expansion.html#Template-expansion -- Darlan
Re: [O] org-wikinodes - find files in a specific directory
Maybe a custom link type is enough for this. You can define a 'wiki' link type with #+LINK: wiki ~/Wiki_folder/%s and then use [[wiki:something.org][description]] -- Darlan At Fri, 13 Apr 2012 12:23:12 -0500, Marcelo de Moraes Serpa celose...@gmail.com wrote: [1 text/plain; ISO-8859-1 (7bit)] Also, I just found out org-wikinodes can't use filenames as basic data units. It'd be nice if it could. Would it be too hard to support such feature? Most of my wiki files do not start with a headlines of the same name, for example. On Fri, Apr 13, 2012 at 12:19 PM, Marcelo de Moraes Serpa celose...@gmail.com wrote: Hi guys, Is it possible to setup wikinodes to find files in a specific directory (rather than current file or current directory)? It'd also be nice if we could have a way to specify a list of directories. My org filesystem layout follows a particular convention where wiki-like (reference) files are kept in a directory of its own, but there are some exceptions to this rule - files in other dirs that I'd like wikinodes to take into consideration. Thanks! - Marcelo. [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] org-mode as an accountability system?
Also, if you have anything in your agenda that you don't want to send to him you can use tags to restrict what is shown in the agenda before you copy/export it. -- Darlan At Sun, 4 Mar 2012 14:08:40 + (UTC), Memnon Anon gegendosenflei...@googlemail.com wrote: Hi Peter, Peter Salazar cycleofs...@gmail.com writes: My committed actions for a day consist of: a) TODOs for the projects I'm working on b) random errands that need to be done that day c) daily habits (e.g. meditating, exercising) I don't believe org-agenda can support me in doing this, because I require: a) a way to quickly enter the random tasks for that day (without having to schedule each one for today) b) more importantly: a way to record, store, and e-mail my list of which tasks I've done and not done at the end of the night I am not sure why you don't use the agenda, there really should be no need to compile this data manually. Flow: - Enter your task with capture. This *is* a quick way, and you should be able to setup a binding that schedules the new task to today by default. Put the tasks wherever they should live in your org cosmos. - At the beginning of the day, start your agenda for today. Copy and paste it, export it to html, whatever. Send it to your college. - Work through your tasks. If you can't finish a task, don't mark it didnotdo, but simple reschedule it for tomorrow; the change will be reflected in your log drawer. - At the end of the day, or early next day, start the agenda and use org-agenda-log-mode, probably with C-u. - `C-u l' should show you all there is, given it is properly configured: Task you finished, tasks you did not finish and hence rescheduled for later, even your sections (teaching, habits, random tasks) can be reflected with categories. Just copy and paste it in your email and you are done. Macro question: Is there a better way to manage my accountability system, rather than doing it manually? Again, I don't see a way to do it using agenda. hth Memnon
Re: [O] Buffer-wide header arguments
Remember to also press C-c C-c in the property line after writing it. -- Darlan At Fri, 10 Feb 2012 11:35:06 -1000, t...@tsdye.com (Thomas S. Dye) wrote: Peng Zhang pczh...@gmail.com writes: Dear all, I have followed the manual and put #+PROPERTY: session *R* #+PROPERTY: exports none at the beginning of the document. However, it does not have any effects? Could somebody instruct me how to debug and see what goes wrong? Thanks! I am running Arch linux with emacs-23.4 and org-mode 7.8.03 Best, Peng Aloha Peng, Please try this (note the colon with :session and :exports) #+PROPERTY: :session *R* #+PROPERTY: :exports none hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-remember - org-capture: % functionality
I don't know if such a feature exists for the capture template, but after you captured an item you can use C-u C-u C-c c (supposing C-c c is your key-binding for org-capture) to go to the captured item location. The same feature exists for refiled notes. I use this a lot and I find it more useful then specifying this behaviour in the capture template. -- Darlan At Fri, 03 Feb 2012 16:32:56 +0100, Martin Pohlack m...@os.inf.tu-dresden.de wrote: Hi, org-remember templates could contain a % to jump to target location immediately after storing note. I can't find a similar thing for org-capture. Is there a trick / official way to achieve a similar effect with org-capture? I like to tweak some entry in their context after capturing. Thanks, Martin
Re: [O] Including an active timestamp in encrypted (crypt) org entries
Org encrypts everything inside a heading with the chosen tag. It does not try to be smart and decide what should and what should not be encrypted inside that heading. Putting the time-stamp in the headline as suggested by others should work, since org uses that information and the heading itself is not encrypted. Another solution is to put the information that must be encrypted inside a subheading and encrypt only the subheading. This way you can have all the usual org data (schedule, deadline timestamps, lognotes, etc) in the main heading and profit from the org power while all your sensitive data is still encrypted. -- Darlan
Re: [O] file name prefix in agenda view
You can change how the items appear in the agenda views by changing the org-agenda-prefix-format variable to your liking. It is easier to change the default value to remove the category. -- Darlan Cavalcante Moreira
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
Unless I have missed something in the e-mails, the new syntax is to concatenate new variables to the var property. Not modifying the values currently stored in some variable. That is, #+property: var foo=2 #+property: var+ 5 (not specifying the variable name ) should not be allowed and #+property: var foo=2 #+property: var+ foo=5 #+property: var+ bar=bar should result in foo=5 and bar=bar. Is modifying a variable also a new feature? -- Darlan At Tue, 8 Nov 2011 11:06:48 +0100, Rainer M Krug r.m.k...@gmail.com wrote: [1 text/plain; ISO-8859-1 (7bit)] On Tue, Nov 8, 2011 at 10:58 AM, Sebastien Vauban wxhgmqzgw...@spammotel.com wrote: Hi Rainer, Rainer M Krug wrote: * appending to a file-wide property :PROPERTIES: :var+: , baz=3 :END: To be honest, the only thing that I dislike is the comma in the above line. Not intuitive at all. Quite hard to read. Can't the comma be implicitly added by the `+' after the property name? On the one hand, it might have one additional advantage: #+property: var foo=This is a very long text #+property: var+ with even more. I don't think such a construction would be tolerated. I guess you must write a var name (foo, bar, baz, ...) after the `var+' keyword. Would foo be: This is a very long text with even more To be accurate, it would have become: This is a very long textwith even more if such a concatenation would be implied. Correct - missing space. Could one make the , implicit, if the value follows the x=y style, while otherwise just concatenate the value to the one before? I guess this is going too far, as Babel is untyped: what about... #+property: var foo=2 #+property: var+ 5 Does foo become equal to 25? (I know I exaggerate somehow, but just to show I guess such extensions are simply not possible without explicit types). You definitely have a point here - so I opt for the implicit , Cheers, Rainer But, if not equal to 25, what would be expected? An error, ...? Best regards, Seb -- Sebastien Vauban -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
I liked this suggestion. In a sense, it is similar to the inherit keyword I had suggested before, but now the keyword (the plus sign) is part of the variable name. But the reason I really liked it is because it is clear to understand. One can compare it to the += operator some languages have. That is, we can understand `:var: bar=2` as var=bar=2 and `:var+: bar=2` as var+=bar=2.` -- Darlan At Fri, 4 Nov 2011 09:02:43 +0100, Rainer M Krug r.m.k...@gmail.com wrote: On Thu, Nov 3, 2011 at 9:23 PM, Eric Schulte schulte.e...@gmail.com wrote: One more idea that has occurred to me, it should give all of the functionality which we desire (i.e., the ability for a property value to span multiple lines and to be accumulated at the subtree level), and it should require *no* new syntax. The only problem is it puts a limitation on possible property names -- namely that they can not end with the + character. The proposal is, when a property name ends in +, the value is appended to the corresponding property, rather than replacing it, so #+PROPERTY: var foo=1 #+PROPERTY: var bar=2 results in '((var . bar=2)) #+PROPERTY: varfoo=1 #+PROPERTY: var+ , bar=2 results in '((var . foo=1, bar=2)) This way subtree properties could be used as well, e.g., #+PROPERTY: var foo=1 * subtree :PROPERTIES: :var+: bar=2 :CUSTOM_ID: something :END: Just another thought. I like that suggestion - it is clear, easy to understand, gives other advantages (you can unset variables in a subtree - which would be an added bonus) and does not require any large changes in org files. This suggestion would get my vote. Cheers, Rainer Best -- Eric Eric Schulte schulte.e...@gmail.com writes: I don't understand why the `org-accumulated-properties-alist' solution seems like a hack, could someone elaborate. To me that still feels like the most natural solution. more below... 2) Cumulative properties? Here is a suggestion: use a syntaxe like #+var: foo 1 There is also #+bind:, whose purpose is close enough. Indeed. Eric, would it be possible to use #+bind foo 1 instead of #+property var foo=1 No, this would not for subtree-level properties, i.e., in a property block under a subtree there would be no way to tell if a property is a #+var:. I think if this were an approach, a more elegant solution would be for users to customize the `org-babel-default-header-args' variable using Emacs' file-local-variable feature -- which is possible now and may end up being the best solution. 3) Wrapping/folding long #+xxx lines? This is an independant request -- see Robert McIntyre's recent question on the list. The problem is that fill-paragraph on long #+xxx lines breaks the line into comment lines, which is wrong. Filling like this: #+TBLFM: @3$1=@1$1+@2$1::@3$2=@1$2+@2$2::...::... : @3$2=@1$2+@2$2::... : @3$2=@1$2+@2$2::... #+tblfm: ... #+tblfm: ... #+tblfm: ... Not very elegant, but perhaps more efficient/consistent. I like this solution, especially as I have often struggled with long and unreadable tblfm lines. The problem with using this for property lines would be in the case of #+property: foo bar #+property: baz qux whether the above should be parsed as '((foo . bar) (baz . qux)) or '((foo . bar baz qux)) But maybe generalizing the #+begin_xxx syntax for *all* #+xxx keywords. This would make the current org-internals-oriented/content-oriented difference between #+xxx and #+begin_xxx obsolete I suggest to avoid such a thing. Here are a few, more or less valid, reasons: - That distinction is useful for the user (clear separation between contents and Org control). - It would penalize usage of special blocks. - The need is localized to very few keywords: it isn't worth the added complexity. - It would be ugly: no more nice stacking of keywords, but a mix of blocks and keywords, and blocks on top of blocks... Org syntax may not be the prettiest ever, it doesn't deserve that. - It would be a real pain to parse. Well, I agree with most of the reasons. Glad you stated them clearly. Yes, I agree some of the above are very motivating. but this would spare us the cost of new syntax. On the contrary, creating a block for each keyword would mean a lot of new syntax. We currently have 8 types of blocks (not counting dynamic blocks, whose syntax is a bit different), all requiring to be parsed differently: 1. Center blocks, 2. Comment blocks, 3. Example blocks, 4. Export blocks, 5. Quote blocks, 6. Special blocks, 7. Src blocks, 8. Verse
Re: [O] Feature Request: Disable auto-insert-mode exporting
Thanks Carsten, That's great. I tested without the advice it worked as expected for both exporters. I would be surprised if anyone could give a reason to keep the AUCTeX query or the auto-insert stuff, at least without modifying org-export. That's because the export process replaces anything in the new buffer, be it the file variables inserted by AUCTeX or the content inserted by auto-insert, with the result from the export. -- Darlan At Fri, 28 Oct 2011 10:43:00 +0200, Carsten Dominik carsten.domi...@gmail.com wrote: On 28.10.2011, at 06:49, Darlan Cavalcante Moreira wrote: Thanks Nick, You right, the master file question comes from auctex. But with your code it's simple to add the relevant variable to solve the issue. The final function is --8---cut here---start-8--- (defadvice org-export (around org-export-no-auto-insert) (let ((auto-insert nil) (TeX-master t) ) ad-do-it)) Ahh, that has been bothering me for many years, thanks for this solution. I have made this behavior (as well as turning off auto-insert) now standard in Org-mode, so the advice will no longer be needed. Or, can anyone come up with a reason why the AUCTeX query or auto-insert stuff could be useful when creating new files during Org-mode export? - Carsten (ad-activate 'org-export) --8---cut here---end---8--- -- Darlan At Thu, 27 Oct 2011 17:03:55 -0400, Nick Dokos nicholas.do...@hp.com wrote: Darlan Cavalcante Moreira darc...@gmail.com wrote: I consider auto-insert-mode to be a very useful feature in Emacs and it works great in most situations, except when exporting an org-mode buffer. If I export to PDF or HTML, for instance, then org-mode creates a TeX or an HTML buffer and auto-insert kicks-in in both cases (asking for the title in the HTML buffer, or the master file in the TeX buffer). Whatever I write will be overwritten by the org-mode exporter and the file exports just fine, but this interruption is annoying. I don't think the master file question comes from auto-insert - I believe it comes from auctex. In particular, I get the question but I don't have auto-insert enabled for latex. I suppose I could create a function that disable auto-insert-mode, call org-export and then re-enable auto-insert-mode, but maybe this should be the default behaviour of org-mode export. Does this make sense? You can advise org-export: (defadvice org-export (around org-export-no-auto-insert) (let ((auto-insert nil)) ad-do-it)) (ad-activate 'org-export) should do it (untested). Nick
[O] Feature Request: Disable auto-insert-mode exporting
I consider auto-insert-mode to be a very useful feature in Emacs and it works great in most situations, except when exporting an org-mode buffer. If I export to PDF or HTML, for instance, then org-mode creates a TeX or an HTML buffer and auto-insert kicks-in in both cases (asking for the title in the HTML buffer, or the master file in the TeX buffer). Whatever I write will be overwritten by the org-mode exporter and the file exports just fine, but this interruption is annoying. I suppose I could create a function that disable auto-insert-mode, call org-export and then re-enable auto-insert-mode, but maybe this should be the default behaviour of org-mode export. Does this make sense? -- Darlan
Re: [O] Feature Request: Disable auto-insert-mode exporting
Thanks Nick, You right, the master file question comes from auctex. But with your code it's simple to add the relevant variable to solve the issue. The final function is --8---cut here---start-8--- (defadvice org-export (around org-export-no-auto-insert) (let ((auto-insert nil) (TeX-master t) ) ad-do-it)) (ad-activate 'org-export) --8---cut here---end---8--- -- Darlan At Thu, 27 Oct 2011 17:03:55 -0400, Nick Dokos nicholas.do...@hp.com wrote: Darlan Cavalcante Moreira darc...@gmail.com wrote: I consider auto-insert-mode to be a very useful feature in Emacs and it works great in most situations, except when exporting an org-mode buffer. If I export to PDF or HTML, for instance, then org-mode creates a TeX or an HTML buffer and auto-insert kicks-in in both cases (asking for the title in the HTML buffer, or the master file in the TeX buffer). Whatever I write will be overwritten by the org-mode exporter and the file exports just fine, but this interruption is annoying. I don't think the master file question comes from auto-insert - I believe it comes from auctex. In particular, I get the question but I don't have auto-insert enabled for latex. I suppose I could create a function that disable auto-insert-mode, call org-export and then re-enable auto-insert-mode, but maybe this should be the default behaviour of org-mode export. Does this make sense? You can advise org-export: (defadvice org-export (around org-export-no-auto-insert) (let ((auto-insert nil)) ad-do-it)) (ad-activate 'org-export) should do it (untested). Nick
Re: [O] Bind an agenda filter to a global shortcut
You can do this (and more) with the custom agenda views [1]. [1] http://orgmode.org/manual/Custom-agenda-views.html#Custom-agenda-views -- Darlan At Wed, 26 Oct 2011 12:13:52 -0500, Marcelo de Moraes Serpa celose...@gmail.com wrote: [1 text/plain; ISO-8859-1 (7bit)] Hi list, So, I'd like to bind a specific agenda filter to a simple one-key shortcut, maybe one of the function keys. This might be an easy think to do, but I'm not sure how. How could I trigger an agenda filter action directly through elisp (without needing to go to the agenda view and use the shortcut I made?) so that I can bind it straight to a global shortcut? Thanks, Marcelo. [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] [RFC] Standardized code block keywords
Does org have TAB completion in call lines for names of blocks that can be called? Using srcname for blocks of code could make things easier but if this is not the case then I name is just fine. -- Darlan At Mon, 24 Oct 2011 08:37:13 +0100, Eric S Fraga e.fr...@ucl.ac.uk wrote: Daniel Bausch danielbau...@gmx.de writes: Hi, named code blocks [1] -- source srcname function calling external functions [2] -- call lob named data [3] -- tblname resname results data what about #+name: for [1] and [3], and #+call: for [2] ? That a table or list contains data is obvious. The only thing, the additional line is for, is to name it. That a source block contains source is also obvious and is already noted by the use of #+begin_src, so why duplicate the src-part? Daniel I don't know if I've left it too late to vote on this but... I would go for name for [1] and [3] and call for [2]. I can, however, see the need for distinguishing between data tables and results so could be convinced that data and results should be used for [3]. In any case, I do know that I dislike srcname and tblname... -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1 : using Org-mode version 7.7 (release_7.7.452.g767f5)
Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines
I didn't check the list for 3 days and this thread became a little hard to follow. So, forgive me if I'm answering the wrong E-Mail. I liked Christian's idea of using a single var property to tell babel which regular properties it should use as variables (ignoring any variable not defined). This would be enough for my use cases. On the other hand, some way to append values to a property, such as using some special keyword as I have suggested, could be a better solution in order to keep consistence if people want this feature for non-babel related properties. -- Darlan At Sat, 22 Oct 2011 09:53:25 -0600, Eric Schulte wrote: Darlan Cavalcante Moreira darc...@gmail.com writes: It's excellent that now babel understands multiple values in the var property (I was one of the people that wanted this), but There Is One More Thing. Would it be feasible to inherit variables from parent sub-trees? Effectively, I'd like to append new values in lower level sub-trees, but AFAIK setting the var property in a sub-tree will still replace the value set in the parent sub-tree. Currently every new property specification entirely replaced previous specifications with the same name. That is, in the example below the level-2 sub-trees would not have the foo variable passed to babel. * Code with foo :PROPERTIES: :var: foo=1 :END: ** Code only with bar :PROPERTIES: :var: bar=2 :END: src_block ** Code only with baz :PROPERTIES: :var: baz=3 :END: src_block Maybe a special keyword, such as inherit (or append) could be used to incorporate variables defined in the parent sub-tree, such that the example would become * Code with foo :PROPERTIES: :var: foo=1 :END: ** Code with foo and bar :PROPERTIES: :var: bar=2, inherit :END: src_block ** Code with foo and baz :PROPERTIES: :var: baz=3, inherit :END: src_block This should not affect global variables and inherit would inherit variables defined only in the parent sub-tree (unless it also contains the inherit keyword). As a use case scenario, suppose I need to perform simulations for a few different scenarios, each with small variations. This would allow me to define common variables for a scenario in a higher level sub-tree and more specific variables in the lower level sub-trees. This sounds somewhat similar to my suggestion in reply to Rainer's email. Best -- Eric -- Darlan Cavalcante At Fri, 21 Oct 2011 22:24:25 +0200, Christian Moe m...@christianmoe.com wrote: Hi, Yes, that works nicely, and should solve Rainer's problem. I haven't been able to think of anything else that can't be handled by properties. And I do think it's a good idea to winnow down the syntax a bit, even if things break. I just like to grumble. :-) Yours, Christian On 10/21/11 7:37 PM, Eric Schulte wrote: Nice idea. This same issue with var arose when we first started allowing header arguments to be specified inside subtree properties. I've just implemented your suggestion so the following are now possible. #+PROPERTY: var foo=1, bar=2 #+PROPERTY: cache yes #+begin_src emacs-lisp (+ foo bar) #+end_src #+results[be32e67491d4e92f75769aebe423c20ca01626fe]: : 3 and #+begin_src emacs-lisp :var foo=this, bar=that (concat foo bar) #+end_src #+results[3cde077efa81f1ca24a62ac264dbd5776b6e0054]: : this that Thanks for the suggestion and I hope the above is a sufficient replacement for the now-missing #+BABEL: syntax. Cheers -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Org-mode Standardized Code Block Keywords
With many people making suggestions and voting It can be a lot of work for someone to collect all of the votes. In fact, I was going to suggest using Doodle for this (http://www.doodle.com/), but Chris was faster with the google moderator. Anyway, if the final result is sent to the list, including who voted in what, then we would not depend on the external link to know why the decision was made. -- Darlan At Fri, 21 Oct 2011 11:47:42 -0700, Chris Malone chris.m.mal...@gmail.com wrote: Hi Jambunathan, That is a good point, but I wanted to make the option available. Ignore the Google moderator link if you'd rather the discussion stay on the mailing list. I planned on sending the results to the mailing list, perhaps tomorrow, anyhow. Chris On Oct 21, 2011, at 11:43 AM, Jambunathan K wrote: chris.m.mal...@gmail.com writes: I've invited you to be an owner of the Google Moderator series Org-mode Standardized Code Block Keywords. You can view and edit this series at http://www.google.com/moderator/#16/e=ffe1e I generally feel sad whenever some posts a blob via imgur or pastebin. It takes content offline. I know gnu.org mailing list will be there for me. Can you assure me whether that link will continue to work say 5 or 10 years from now when someone wants to do a post-mortem on why certain decisions were made. I would be happy if everyone sticks to the gnu mailing list. --
Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines
It's excellent that now babel understands multiple values in the var property (I was one of the people that wanted this), but There Is One More Thing. Would it be feasible to inherit variables from parent sub-trees? Effectively, I'd like to append new values in lower level sub-trees, but AFAIK setting the var property in a sub-tree will still replace the value set in the parent sub-tree. That is, in the example below the level-2 sub-trees would not have the foo variable passed to babel. --8---cut here---start-8--- * Code with foo :PROPERTIES: :var: foo=1 :END: ** Code only with bar :PROPERTIES: :var: bar=2 :END: src_block ** Code only with baz :PROPERTIES: :var: baz=3 :END: src_block --8---cut here---end---8--- Maybe a special keyword, such as inherit (or append) could be used to incorporate variables defined in the parent sub-tree, such that the example would become --8---cut here---start-8--- * Code with foo :PROPERTIES: :var: foo=1 :END: ** Code with foo and bar :PROPERTIES: :var: bar=2, inherit :END: src_block ** Code with foo and baz :PROPERTIES: :var: baz=3, inherit :END: src_block --8---cut here---end---8--- This should not affect global variables and inherit would inherit variables defined only in the parent sub-tree (unless it also contains the inherit keyword). As a use case scenario, suppose I need to perform simulations for a few different scenarios, each with small variations. This would allow me to define common variables for a scenario in a higher level sub-tree and more specific variables in the lower level sub-trees. -- Darlan Cavalcante At Fri, 21 Oct 2011 22:24:25 +0200, Christian Moe m...@christianmoe.com wrote: Hi, Yes, that works nicely, and should solve Rainer's problem. I haven't been able to think of anything else that can't be handled by properties. And I do think it's a good idea to winnow down the syntax a bit, even if things break. I just like to grumble. :-) Yours, Christian On 10/21/11 7:37 PM, Eric Schulte wrote: Nice idea. This same issue with var arose when we first started allowing header arguments to be specified inside subtree properties. I've just implemented your suggestion so the following are now possible. #+PROPERTY: var foo=1, bar=2 #+PROPERTY: cache yes #+begin_src emacs-lisp (+ foo bar) #+end_src #+results[be32e67491d4e92f75769aebe423c20ca01626fe]: : 3 and #+begin_src emacs-lisp :var foo=this, bar=that (concat foo bar) #+end_src #+results[3cde077efa81f1ca24a62ac264dbd5776b6e0054]: : this that Thanks for the suggestion and I hope the above is a sufficient replacement for the now-missing #+BABEL: syntax. Cheers -- Eric
Re: [O] [babel] create tikz pictures in an floating LaTeX environment
I have a (very) small personal wiki in org mode where I add stuff that I read/learn that deserve this work. I usually don't need to export it, but recently I was trying to export it to PDF and HTML and I had the same doubt with a block o tikz code. It would be nice if org had a begin_tikz block. This block could either create a PDF file or include the tikz code directly in the latex file when exporting to latex (or PDF), and create an SVG file when when exporting to HTML. Of course this block should accept all the usual image options, such as caption and width. This is just a feature request from a tikz lover. -- Darlan At Fri, 07 Oct 2011 09:14:20 -0600, Eric Schulte wrote: Nick Dokos nicholas.do...@hp.com writes: Torsten Wagner torsten.wag...@gmail.com wrote: Hi all, Hi Eric (hehehe because most likely you read it ;) ) I try for the first time to write an entire article in org-mode. I do so, because with the tags :export: :noexport: I can easily keep my personal notes and todos hidden and the final export will be just what I want to publish. Furthermore, I'm interested to do my data evaluation in python blocks within the org-file itself, keeping all nicely together. At the moment I try to add a tikz picture to the manuscript. I followed the example at http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html However, I have some problems. I can generate the picture by using the following code. #+srcname: mypicture #+begin_src latex :file fig/mypicture.pdf :packages '(( tikz)) :border 1em :fit \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] \draw[fill=red!50] (0,0) rectangle ++(5,1); \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); \end{scope} \end{tikzpicture} #+end_src Now, I want to include this in a floating figure environment This troubles me a bit. I tried to make a second latex src block which includes the environment and an \includegraphic pointing to the generated pdf file. However, I always find a link of the filename in addtion. I guess this is the result of the first (above) source code block. The pdf contains a line similar like [[file:fig/mypicture.pdf ]] ``:results output silent'' should suppress that I think. Nick's solution should work well. Also, (if you're exporting to LaTeX) couldn't you just combine the tikz picture and the wrapping figure environment into a single begin_latex block? Best -- Eric Nick I switched over to use the org-mode way of including a figure and replaced the latex second src code block by #+CAPTION:my great picture #+LABEL: fig:my_picture #+ATTR_LaTeX: [[file:fig/mypicture.pdf]] This worked out too and was identically to the fist approach, however, there was still the result line in the output. I tried to add exports: none and volia the line was gone. However, the source code block was not exported at all and hence the picture not updated at all (it simply used the old generated pdf) I tried to be ueber-smart and replaced the static link [[file:fig/mypicture.pdf]] by #+call: mypicture in the hope it would be executed and result in [[file:fig/mypicture.pdf]] finally getting the same like with the static link. However, this did not work out at all. No figure. Could someone help me to sort this out. Ideally, I would like to do a rather logical combination and end up with the following: #+CAPTION:my great picture #+LABEL: fig:my_picture #+ATTR_LaTeX: #+srcname: mypicture #+begin_src latex :file fig/mypicture.pdf :packages '(( tikz)) :border 1em :fit \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2] \draw[fill=red!50] (0,0) rectangle ++(5,1); \draw[fill=yellow!50] (1,1) rectangle ++(1,0.25); \draw[fill=yellow!50] (3,1) rectangle ++(1,0.25); \draw[fill=green!50] (0.75,1) rectangle ++(1.5,-0.4); \draw[fill=green!50] (2.75,1) rectangle ++(1.5,-0.4); \end{scope} \end{tikzpicture} #+end_src avoiding to call/type the filename/link over and over again. Thanks for helping Torsten -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] different hoisting in two panes
The clone-indirect-buffer function is from Emacs and Org-mode created a specialized function, org-tree-to-indirect-buffer, that just makes creating an indirect buffer narrowed to a subtree easier. Indirect buffers may be useful for much more then just visibility cycling. You can use a different major mode in each buffer, narrow to different regions, etc.. If you are, for instance, inserting an org-mode table in a latex document (see [1]) you might want to clone the buffer, change one of them to org-mode and narrow to the table. Then you can edit the table normally and alternate with editing the latex document as you want. [1] - http://orgmode.org/manual/A-LaTeX-example.html -- Darlan At Tue, 27 Sep 2011 19:55:19 +0800, Joseph Buchignani joseph.buchign...@gmail.com wrote: [1 text/plain; ISO-8859-1 (7bit)] Awesome, thanks. This makes Org-Mode truly a two pane outliner. Actually it's three pane I guess, since it includes metadata. Yeah... 3 pane, the agenda view would be a pane. I would suggest adding this command to the documentation for Org-Mode under the outlining section somewhere. I've been using Emacs for years as a non-techie and never came across it. For writers it's only really useful for visibility cycling of outlines, so they're not likely to come across it elsewhere. On Mon, Sep 26, 2011 at 11:25 PM, suvayu ali fatkasuvayu+li...@gmail.comwrote: On Mon, Sep 26, 2011 at 4:53 PM, Nick Dokos nicholas.do...@hp.com wrote: Sure you can - check out Indirect buffers in the Emacs manual. C-c C-x b -- Suvayu Open source is the future. It sets us free. -- Ignore the following. It is a nonsense sentence that disables Google ads from displaying next to my emails by triggering sensitive keywords. I enjoy the massacre of ads. This sentence will slaughter ads without a messy bloodbath. [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] Per-file attachment directories
One way to do this is to use file variables to change the value of org-attach-directory. This works particularly well when you use just a few org files as in your case. For instance, you could put --8---cut here---start-8--- # Local Variables: # org-attach-directory: ~/org/data/personal # End: --8---cut here---end---8--- in your personal.org file and --8---cut here---start-8--- # Local Variables: # org-attach-directory: ~/org/data/work # End: --8---cut here---end---8--- in your work.org file. -- Darlan Cavalcante Moreira At Wed, 21 Sep 2011 11:49:39 +0200, Viktor Rosenfeld listuse...@googlemail.com wrote: Hi everybody, so far I've only used one org file, but it's getting unwieldy and I've decided to split it up. I'd also like to split up my attachment directory to reduce clutter. For example, if I have two org files personal.org and work.org I would like attachments to go into automatically created directories below ~/org/data/personal and ~/org/data/work. If a file has no custom attachment directory specified, attachments should be created below a default path (same as now). Is this possible? Thanks, Viktor
Re: [O] Per-file attachment directories
I tested here and it didn't work for the bad files as you said. However, putting the Local Variables at the end of the file worked. In fact, I have always written local variables like this at the end of the file, although I don't remember if this was because of a restriction of just because I'm used to. A good tip is to put them inside a * File Local Variables heading so that they don't stay inside another heading. You can set the noexport tag to avoid exporting this heading. Also, you can use the function add-file-local-variable to add a new local variable. Notice how this function put the local variables at the end of the file. -- Darlan Cavalcante Moreira At Wed, 21 Sep 2011 20:29:25 +0200, Viktor Rosenfeld listuse...@googlemail.com wrote: Hi, this works for simple files but breaks silently for my org files. I've narrowed it down to two seemingly unrelated parts and attached two examples below. - good1.org contains an entry with two tables. When I visit the file, Emacs asks me to evaluate the local variable. In bad1.org the first table contains another section with the entry Rechnungsbeitrag. When I visit the file, Emacs does not ask me and I can verify that the local variable is not evaluated by attaching something to the task. - In bad2.org the offending part is a long LOGBOOK drawer. Removing any two lines from the drawer makes the example work. In good2.org I've removed the first two lines. If it weren't for those bugs, this would fit my needs exactly! Cheers, Viktor Darlan Cavalcante Moreira wrote: One way to do this is to use file variables to change the value of org-attach-directory. This works particularly well when you use just a few org files as in your case. For instance, you could put --8---cut here---start-8--- # Local Variables: # org-attach-directory: ~/org/data/personal # End: --8---cut here---end---8--- in your personal.org file and --8---cut here---start-8--- # Local Variables: # org-attach-directory: ~/org/data/work # End: --8---cut here---end---8--- in your work.org file. -- Darlan Cavalcante Moreira At Wed, 21 Sep 2011 11:49:39 +0200, Viktor Rosenfeld listuse...@googlemail.com wrote: Hi everybody, so far I've only used one org file, but it's getting unwieldy and I've decided to split it up. I'd also like to split up my attachment directory to reduce clutter. For example, if I have two org files personal.org and work.org I would like attachments to go into automatically created directories below ~/org/data/personal and ~/org/data/work. If a file has no custom attachment directory specified, attachments should be created below a default path (same as now). Is this possible? Thanks, Viktor
Re: [O] Idea, configurable markup
When I moved from Planner/Muse to Org, the ability to define custom markup with something.../something is the only thing I missed as well as the ability to easily toggle between hide and show the markup (I thing it was C-c C-l, but I'm not sure). This was a small thing to pay considering everything else org-mode offered in exchange, but it would be nice to have thi flexibility in org. -- Darlan At Mon, 19 Sep 2011 21:12:01 +0200, Sebastien Vauban wxhgmqzgw...@spammotel.com wrote: Hi Dov, Dov Grobgeld wrote: I got the following idea regarding the use of markup characters in org-mode. Currently it is possible to use *bold*, /italic/ and ~verbose~ and a few other markups. I would have liked to have this extended as follows: - Allow the toggling of the display of the formatting characters, *, ~, /, etc. It's already in there: 1. Choose to get them hidden by default with: #+begin_src emacs-lisp (setq org-hide-emphasis-markers t) #+end_src 2. Make them (dis-)appear by toggling visible-mode. - Allow a system that allows the user to invent his own formatting. E.g. «variable», 〈function〉, $math$, ⌞string⌟, or whatever the user fancies. All these modes should be defined in an org-mode variable and the display attributes should be configurable, just like any other custom org-mode font. If the user wants to expand beyond ASCII it should be up to him. - Alternately, use a system like varvariable/var where the tag var is user definable, just like the magic characters above. The display of the tags should be toggable. Just like for [file:foo.bar] where the [] character are hidden, should the tags be hidden until someone erases one of the two delimiters. Note that this is nothing more than ideas at the moment, and I'll probably never get around to implement any of it. Still I thought I'd share it if someone would like to have a go. Regarding inventing new formatting and having them correctly exported, this is already there as well: See: - `org-emphasis-alist' for face in Emacs and code to HTML - `org-export-latex-emphasis-alist' for code to LaTeX So, already done (by others!). Just a comment on this: I would be in favor of having one or two extra formats _by default_ -- so that it's not relying on my .emacs config file; in fact, as much as in TeXinfo... Currently, as special formats[1], we only have: - org-code, and - org-verbatim. And the use case is not that clear to me (how do you code a URL, a filename, an argument or a key binding?), as both finally gets resolved to the same appearance (in HTML, and almost the same in LaTeX). In TeXinfo, it seems to me we have at least: - url, - code, - key binding, not speaking of internal references. I'd be glad if we could get the same expressivety, by default, as the one we have in TeXinfo[2]. Best regards, Seb Footnotes: [1] I mean: other than bold, italic, underline and striken-through. [2] Never wrote any line in TeXinfo, but simply had to read a couple. -- Sebastien Vauban
Re: [O] Overall organization/setup for org mode: Projects and Tasks
I'm in the same situation and (lack of) consistence is my main problem. One thing that helps me is to define in my custom agenda commands one command that only returns the STARTED tasks (Bernt Hansen's website has more info about this). In this way I can quickly go back to a task that I started but didn't finished in the previous day, for instance. For my custom agenda commands I use --8---cut here---start-8--- (setq org-agenda-custom-commands (quote ( (...) (S Started Tasks todo STARTED ((org-agenda-todo-ignore-with-date nil) (org-agenda-todo-ignore-scheduled nil))) (...) ))) --8---cut here---end---8--- -- Darlan At Wed, 14 Sep 2011 20:59:00 +0200, Olaf Dietsche olaf+list.orgm...@olafdietsche.de wrote: Hi Alan, Alan E. Davis lngn...@gmail.com writes: I've been using org-mode for a few years. My agenda is cluttered with tasks that are weeks and even months past due. I am this close to declaring orgmode bankruptcy and starting from scratch, except my current setup works so well for other things. Might still do that, but I want to ask for ideas. I (and many others) struggle too with becoming organized. And usually it's not a tool bankruptcy, but the lack of a coherent system. What helped me to some degree - and I'm still learning - was David Allen's book Getting Things DONE. You will find lots of information about GTD in the internet (google, youtube) and at the orgmode website http://orgmode.org/worg/org-gtd-etc.html. I also took lots of good ideas and .emacs snippets from Bernt Hansen's website at: http://doc.norang.ca/org-mode.html. And although GTD is a pretty simple system once you get it, I suggest, take the time and read the book (your library might have a copy) and start slowly from there on. I stumble consistently over the distinction between projects and tasks. I think there is not clear distinction, but I need to find a way to organize them so that, at least, agenda displays the day to day TODO tasks separated in a meaningful way from the long term projects that I need to remind myself of (and there are dozens of these). Both projects and tasks result in actions, which have to be completed eventually. So there's not really any difference in handling these, besides maybe the number of single steps it takes to complete. And finally, paraphrasing Pete Phillips in http://article.gmane.org/gmane.emacs.orgmode/4854, there will be the time, where you have to bite the bullet and just do it. Regards, Olaf
Re: [O] Allow org-agenda-text-search-extra-files to be a directory
Thanks suvayu, This works perfectly. -- Darlan At Sat, 10 Sep 2011 00:08:38 +0200, suvayu ali fatkasuvayu+li...@gmail.com wrote: On Fri, Sep 9, 2011 at 9:09 PM, Darlan Cavalcante Moreira darc...@gmail.com wrote: Is it possible to set org-agenda-text-search-extra-files with a directory so that all .org files in that directory are considered for text searches (similarly to how you can set org-agenda-files)? This should work: (directory-files ~/directory t ^[^.#].*\\.\\(org$\\|org_archive$\\)) -- Suvayu Open source is the future. It sets us free.
[O] Allo org-agenda-text-search-extra-files to be a directory
I have a directory with several files that are not supposed to be in org-agenda-files (they don't have TODOs, schedule, etc), but that I want org to include in text searches. Is it possible to set org-agenda-text-search-extra-files with a directory so that all .org files in that directory are considered for text searches (similarly to how you can set org-agenda-files)? As I understand this is not possible right now and I need to explicitly set org-agenda-text-search-extra-files with a list containing all files I want org to consider in text searches. The problem of that approach is when I create more files in the same directory and forget to update org-agenda-text-search-extra-files. -- Darlan
Re: [O] How to suppress \label commands in beamer export
Thanks Eric, The ideal case if if I could disable label creation and labels would be created only when I specifically write a target, for instance. But I understand this is hard coded right now. If I don't use overlays at all to change the blocks in the right side and just put them into separates frames, then the figure in the left (when I put one there) will slight change its vertical position. This is annoying and it is the reason why overprint is used. I'll try to use overlayarea instead. The overlayarea environment requires two arguments, the width and the height of the area. Overprint is just a more user friendly way to use overlayarea where the width is all space available and the height is automatically determined as the height of the largest thing inside the overlayarea. Since overlayarea requires two arguments, like --8---cut here---start-8--- \begin{overlayarea}{width}{height} \only1 {lalala} \only2 {lelele} \end{overlayarea} --8---cut here---end---8--- is there a suggested way to map oberlayarea into org-beamer-environments-extra? The only way I can think is to require the user to type {width}{height} in the headline (with the curly brackets) and use somethink like \\begin{overprint}%h in the template definition. -- Darlan At Fri, 02 Sep 2011 09:41:32 +0100, Eric S Fraga e.fr...@ucl.ac.uk wrote: Darlan Cavalcante Moreira darc...@gmail.com writes: I'm trying to convert a presentation I've done in beamer to org-mode. I'm going to improve this presentation and add more stuff to it. I'd like to do it in org-mode. However, org adds \label{sec-numbers} in the generated tex file after all environments and this adds some blank space between the blocks in the final presentation. I understand this extra blank space is more like a latex issue, but I couldn't find a way to stop org-mode from creating the \label lines. Having looked at the code, there definitely does not appear to be any way to turn these off. It would be straightforward to modify the code --8---cut here---start-8--- (when label (insert (mapconcat (lambda (l) (format \\label{%s} l)) label-list \n) \n)) --8---cut here---end---8--- or, more likely, the code in =org-export-latex-subcontent= which actually defines =label=? This could be made optional depending on the num: #+OPTION, say? But it may not be straightforward because labels are not only due to sectioning, if I understand the code correctly... However, the problem with spacing appears to be because of some interaction between labels and overprint. I wonder if maybe there is an easier way (in the meantime) to accomplish what you want without overprint? Just curious... -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.7 (release_7.7.238.gc51b7)
[O] How to suppress \label commands in beamer export
I'm trying to convert a presentation I've done in beamer to org-mode. I'm going to improve this presentation and add more stuff to it. I'd like to do it in org-mode. However, org adds \label{sec-numbers} in the generated tex file after all environments and this adds some blank space between the blocks in the final presentation. I understand this extra blank space is more like a latex issue, but I couldn't find a way to stop org-mode from creating the \label lines. In order to reproduce this, export the attached org file to a beamer presentation. Notice how Block 1 and Block 2 (as well as Block 3 and Block 4) have a lot of blank space between them. In fact, this makes Block 2 and Block 4 goes out of the frame. Now, in the .tex file that org created, erase all the \label lines and compile the file again. Notice how the blank space between the blocks changes and now Block 2 and Block 4 fit nicely inside each frame. Note: I use the overprint environment. The attached file has two lines that must be executed in order to make overprint work. Maybe this environment should be added to org-beamer-environments-default. -- Darlan test_org_beamer.org Description: Binary data
Re: [O] Best practices? Multiple .org files?
But the original question remains. Is it better, regarding speed, to split the content into several files (all included in the agenda) or a single file will be faster? In [1] you find Should I use one big org file or multiple files?, with a few tips for improving speed, but does not answer this. There was a thread about org speed some time ago but I don't remember if a conclusion about this topic was reached. [1] http://orgmode.org/worg/org-faq.html -- Darlan At Thu, 01 Sep 2011 11:38:45 -0700, Brian Wood bw...@berkeley.edu wrote: Wow, how did I miss search view. Sweet! Brian Wood Applications Programmer UC Berkeley IST Application Services
Re: [O] Attachments and refiling
At Wed, 24 Aug 2011 16:12:01 +0200, Bastien b...@altern.org wrote: Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: At Fri, 19 Aug 2011 10:46:26 +0200, Bastien b...@altern.org wrote: What about org-add-link-type? Mmhh.. yes. We should be able to use something like: (org-add-link-type attach 'org-attach-open 'org-attach-export) However, I could not make the the export part work because I can't use org-attach-expand in it. Therefore, I don't know how to get the attach directory inside a function that I can pass to org-add-link-type as the export function. That's not possible for now. That's something we can keep in mind while working an a new export engine: exporting part of the content should be done in a context-aware fashion, where it's possible to get the value of org-attach-dir. Thanks for the confirmation Bastien. At least for me the export part is not very important right now. A context aware export engine would make this easy to achieve with org-add-link-type and probably open up many other possibilities, but I understand it is a lot of work. Unfortunately, my elisp skills are very limited to go any further for now. Even with good elisp skills I'm afraid we cannot achieve this for the moment. HTH, -- Bastien -- Darlan
Re: [O] Experiences with literate elisp and ob-tangle?
I've been using the Emacs starter kit for some time and I must say it is excellent. Before making the change, I already had my Emacs initialization broken-down into smaller .el files that were loaded by the master file. It was as much organized as I could be, but not enough. It always required more work when I needed to make any changes than I would like. With the starter-kit I now use only a single org file for everything. The outline-structure of org-mode allows me to have my initialization broken down into smaller pieces in a more natural way without any extra work. Also, it is much easier to locate any part of my initialization that I want to change, since everything is in a single file and now I have tags. Another bonus feature is that I can easily disable/enable parts of my initialization simple by setting the tangle property of a sub-tree to nil, as well as putting COMMENT in the beginning of it (COMMENT will be red, but has no effect besides identify a disabled sub-tree). This is better than locating and commenting the undesired/desired lisp code in my previous .el files. This allowed me to identify bottlenecks and optimize my Emacs initialization. -- Darlan At Mon, 22 Aug 2011 11:09:17 -0600, Eric Schulte wrote: Hi John, John Wiegley jwieg...@gmail.com writes: Hi all, I'm considering switching my lengthy .emacs over to a literate Org file, using ob-tangle, and as I was wondering if others had any experience with this, and if so, does it slow down startup much? The first load after a .org file is changed will require re-tangling of the file, but in most cases the .el files are loaded directly and there should be no slowdown. I've been using this for over a year now with no noticable slowdown. For an example of a large config structured using .org files and based on Emacs24 see [1]. Is there a way to get ob-tangle to compile the resulting Elisp file? Yes, see the makefile in the repo I pointed to above [2]. I'm guessing it does not regenerate the .el file if no changes have been made to the .org, right? That is correct, the `org-babel-load-file' function compares the modification dates of the .el and .org file to see if re-tangling is required. Best of luck -- Eric Thanks, John Footnotes: [1] https://github.com/eschulte/emacs24-starter-kit [2] https://github.com/eschulte/emacs24-starter-kit/blob/master/Makefile -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Attachments and refiling
At Fri, 19 Aug 2011 10:46:26 +0200, Bastien b...@altern.org wrote: What about org-add-link-type? Besides the new link type name, org-add-link-type can receives two functions, one used to follow the link and another to export the link. I was able to make the attach link type work by using org-add-link-type, where the follow function is practically the same code I have used with #+LINK. However, I could not make the the export part work because I can't use org-attach-expand in it. Therefore, I don't know how to get the attach directory inside a function that I can pass to org-add-link-type as the export function. Unfortunately, my elisp skills are very limited to go any further for now. -- Darlan Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: There is probably a way to make the attach link type also work when exporting the org buffer, but since I don't need this right now I didn't search how to do it. You could use a `org-export-preprocess-hook' to convert those attach links into proper file links. -- Bastien
Re: [O] Attachments and refiling
Hello Bastien, I'm glad to help (even if such a small contribution). The downside of this hack is that it does not work when you export the buffer. If you use the file: link type then the link will works when you export the org buffer, but you have to type the whole path of the attached file. Therefore, there is this trade-off for now. There is probably a way to make the attach link type also work when exporting the org buffer, but since I don't need this right now I didn't search how to do it. -- Darlan At Thu, 18 Aug 2011 19:33:37 +0200, Bastien b...@altern.org wrote: Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: I requested this some time ago [1]. While there is not a built-in attach link type, org provides you with ways to easily create this functionality. In the setup part in my org-files I put #+LINK: attach elisp:(org-open-file (org-attach-expand %s)) Now I can use the attach link type, but org will ask me if I want to allow executing the elisp code. To avoid this you can even set org-confirm-elisp-link-function to nil (I don't like this because it allows any elisp code in links) or you can set org-confirm-elisp-link-not-regexp appropriately. In my case I use : (setq org-confirm-elisp-link-not-regexp org-open-file) This works very well. This is a nice and useful hack -- I added it to Worg/org-hacks.org. Thanks! -- Bastien
Re: [O] Hide table columns on export
I didn't test this, but I think you can do what you want with org-babel without too much work. Just put the table somewhere that is not exported and put a src block that receives the table where you want the table to appear. -- Darlan At Wed, 17 Aug 2011 07:07:56 +0100, Johnny yggdra...@gmx.co.uk wrote: Nick Dokos nicholas.do...@hp.com writes: Johnny yggdra...@gmx.co.uk wrote: Is there a way to hide certain columns of a table when exporting? In this particular case, you could easily kill the columns you don't want to export (with M-S-left in a table context), do the export (C-c e h or whatever) and then undo (C-x u) enough times to get back to where you started. Thanks, I will use this as a workaround, but at the same time put in a feature request to hide columns. Maybe it is possible to expand the group functionality to include a symbol that indicates the group should also be hidden on export? E.g. something like | | | , or any other symbol if double within one column is not easy to implement. Regards, -- Johnny
Re: [O] Script: convert Tomboy/GNote XML to org-mode
By using the indent option everything seems to work just fine. I noticed that the PROPERTIES block is not indented, but that is not an issue. I can already move from tomboy to org, but I will test any future version of tomboy2org. Thanks, Darlan At Wed, 10 Aug 2011 13:43:22 -0500, attila att...@stalphonsos.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA384 On 08/10/2011 12:01 PM, Darlan Cavalcante Moreira wrote: [snip] I have found one problem that prevents me from converting my notes correctly, though. In tomboy I have many notes where I use * as bullet item in the body starting in the first column. These bullet items are then interpreted as level-1 headings in the final notes.org file. This can be solved by indenting the body content of each converted note. Org-mode will then interpret the items as actual items instead of headlines. Good point. I had some issues with a couple of notes and had not yet realized that the problem is the very one you're pointing out until just now. Thanks. Check in on that github repository later in the day or tomorrow and it should be fixed. Also, tomboy doesn't really support tags. It only allows you to group notes. I think this maps better as the CATEGORY property in org-mode, instead of a TAGS property. But that's just my opinion. The Tomboy XML markup places the notebook (category) in a section labeled tags like so: tags tagnotebook-name/tag /tags I just transliterated to orgmode. Upon reflection I think you're right - what Tomboy means by this is more properly what orgmode means by CATEGORY. I'll make this configurable in the next version and make the default CATEGORY. In general my handling of properties could be more configurable. I am not yet sophisticated enough in my use of orgmode to do anything interesting with drawers or properties but I'm starting to think of ways to use them... -- Darlan Pax, --A - -- att...@stalphonsos.com | 0x4FFCBB9C | hack(free) or die; -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREJAAYFAk5C0T4ACgkQr88iLU/8u5wIGwCfY1iW8QgXFGW18J5hkrD+MTh9 8J0An0FHfo7JLcOTpKjDSQHktrcNviV9 =YKJH -END PGP SIGNATURE-
Re: [O] Script: convert Tomboy/GNote XML to org-mode
Thanks for the instructions, and sorry for the late reply. I'm using Ubuntu 11.04 and I was able to run the script after installing libtext-format-perl as you have instructed. I have found one problem that prevents me from converting my notes correctly, though. In tomboy I have many notes where I use * as bullet item in the body starting in the first column. These bullet items are then interpreted as level-1 headings in the final notes.org file. This can be solved by indenting the body content of each converted note. Org-mode will then interpret the items as actual items instead of headlines. Also, tomboy doesn't really support tags. It only allows you to group notes. I think this maps better as the CATEGORY property in org-mode, instead of a TAGS property. But that's just my opinion. -- Darlan At Wed, 03 Aug 2011 14:10:14 -0500, attila att...@stalphonsos.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA384 On 08/03/2011 11:48 AM, Darlan Cavalcante Moreira wrote: Thanks for sharing this. I've wanted to convert my tomboy notes to org-mode for some time. I downloaded the script and tried to run it with : ./tomboy2org.pl -help but I got the error message below --8---cut here---start-8--- Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44. BEGIN failed--compilation aborted at ./tomboy2org.pl line 44. --8---cut here---end---8--- Maybe I need to install some library, but I know nothing about Perl to fix this myself. Hi, thanks for pointing this out. I should make the dependencies explicit at least in the README, but to be clear they are: XML::Twig Text::Format The other modules I depend on are (almost?) always installed by default, at least in every Perl installation I've seen recently: Pod::Usage Sys::Hostname; IO::File; POSIX; You don't say what platform you are using so I can't tell you exactly how to get any missing modules installed for your situation, but here's a stab at it: Debian names the packages for Perl modules something like libname-of-module-in-lowercase-with-hyphens-perl so Text::Format becomes libtext-format-perl. On Ubuntu Linux and other Debian-derived Linux distros you therefore do something like this to get this package installed: $ sudo apt-get install libtext-format-perl If the above doesn't apply to you and your system has the cpan command installed, you can also do this: $ sudo cpan -i Text::Format The second solution above will probably work on modern releases of your favorite BSD Unix flavor; I just checked on OpenBSD and NetBSD systems I have access to and they both have this command. If you are not much for Unix system administration, the sudo command gives you temporary administrative powers for the purposes of a single command; your mileage may vary depending on your situation. Finally, if all else fails Text::Format is available from CPAN here: http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/Text-Format-0.53.tar.gz The usual recipe (after you've downloaded that file however) is: $ tar zxvf /path/to/Text-Format-0.53.tar.gz $ cd Text-Format-0.53 $ perl Makefile.PL $ make $ make test # assuming make test does not kick out any errors: $ sudo make install -- Darlan Hope this helps. Pax, --A - -- att...@stalphonsos.com | 0x4FFCBB9C | hack(free) or die; -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREJAAYFAk45nP8ACgkQr88iLU/8u5x/7gCfbhrB3eE9CkgBsD2c+3K3xMBG EmAAnjK/TH3vNAjSum13eA1n02qKnjxW =2cBx -END PGP SIGNATURE-
[O] How to uniformly configure multiple org files
In each org file I usually put several configuration lines such as #+STARTUP, #+OPTIONS, #+LINK, etc. Is there a way to keep these configurations in a single file and then include this file in each org file I want? This would be particularly useful for projects. What I have in mind is something like a #+INCLUDE_CONF keyword similar to #+INCLUDE, but while #+INCLUDE includes the content of one org-file into another, the #+INCLUDE_CONF would include the configuration comments while ignoring the content (so that we could use headings to separate the configuration comments, for instance). -- Darlan
Re: [O] How to uniformly configure multiple org files
Thanks, this is exactly what I need. At Fri, 5 Aug 2011 15:09:17 -0300, Juan Pechiar j...@pechiar.com wrote: Hi Darlan, Please check #SETUPFILE http://orgmode.org/manual/In_002dbuffer-settings.html Regards, .j. On Fri, Aug 05, 2011 at 02:54:30PM -0300, Darlan Cavalcante Moreira wrote: In each org file I usually put several configuration lines such as #+STARTUP, #+OPTIONS, #+LINK, etc. Is there a way to keep these configurations in a single file and then include this file in each org file I want? This would be particularly useful for projects. What I have in mind is something like a #+INCLUDE_CONF keyword similar to #+INCLUDE, but while #+INCLUDE includes the content of one org-file into another, the #+INCLUDE_CONF would include the configuration comments while ignoring the content (so that we could use headings to separate the configuration comments, for instance).
Re: [O] undo archive
I've been hit by this a few times when my fingers type the archive key-binding instead of the attach file key-binding. Undo has worked so far, but it may be a little trick sometimes. -- Darlan At Wed, 03 Aug 2011 14:20:24 -0500, Jason Dunsmore emacs-orgm...@dunsmor.com wrote: suvayu ali fatkasuvayu+li...@gmail.com writes: On Wed, Aug 3, 2011 at 8:47 PM, skip scp0...@gmail.com wrote: Is there a way to undo archive after, say, an accidental archival of a part of org file? A simple undo on the org file buffer has worked for me in the past. You'll also need to manually remove the archived subtree from the archive file.
Re: [O] Script: convert Tomboy/GNote XML to org-mode
Thanks for sharing this. I've wanted to convert my tomboy notes to org-mode for some time. I downloaded the script and tried to run it with : ./tomboy2org.pl -help but I got the error message below --8---cut here---start-8--- Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44. BEGIN failed--compilation aborted at ./tomboy2org.pl line 44. --8---cut here---end---8--- Maybe I need to install some library, but I know nothing about Perl to fix this myself. -- Darlan At Mon, 01 Aug 2011 13:23:25 -0500, attila att...@stalphonsos.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA384 Pardon me if this isn't the right place to post this, but I couldn't figure out where else to do so. I'm moving my note-taking from GNote (C++ rewrite of Tomboy Notes) to org-mode. As I have a lot of notes all over the place, I wrote a script to convert from the XML format used by the Tomboy-style tools to org-mode. You can find it here: https://github.com/StAlphonsos/scriptologie It could be improved in a lot of ways but it got me out of GNote, so that's something. If my feeble attempts to preserve meta-data about the notes as org-mode properties offends anyone I heartily welcome you to help me fix it, along with anything else you can think of... Org mode is great. Thanks. I'm not subscribed to this list so please respond directly to me. --A - -- att...@stalphonsos.com | 0x4FFCBB9C | hack(free) or die; -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREJAAYFAk427xMACgkQr88iLU/8u5ykkwCfTQ47zG4xgwu+MXzZ+S6pCjef aZoAniwxMM6egiBQZZAEaW1K1McNgitO =goIo -END PGP SIGNATURE-
Re: [O] Attachments and refiling
I requested this some time ago [1]. While there is not a built-in attach link type, org provides you with ways to easily create this functionality. In the setup part in my org-files I put --8---cut here---start-8--- #+LINK: attach elisp:(org-open-file (org-attach-expand %s)) --8---cut here---end---8--- Now I can use the attach link type, but org will ask me if I want to allow executing the elisp code. To avoid this you can even set org-confirm-elisp-link-function to nil (I don't like this because it allows any elisp code in links) or you can set org-confirm-elisp-link-not-regexp appropriately. In my case I use : (setq org-confirm-elisp-link-not-regexp org-open-file) This works very well. -- Darlan [1] http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37613.html At Fri, 29 Jul 2011 10:33:37 +0200, Gustav Wikström gustav.e...@gmail.com wrote: [1 text/plain; ISO-8859-1 (quoted-printable)] What about being able to link to attachments in a similar way as one links to files or web-pages? Using [[attachment:some_file.sql][some link name]] ? Comments? Problems with this? 2011/7/25 Gustav Wikström gustav.e...@gmail.com To make org-mode look for attachments in the current sub-tree when using org-insert-link would simplify the process of linking to attached files (useful at least when exporting). Persistent links, in in this regard, seems like a nice idea! /Gustav 2011/7/24 Bastien b...@altern.org Hi Gustav, Gustav Wikström gustav.e...@gmail.com writes: Another feature that could improve the use of attachments is to allow links to the attached folders also via the C-c C-l interface in a similar way as stored links (C-c l ). I.E to get the attachment-folder as an item in the C-c C-l buffer with TAB-completion. You can already use (setq org-attach-store-link-p t) to create a link while attaching a file. Since links are deleted as soon as they are inserted, this will be usable only once. We can imagine *persistent links* -- and links to attached files could be a good example of persistent links. What do you think? -- Bastien [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] Attachments and refiling
Regarding (2), is this a design decision? Currently I have the ATTACH_DIR property of some headings set to a relative path from the org file and it works perfectly. That is, it is possible to use either absolute or relative path for the ATTACH_DIR property right now. But if this is a design decision then I should not consider this behavior as granted, right? Also, Suvayu's suggestion for the default attachments directory is the best solution IMHO. That is, the default attach directory should be relative to org-directory. -- Darlan At Thu, 28 Jul 2011 09:51:54 +0200, Bastien b...@altern.org wrote: Hi Darlan, here is how I see the situation regarding attachments: 1. org-attach.el is nice because it makes it easy to attach a file to a task, while not *worrying* about where the file is on the harddrive. 2. Adding an ATTACH_DIR property will always add an absolute path, so there is no problem when moving an entry with an explicit ATTACH_DIR. 3. Refiling/archiving subtrees lose track of some attachments when the attach directory data/ is *relative* to the org file (which is the default) and when the target org file is not in the same directory. 4. Moving an entry with an ATTACH_DIR_INHERIT will lose attachments when the ATTACH_DIR of the target entry is different. (3) and (4) are two distinct problems. I suggest fixing problem (3) by making `org-attach-dir' defaulting to ~/.org-attachments/. I I suggest fixing problem (4) by explicitely replacing ATTACH_DIR_INHERIT with the corresponding ATTACH_DIR when the target subtree has a different ATTACH_DIR. The core idea is that I want to avoid moving files themselves: I think it's a risky road, and I hope the solutions above will make this road unnecessary. I'm interested in feedback and ideas about such proposed changes. Thanks a lot! -- Bastien
Re: [O] Attachments and refiling
As I see changing the attach directory to point to the original one is the easiest solution that has no chances of breaking anything and would keep attachments working in the refiled/archived sub-trees. Maybe a org-attach-move-files function could also be implemented to easily move an attachment directory to a different place. It should move the directory and automatically set the ATTACH_DIR property to the appropriated value. Of course org could try to find out if this attach directory is also used in a different file/sub-tree (maybe search in the agenda files and in the current directory for org-files using this attach directory) and change ATTACH_DIR in that file/sub-tree or warn the user before moving the files. This won't be bullet proof but if the users only set the same attach directory for headings in the same file, for instance (I do this), then it would work perfectly. Then, when the user wants the refiling/archiving process to also move the attached files it could pass an argument before refiling/archiving and org-attach-move-files would be called appropriately. -- Darlan At Mon, 25 Jul 2011 09:45:24 +0200, Bastien b...@altern.org wrote: Gustav Wikström gustav.e...@gmail.com writes: I'm leaning towards not moving my archive to a different folder. I like having the attachments relative. Okay. But as Darlan pointed out, moving the attached files when refiling the entry might be dangerous, because files in this attached directory can also be attached in a different subtree. I don't have a good general solution to this -- if someone has, please share. Are archive- and refile-hooks implemented b.t.w.? C-h v org-archive-*-hook TAG C-h v org-refile-*-hook TAG helps. There is `org-after-refile-insert-hook' but there is no `org-archive-hook'. I'll consider adding this. This would make it possible to hack a personal setting, or am I wrong? You're probably right. Code is proof. -- Bastien
Re: [O] Referring to ID in other Org-mode file
You don't need to type this manually. Use org-store-link (usually C-c l) in a sub-tree to store the link (it uses the sub-tree's id - it will ever create an id if there isn't one already). Then use org-insert-link (usually C-c C-l) to insert the link. -- Darlan At Sat, 23 Jul 2011 18:45:01 +0200, Karl Voit devn...@karl-voit.at wrote: * Memnon Anon gegendosenflei...@googlemail.com wrote: Karl Voit devn...@karl-voit.at writes: How can I refer to an ID in another Org-mode file (withing the same folder)? [...] I was searching in the Org-mode manual but could not find any solution for my problem. Either this is not possible or I could not find the (existing) solution yet. ,[ (info (org)Search options) ] ` Sorry, I was not searching good enough. Shame on me :-( In this case, that method is exactly what I need: file:README.org::*foobar Since GitHub's interpretation of Org-mode files is not that perfect I want to avoid drawers containing IDs at all.[1] The more I am using Org-mode the more I see its beauty :-) 1. https://github.com/novoid/Memacs -- Karl Voit
Re: [O] Question about org-search-view and org-occur-in-agenda-files
You can probably use custom agenda commands for this. See the documentation for the org-agenda-custom-commands and the corresponding section in the manual [1]. You can set the org-agenda-files and org-agenda-text-search-extra-files to point to the old project for some custom search. For instance, I use --8---cut here---start-8--- #+begin_src emacs-lisp (setq org-agenda-custom-commands (quote ( ... Some custom commands (N . Search in notes.org) (Nw search ((org-agenda-files '(~/org/notes.org)) (org-agenda-text-search-extra-files nil))) (Nt tags ((org-agenda-files '(~/org/notes.org)) (org-agenda-text-search-extra-files nil))) ... Some more custom commands ))) #+end_src --8---cut here---end---8--- This allows-me to perform a search only in my org/notes.org file without actually changing my org-agenda-files. -- Darlan [1] - http://orgmode.org/org.html#Custom-agenda-views At Sat, 23 Jul 2011 19:36:16 +0200, suvayu ali fatkasuvayu+li...@gmail.com wrote: Hi Orgers, I know that I can use `org-search-view' or `org-occur-in-agenda-files' from the agenda to search for some string on all my agenda files. And I can customise `org-agenda-text-search-extra-files' to include extra text files. These search functions are quite powerful in general, so I was wondering if these functions can be used to do a search restricted to say a list of files or to org files within a directory. If I could wrap these in my own functions, even that would be amazingly helpful. To illustrate a use case, I recently switched research projects[1]. I keep all my files related to the OLDPROJ under ~/org/OLDPROJ/ and all my files related to the NEWPROJ under ~/org/NEWPROJ/[2]. Now when I perform a text search I want to include only the NEWPROJ along with my agenda files (located in ~/org/). Now I would like to have an interface (either through the agenda menu or through some interactively called function) to perform a search _only_ on the OLDPROJ files when necessary. Is that possible? Any hints as to how I can achieve this would be amazingly helpful. Thanks. :) Footnotes: [1] I am using the word project rather loosely to describe a super-project with several sub-projects which are rather significant by themselves. [2] These project directories have their own structure based on sub-projects and other needs. -- Suvayu Open source is the future. It sets us free.
Re: [O] Attachments and refiling
I use org-attach regularly and consider it to be a great feature of org-mode. Since I only attach to the sub-tree (instead of to a different file) I have not this problem. However, sometimes a set the attach directory of two different headings to the same folder (when it makes sense) and if org always moved the attached files it would break the other sub-tree. An alternative is to change the attach directory in the archived entry to point to the original attach directory where the files are. When archiving to a file in a different folder org could ask if it should also move the attached files or simply change the attach directory accordingly (I would prefer this as the default if ask as the default was considered too annoying). -- Darlan At Fri, 15 Jul 2011 16:55:06 +0200, Gustav Wikström gustav.e...@gmail.com wrote: [1 text/plain; ISO-8859-1 (quoted-printable)] Hello Bastien! To clarify a bit. Lets say I have a file c:\temp\agenda.org (I'm calling it file 'a'). When marked with TODO item: done, headings in this file are archived to another file called c:\temp\archive\agenda.org_archive ('b') If i use C-c C-a to attach a file to a certain topic in 'a' and then refile this topic to 'b', when done the attachment still resides in c:\temp\data and will not be found when looking at the attachment in 'b'. Thus my question is if it is possible to also refile the attachment so the attachment-folder resides in c:\temp\archive\data and is avaliable in 'b'? /Gustav 2011/7/15 Bastien b...@altern.org Hi Gustav, Gustav Wikström gustav.e...@gmail.com writes: Is it possible to make attachment-folders move with the headings when refiling them to other locations? I'm not sure what you mean. Can you give an example? -- Bastien [2 text/html; ISO-8859-1 (quoted-printable)]
Re: [O] Documentation suggestion re: buffers containing crypted entries
I think we can disable auto-save locally using file variables, but what org-crypt seem to check is auto-save-default and its value probably won't change when auto-save is disabled locally. -- Darlan Cavalcante At Mon, 27 Jun 2011 18:56:54 +0200, Bastien b...@altern.org wrote: Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: The question is where should this information be most appropriate to appear. In my view, this should be in the documentation (highlighted etc), not in the Emacs mini-buffer! I don't know enough texi (any at all, actually) so cannot suggest a patch. However, I would suggest that the warning that is in the code be moved into the entry for org-crypt.el in the info manual. I did so -- I added this to the config example in org.texi: , | (setq auto-save-default nil) | ;; Auto-saving does not cooperate with org-crypt.el: so you need | ;; to turn it off if you plan to use org-crypt.el quite often. | ;; Otherwise, you'll get an (annoying) message each time you | ;; start Org. | | ;; To turn it off only locally, you can insert this: | ;; | ;; # -*- buffer-auto-save-file-name: nil; -*- ` Or, as originally proposed, the warning in the code could be wrapped in a customisable variable but this seems like overkill to me. To me too, unless we have a clean way to disable auto-save-mode locally. Just my 2¢! 2thx! -- Bastien
Re: [O] Errors with current version (git pull'ed at 10:30 CET)
I'm also having problems with recent changes (since yesterday, but it has been a few days since my last update before that) that may be due to the same cause. It seems to be related to the library of babel. I can reproduced with the following steps --8---cut here---start-8--- 1. Start Emacs with: : Emacs -Q 2. Add the folder where I pulled org-mode (evaluate the code below in my case): : (let ((default-directory ~/Org-mode-dev/org-mode)) : (normal-top-level-add-to-load-path '(.)) : (normal-top-level-add-subdirs-to-load-path) : ) 3. Put the code below in an org file, for instance ~/Muse/org/my_library_of_babel.org : #+source: identity(var) : #+begin_src python : return var : #+end_src 4. Ingest this file in the library of babel with : (org-babel-lob-ingest ~/Muse/org/my_library_of_babel.org) --8---cut here---end---8--- I get an error with the back-trace below --8---cut here---start-8--- Debugger entered--Lisp error: (wrong-type-argument consp nil) #[(pair) @\306=\203] mapc(#[(pair) @\306=\203] #[(plist) \301\302\\207 [plist mapc #[(pair) @\306=\203] mapc(#[(plist) \301\302\\207 [plist mapc #[(pair) @\306=\203] org-babel-merge-params(((:var . var)) ((:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . code) (:results . replace) (:padnewline . yes) (:hlines . no) (:session . none))) org-babel-get-src-block-info(light) org-babel-lob-ingest(~/Muse/org/my_library_of_babel.org) eval((org-babel-lob-ingest ~/Muse/org/my_library_of_babel.org) nil) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil) --8---cut here---end---8--- -- Darlan Cavalcante At Tue, 28 Jun 2011 15:02:01 +0200, Bastien b...@altern.org wrote: Hi Sebastien, Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Just want to report 2 errors I got with the latest version of Org-mode. I'm sure (with 5 nine, ie 99.999%) that I did not change anything in my setup which could explain this. Both errors were generated after a fresh Emacs startup. * First I try to open the file Work.org in which I had an open clock, on task TODO Organize work (misc for project organization, etc.). Can you send a minimal .org file to help reproduce the problem? * Second I try to write a mail -- this launches Org thanks to autoloads, here for correctly highlighting code blocks in Gnus. This looks like a problem with Babel -- can you help narrow down the problem a bit more? Thanks! -- Bastien
Re: [O] [babel] How to set multiple variables with properties
One of the things I tried (that didn't work, otherwise I would not have sent any e-mail) was :PROPERTY: :var: variable1=value1 :var variable2=value2 :END: I thought that maybe babel would just ask org what is the value of :var:, put :var before it, and include this in the block header. Therefore I would get the effect of adding :var variable1=value1 :var variable2=value2 in the block header and it could work. However, even if this method had worked It would not be flexible. One of the nice things about properties is inheritance. I would like to define general variables as properties in level-1 headings and define more specific variables in the sub-headings as necessary. However, if babel always use :var: as the property then defining a variable in a subheading will overwrite the upper level variable. The best option in my use-case-scenario would be some name scheme to identify variable definitions for org-babel. For instance --8---cut here---start-8--- :PROPERTY: :ob-someVariable: some string maybe with\nline breaks :ob-someOtherVariable: 123456 :END: --8---cut here---end---8--- would make the variables someVariable and someOtherVariable known to org-babel. -- Darlan Cavalcante At Wed, 22 Jun 2011 20:27:00 +0200, Christian Moe m...@christianmoe.com wrote: Hi again, I was referring to these functions: - org-entry-put-multivalued-property - org-entry-get-multivalued-property - org-entry-add-to-multivalued-property - org-entry-remove-from-multivalued-property - org-entry-member-in-multivalued-property described here: http://orgmode.org/manual/Using-the-property-API.html I've found a few discussions: - http://comments.gmane.org/gmane.emacs.orgmode/33457 - http://lists.gnu.org/archive/html/emacs-orgmode/2010-02/msg00251.html I don't have anything working with them, as such,[1] and I was curious if anyone did. They don't currently seem to be integrated into completion, search functions, Babel, and so on, which would limit their usefulness (though searching can be done with regexps). And I think implementing wider support for them would run into a problem with distinguishing between properties that are meant to be multivalued, or and properties that just contain a single value which happens to contain spaces. But handling multiple var=value expressions in a :var: property for Babel, as Darlan asked about, might perhaps be doable...? Stuff might break, though. Yours, Christian [1] I do have a small research database with some multivalued properties in it. For queries, I use your org-collector and regular expression matching against properties with multiple values. The multivalued-properties functions didn't really come into it, except that knowing they were there made me go ahead and put multiple values in one property. (As it turned out, that wasn't a very good design choice.) On 6/21/11 11:03 PM, Eric Schulte wrote: Hi Christian, That's the first I've heard of that variable? If you do get something working with multivalued properties please do share. Cheers -- Eric Christian Moem...@christianmoe.com writes: Hi, Eric, Just curious: What about the org-entry--multivalued-property functions mentioned in Using the properties API? Is anybody using multivalued properties for anything? Yours, Christian On 6/21/11 10:17 PM, Eric Schulte wrote: Unfortunately org-mode properties only allow a single entry for any given key, so you can only specify one variable using properties. However the following workaround does exist. *** alternative :PROPERTIES: :var: vars=variables :END: #+tblname: variables | var1 | 1 | | var2 | 2 | #+begin_src python print vars[0][1] print vars[1][1] #+end_src Best -- Eric Darlan Cavalcante Moreiradarc...@gmail.com writes: I'm using org-babel to automate a few tasks and I'd like to define a few variables that are common to several code blocks as sub-tree properties. It works when I have only one variable, where I can use * Heading :PROPERTY: :var: variable1=value1 :END: #+begin_src python :results output print variable1 #+end_src #+results: : value1 Is it possible to set multiples variables in this way? I tried things like :PROPERTY: :var: variable1=value1 variable2=value2 :END: :PROPERTY: :var: variable1=value1,variable2=value2 :END: :PROPERTY: :variable1: value1 :variable2: value2 :END: but none of them worked. -- Darlan Cavalcante
[O] [babel] How to set multiple variables with properties
I'm using org-babel to automate a few tasks and I'd like to define a few variables that are common to several code blocks as sub-tree properties. It works when I have only one variable, where I can use --8---cut here---start-8--- * Heading :PROPERTY: :var: variable1=value1 :END: #+begin_src python :results output print variable1 #+end_src #+results: : value1 --8---cut here---end---8--- Is it possible to set multiples variables in this way? I tried things like --8---cut here---start-8--- :PROPERTY: :var: variable1=value1 variable2=value2 :END: :PROPERTY: :var: variable1=value1,variable2=value2 :END: :PROPERTY: :variable1: value1 :variable2: value2 :END: --8---cut here---end---8--- but none of them worked. -- Darlan Cavalcante
Re: [O] [babel] How to set multiple variables with properties
Thanks Eric, I'll minimize the need of this by using #+babel: var=something for variables that are common to many blocks. The tip with the table is a good one also. -- Darlan Cavalcante At Tue, 21 Jun 2011 13:17:17 -0700, Eric Schulte wrote: Unfortunately org-mode properties only allow a single entry for any given key, so you can only specify one variable using properties. However the following workaround does exist. *** alternative :PROPERTIES: :var: vars=variables :END: #+tblname: variables | var1 | 1 | | var2 | 2 | #+begin_src python print vars[0][1] print vars[1][1] #+end_src Best -- Eric Darlan Cavalcante Moreira darc...@gmail.com writes: I'm using org-babel to automate a few tasks and I'd like to define a few variables that are common to several code blocks as sub-tree properties. It works when I have only one variable, where I can use * Heading :PROPERTY: :var: variable1=value1 :END: #+begin_src python :results output print variable1 #+end_src #+results: : value1 Is it possible to set multiples variables in this way? I tried things like :PROPERTY: :var: variable1=value1 variable2=value2 :END: :PROPERTY: :var: variable1=value1,variable2=value2 :END: :PROPERTY: :variable1: value1 :variable2: value2 :END: but none of them worked. -- Darlan Cavalcante -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] equation numbering in html and latex export
Using the org-special-blocks library org-mode will recognize blocks in the form : #+begin_something : bla bla bla : #+end_something Then you could write : #+begin_equation : y=ax+b : #+end_equation in org-mode. It would be translated to : \begin{equation} : y=ax+b : \end{equation} in latex and : div class=equation : y=ax+b : /div in html. Can mathjax be configured to process anything inside div class=equation? If not, maybe the #+begin_equation should be a built-in block in org-mode, also with a fast template (maybe eq). -- Darlan Cavalcante At Thu, 16 Jun 2011 08:53:24 +0100, Eric S Fraga e.fr...@ucl.ac.uk wrote: Samuel Sinayoko s.sinay...@soton.ac.uk writes: Dear list, I've been trying to write short scientific reports that I can export to both LaTeX and HTML. So far I've managed to figure out how to include equations, images, references, and how to include labels and cross reference between all these things. The only problem I have is that I can't get numbered equations in both LaTeX and HTML. Using the snippet below, I'm able to get a numbered equation in HTML but not in LaTeX. I've put loadFiles: [extensions/eqn-number.js], in jsMath/easy/load.js. If I replace the $$ by \begin{equation} and \end{equation}, I get a numbered equation in LaTeX but not in HTML. How can I get numbered equations in both HTML and LaTeX? I can't help you wish HTML unfortunately but I can summarise the issue in LaTeX. With the standard document class (article say), equations can be either displayed or inline. Only displayed equations are numbered and then only if you use =equation= (or =align=, =eqnarray=, etc). $$ ... $$ is equivalent to \[ ... \] which is essentially equivalent to the unnumbered version of \begin{equation} (aka \begin{equation*}). The trick would be to get the HTML exporter to apply the same processing to \begin{equation} ... \end{equation} as it does to $$ ... $$, I guess? -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.399.g01eb)
Re: [O] #+begin_example broken when #+begin_src included inside?
This seems to be true for other blocks as well, besides the example block. For instance, my Emacs configuration is in an org-mode file (using the starter kit) and in one src block where I define my capture templates I had a template with a PROPERTY drawer that was folded, even thought it was a string in an Emacs-lisp src block. In fact, because of this drawer I could not set any property in any heading of the whole file with C-c C-x p. I just got an error, until I bisect my whole file to find the cause and remove the template (I moved its content to a file and pointed the capture template to the file). -- Darlan Cavalcante At Tue, 14 Jun 2011 03:26:44 + (UTC), Paul Sexton psex...@xnet.co.nz wrote: Nick Dokos nicholas.dokos at hp.com writes: I can certainly confirm that: I reported it a week ago - see http://thread.gmane.org/gmane.emacs.orgmode/42546 Nick Lots of org syntax remains inappropriately live inside EXAMPLE blocks. For example, a property drawer inside an EXAMPLE block will show up 'folded' when you open the file. Paul
Re: [O] how to change the headline starter *
I don't think this is possible. The * as a headline starter seems to be hard-coded in org. Also, - is used as a list starter (as well as other starters such as +). -- Darlan Cavalcante At Sat, 11 Jun 2011 20:58:39 +0200, harven har...@free.fr wrote: Hi, is it possible to change the headline starter, for example from * to - ? thanks, -- Harven
Re: [O] problem with utf8 todo keywords
This does not answer your question, but I remember a long time ago I saw some screen-shots of org-mode where some keywords were changed to icons (png images, I think). The screen-shots were pretty, but I don't know if the project was further developed or not. Here a thread about it http://www.mail-archive.com/emacs-orgmode@gnu.org/msg14736.html -- Darlan Cavalcante At Sat, 11 Jun 2011 20:56:46 +0200, harven har...@free.fr wrote: Hi, I use emacs 23.2.1 together with org 6.33. I am trying to add the character ▶ as a todo keyword with no success. Starting with emacs -Q, I execute the following code in the scratch buffer (setq org-todo-keywords '((sequence \u25b6 ok) (sequence \u25b8 ok))) Then I open a simple .org file containing * ▶ first * ▸ second Only the second keyword is highlighted. Why is it not the case with the first keyword ? Thanks, -- Harven
Re: [O] Auto-Fill (aka Word Wrap) of Headline Text
Yes, the best way is to start the TODO description in the next line without the the stars (otherwise it would be another headline). I usually try to create short headlines, specially if that headline has a bunch of tags. For instance : * TODO Some TODO item : Some length description of that TODO item or some steps I need to do : to. Here I can use auto-fill without a problem, If the reason you wanted a long TODO item is to provide enough information in the agenda, then tags and the CATEGORY property are a better option IMHO. For simpler TODO items (that is, no schedule, deadlines, tags, etc) you may prefer a list with check-boxes such as : - [ ] This may also be used as a king of TODO item. Notice that : differently from headlines you can use auto-fill here without any : problem. : - [X] You can toggle the state as done and not done with C-c C-c in : the first line. I find lists with check-boxes specially useful when I have TODO items that can be broken down into a sequence of steps. In that case I create the TODO item and put the bullet list inside. Such as : * TODO Some task [/] : - [ ] Step 1 : - [ ] Step 2 : - [ ] Etc. If you put [/] in the TODO headline then whenever you mark one step as done with C-c C-c then org will update it to [1/3] and so on. Of course you can also use sub-headlines also with the TODO keyword for the steps if that is better for you. Then you can schedule each step separately, for instance. In that case it starts to look more like a project then a simple task, but just do the way that fits better for you. -- Darlan At Fri, 10 Jun 2011 00:12:12 -0400, Lex Fridman lexfrid...@gmail.com wrote: So, for a to-do list, if I want to write a lengthy description for a to-do item, do I need to start the description on the next line without the stars (*) at the beginning? I guess that makes sense. See, I thought of the headlines more as a bulleted list and not just a section heading tree... If you have any suggestions or guidance, let me know. Either way, thanks for the sanity check. - Lex On Thu, Jun 9, 2011 at 11:58 PM, Darlan Cavalcante Moreira darc...@gmail.com wrote: I think this is the correct behaviour, since headlines cannot span multiple lines (as far as I know). This is also the case for the fill-paragraph command. If you try to call fill-paragraph in a headline nothing happens. -- Darlan At Thu, 9 Jun 2011 17:56:02 -0400, Lex Fridman lexfrid...@gmail.com wrote: I enable auto-fill (aka word wrap) with: (add-hook 'org-mode-hook 'turn-on-auto-fill) Now, while editting an org file, I check the minor modes with C-h m, and Auto-Fill is one of them. So when I type a long line it should automatically wrap, right? It does for regular text but NOT for when it's a headline (line starts with one or more *'s). I'm sorry if this is a trivial question, but I simply have not been able to find a solution. I'm using org-mode version 7.4 in emacs 23.2.1 on Ubuntu 11.04.
Re: [O] Define capture template with dynamic id target
Thanks David, I tried to follow your suggestion, but I found two problems (maybe because I know little about lisp). For instance, suppose I have a test.org file with the follow content --8---cut here---start-8--- * 2011 Every headline has an ID, but I have omitted here for brevity *** May * Sub-headline bla bla bla *** June * Sub-headline bla bla bla --8---cut here---end---8--- I want the capture process to add an entry to the Sub-headline of June. If I just use the file+headline and specify Sub-headline then it will add to the Sub-headline in May. That's why I tried using IDs in the first place. Also, every month I create a new month headline with the Sub-headline and the capture process should add an entry to that instead. That is the reason I wanted to get the ID from a function, instead of just writing it in the capture template. As far as I understand if I use the file+function target then the function must return the headline name, but how can I say that I want the Sub-headline of June and not of May? [first problem] I found an org-id-find function that returns something like (filename . characterPosition). Therefore, If there is a way to specify a position where org should start looking for the headline then I could use that to go to the correct Sub-headline. Also, the file+headline target will add the entry as a child of the specified headline, but file+function seems to add the entry as a sibling of the headline returned by the function. [second problem] Is this intended behaviour or is it a bug? -- Thanks again, Darlan At Fri, 10 Jun 2011 07:31:43 +0200, David Maus dm...@ictsoc.de wrote: [1 text/plain; US-ASCII (7bit)] At Thu, 09 Jun 2011 15:18:00 -0300, Darlan Cavalcante Moreira wrote: Hello List, I'm trying to create a few templates for org capture and I have found a weird behavior with the ID target type. It works OK if I use the ID directly like below #+begin_src emacs-lisp (id Junho2011Contas) #+end_src but it does not find the ID if I try to get it from a function, such as #+begin_src emacs-lisp (id (get-me-an-org-id-for-the-month Contas)) #+end_src Org capture does not support executing a function in the ID target spec. C-h v org-capture-templates RET target Specification of where the captured item should be placed. In Org-mode files, targets usually define a node. Entries will become children of this node, other types will be added to the table or list in the body of this node. Most target specifications contain a file name. If that file name is the empty string, it defaults to `org-default-notes-file'. A file can also be given as a variable, function, or Emacs Lisp form. Valid values are: (file path/to/file) Text will be placed at the beginning or end of that file (id id of existing org entry) File as child of this entry, or in the body of the entry ... You might use the `function' target spec (function function-finding-location) Most general way, write your own function to find both file and location HTH, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber dmj...@jabber.org Email. dm...@ictsoc.de [2 application/pgp-signature (7bit)]
[O] :table-line-pos is not document in the manual
While reading the manual, I noticed that the :table-line-pos property is not documented. It is documented in the org-capture-templates variable, but not in the manual. -- Darlan Cavalcante
[O] Define capture template with dynamic id target
Hello List, I'm trying to create a few templates for org capture and I have found a weird behavior with the ID target type. It works OK if I use the ID directly like below #+begin_src emacs-lisp (id Junho2011Contas) #+end_src but it does not find the ID if I try to get it from a function, such as #+begin_src emacs-lisp (id (get-me-an-org-id-for-the-month Contas)) #+end_src All the get-me-an-org-id-for-the-month function does is returning MonthnameYearArgument, in this case it returns Junho2011Contas. The definition is given below #+begin_src emacs-lisp (defun get-me-an-org-id-for-the-month (categoryName) Used only in my template for the expenses of the month. It return a suitable ID for the month sub-headline. (interactive) (concat (get-current-month) (get-current-year) categoryName) ) #+end_src -- Darlan
[O] [Bug] [Patch] List number start with the latex exporter
When using a numbered list it is possible to specify the start number using [@number] so that one can write 1. one 2. two 20. [@20] twenty 21. twenty one This works OK with the HTML exporter, but in the latex exporter the number will be one unity above the desired value. The reason why this happens is because the \item command in the enumerate environment in latex increments the counter before using it. Therefore, org-mode should set the enumeration counter to the desired value minus one. A patch is attached for the lisp/org-list.el file. -- Darlan Cavalcante diff --git a/lisp/org-list.el b/lisp/org-list.el index d72a284..efecaf5 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2947,7 +2947,7 @@ with overruling parameters for `org-list-to-generic'. :icount (let ((enum (nth depth '(i ii iii iv (if enum (format \\setcounter{enum%s}{%s}\n\\item -enum counter) +enum (- counter 1)) \\item )) :csep \n :cbon \\texttt{[X]} :cboff \\texttt{[ ]})
Re: [O] Auto-Fill (aka Word Wrap) of Headline Text
I think this is the correct behaviour, since headlines cannot span multiple lines (as far as I know). This is also the case for the fill-paragraph command. If you try to call fill-paragraph in a headline nothing happens. -- Darlan At Thu, 9 Jun 2011 17:56:02 -0400, Lex Fridman lexfrid...@gmail.com wrote: I enable auto-fill (aka word wrap) with: (add-hook 'org-mode-hook 'turn-on-auto-fill) Now, while editting an org file, I check the minor modes with C-h m, and Auto-Fill is one of them. So when I type a long line it should automatically wrap, right? It does for regular text but NOT for when it's a headline (line starts with one or more *'s). I'm sorry if this is a trivial question, but I simply have not been able to find a solution. I'm using org-mode version 7.4 in emacs 23.2.1 on Ubuntu 11.04.
[O] Feature request: two-letter combination for org-capture
Hello list, A nice feature of the org-agenda is the possibility to define two letter combinations for the custom commands. From the manual I could not see how to do this with org-capture and I'm guessing it is not possible right now. Of course one can always define a single letter template for each situation, but the same goes for the org-agenda and two-letter templates can help a lot with the organization (also finding good letter choices). Some use-case scenarios I can imagine: - Add todo items to specific projects (I know you can refile the note during the capture process, but this would be faster). All of the letters t and a project specific letter - Add a contact to a specific category: people using org-contacts could define different templates for work contacts and personal contacts, for instance. - Add a line to a specific table: Suppose you use tables in org to organize your expenses, but you have multiple tables, one for each kind of expense. You would be able to add one expense to a specific table (I'm not sure if refile from the capture buffer even works in this case). - Etc. -- Darlan Cavalcante