Re: [O] Org-babel and LaTeX letter
Thanks Thomas and Eric for responses! I wasn't trying to export at first. I think of export as a 'whole org- document' kind of thing, and I wanted to just have one TODO task (write a snail mail letter) completed without having to store a separate file for it. But I read the docs on export, and I can easily select a headline and then export just the current region. After updating the export class variable (I always use customize, as I am not that good at emacs lisp) it almost worked. My problem was that I did not have enough of the MacPorts texlive-* packages installed. I needed texlive-fonts-recommended and texlive- latex-extra (if anyone else cares). Googling for the broken \usepackage{} and texlive macports gave me a list of of what each package has. I don't know if I've got enough for any latex+org usage, but it finally spit out my letter. Good enough for today - I can avoid using a separate file for a paragraph. This isn't perfect though. I still have a spurious few lines in my tex file: : \maketitle : Some descriptive text to be emitted. Several lines OK. I've no idea where that comes from. Anybody have any ideas? For now, I edit the tex file before processing further, and it's good enough for today. Now perhaps is a good time to ask what the different workflows are for export, publish, babel and tangle. They seem to have overlapping functionality. My basic concept is: export : Your complete (or partial) org file in another form, like paper or on the web. For when emacs isn't around and you don't want to forget what your orgmode file says, or for giving a copy of the data in your org file to someone who doesn't appreciate emacs. # +begin_latex blocks belong to this export. publish : export more than one org file. I've no idea what use case makes publish different than export. babel : use for including chunks of code in an org file. Base use case simply allows you to easily edit them in a native emacs mode while still having them organized into your run-of-the-mill org file. Also allows code blocks to be printed more nicely (in color? with line numbers?) which doesn't happen in 'export' Secondary use case allows you to execute the code blocks #+begin_src and #+results: blocks belong to babel. I plan on using ledger in babel blocks to store my often executed queries, even though most of the 'code' is on the command line. tangle : use case - lets you have lots of code blocks organized in an orgmode file become a complete, compilable program. Normally the orgmode syntax would cause a complier to choke, so tangle removes the orgmode structure. Added bonus: lets different programs co-operate in a single orgmode file. Like a makefile on steroids? #+begin_src blocks can belong to tangle, too. n While the orgmode documentation does a great job of explaining how to configure the details of each process, I feel like I'm missing the 'how do I pick the feature that solves the problem I have right now' part. Probably because each feature is flexible enough to be used in overlapping ways. But as always, I'm grateful for the orgmode, the wonderful documentation, the customize-able options, and the great help I get when I turn to the mailing list. You all rock! -Ben On 2011-Sep-06, at 17:58, Thomas S. Dye wrote: Aloha Ben, I'm not sure I understand what you are doing here, so please excuse me if I'm offering misplaced advice. Ben Alexander writes: Hello orgmode and latex users! I'm trying to use a latex to write a letter, and I'm using an org babel block to hold the original source. There are (at least) two ways to create a tex file from Org-mode: 1) export the Org-mode buffer, and 2) tangle latex code blocks. IIUC, you appear to be setting up code blocks for tangling, but then are using the export facilities. See http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-4 for instructions on how to change the Org-mode export class. The funny thing is, if I run pdflatex from the command line, it works fine. Though it doesn't have as many lines of diagnostic output. I think the wrapping code for babel execution of latex code is the issue. I'd be happy to install more tex files. I use MacPorts to maintain my system; perhaps I am missing a tex package that is needed? I don't know about the macports distribution of LaTeX, but it seems odd to me that latex works fine from the command line but then can't find wrapfig.sty when it is called from Org-mode. Perhaps the place to start debugging this is the variable org-latex-to-pdf-process, see http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-8. hth, Tom Any pointers would be helpful. -Ben ORG file * trial of latex #+begin_src latex :file
[O] Org-babel and LaTeX letter
Hello orgmode and latex users! I'm trying to use a latex to write a letter, and I'm using an org babel block to hold the original source. I've whittled down my latex code to one word and it still isn't working for me. I've included the code block and the pdflatex output buffer. I notice that the default style is 'article'. Is there some way to remove the article style and use a letter instead? The funny thing is, if I run pdflatex from the command line, it works fine. Though it doesn't have as many lines of diagnostic output. I think the wrapping code for babel execution of latex code is the issue. I'd be happy to install more tex files. I use MacPorts to maintain my system; perhaps I am missing a tex package that is needed? Any pointers would be helpful. -Ben ORG file * trial of latex #+begin_src latex :file letter.pdf Hello #+end_src BUFFER *Org PDF LaTeX Output* shows the following (first and last few lines only) This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/MacPorts 2011_1) restricted \write18 enabled. entering extended mode (/var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/-Tmp-/babel-58334TCg/ latex-58334gM m.tex LaTeX2e <2009/09/24> Babel and hyphenation patterns for english, dumylang, nohyphenation, lo aded. (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class .lines of output omitted.. ! LaTeX Error: File `wrapfig.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. l.13 \usepackage {soul}^^M ! ==> Fatal error occurred, no output PDF file produced! Transcript written on /var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/- Tmp-/babel-5 8334TCg//latex-58334gMm.log. Xander$ port list installed and texlive* texlive-basic @23152 tex/texlive-basic texlive-basic @23152 tex/texlive-basic texlive-bin@2011 tex/texlive-bin texlive-bin@2011 tex/texlive-bin texlive-common @2011 tex/texlive-common texlive-common @2011 tex/texlive-common texlive-documentation-base @23160 tex/texlive- documentation-base texlive-documentation-base @23160 tex/texlive- documentation-base texlive-generic-recommended@23088 tex/texlive-generic- recommended texlive-generic-recommended@23088 tex/texlive-generic- recommended texlive-latex @23089 tex/texlive-latex texlive-latex @23089 tex/texlive-latex texlive-latex-recommended @23089 tex/texlive-latex- recommended texlive-latex3 @19447 tex/texlive-latex3 texlive-xetex @23080 tex/texlive-xetex
Re: [Orgmode] Bug: org-mobile "Bad file encoding" [6.33trans]
Well, the problem came back :-( I tried to go to the agendas.org file on my WebDAV server and save it in utf-8 manually (using the command M-x set-buffer-file-encoding utf-8) but because the checksums.dat don't change, the iPod doesn't reload the newly saved file. So I deleted checksums.dat and then it copied all the files and the agendas.org file showed up properly. Then I tried one more time, making a small change on my laptop and trying to save the agendas.org file manually *before* doing a sync on the iPod, and now I can't make it work. The agendas.org file is the only file that won't display at all, giving the "Bad file encoding" message instead of the file text. Yet on the WebDAV share, from my laptop, I can cat the file, no problem. I have now removed the only non-ascii character from my org file that is picked up by the agenda (the letter ă, lowercase-a-with-breve- accent). And so now there is no 'bad-encoding'. Clearly there is some emacs magic going on here, because I thought of trying the £ symbol, but in another, smaller, file, and when I tried to save the file, I was told: These default coding systems were tried to encode text in the buffer `birthdays.org': iso-8859-2-unix However, each of them encountered characters it couldn't encode: iso-8859-2-unix cannot encode these: £ I thought the earlier emacs code specified utf-8 as the default coding system Strangely (to me) the a-with-breve did not have an issue in the default coding system. I once had a problem with my original org files, but now I can't recreate that problem either. Sorry to bring bad news. On 2009-Nov-23, at 20:53, Ben Alexander wrote: I added the following lines (to my ~/.emacs file), as suggested by Richard and they work immediately. For what it's worth, I am running on Mac OS X 10.5.8 on an Intel MacBook, and I've had it for a few years and tweaked any number of little things. This may be a 'default' problem, but it might also be just because I've copied old customization buffers forward from other machines. Thanks, Richard, for the tip, and thanks to all the rest of you for the org-mode community. -Ben On 2009-Nov-23, at 02:37, Richard Moreland wrote: Hi Ben, I'm replying off-list because I'm not sure this is the answer, but: (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (setq default-buffer-file-coding-system 'utf-8) Between that mess of options, it seems that you be able to have your files default to UTF-8 (which is the encoding MobileOrg is looking for). If this works for you, would please let the list know so the solution is archived? I'll also update the website with the appropriate details. Thanks! Richard On Nov 22, 2009, at 3:20 PM, Ben Alexander wrote: Thanks for org-mode and MobileOrg! I'm very grateful for all the helpful hints I've seen on the mailing list too. I an have a small problem with MobileOrg. After doing an org-mobile-push and syncing the results to the iPod touch, the agendas.org file doesn't appear on the iPod. Instead, it appears as if the only heading is "Bad file encoding" and the body text is "Unable to detect file encoding, please re-save this file using the proper encoding. At first I thought it was because I've got things like the pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex characters in my text (some of which contains Romanian, hence the especially odd t-with-a-comma). But I'm pretty sure I've expunged those characters from my files, and anyway, the agendas.org file should only contain the characters that my original org files contain. So, I'm happy enough to use the proper encoding, but I don't know what that is, and I don't save the adgendas.org file myself: org-mobile- push must do that on my behalf. If it is relevant, I am using a 5dollarhosting.com website for my webdav server, not my local machine, so I don't have complete control over the webserver configuration. I'm stumped as to what I should try next. Any pointers will be appreciated, Ben Alexander == Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c Package: Org-mode version 6.33trans current state: == (setq org-remember-default-headline "Remember Tasks" org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight bold)) org-special-ctrl-a/e t org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0 11 (face org-warning)) nil) ("A" "Angella related questions" t
Re: [Orgmode] Bug: org-mobile "Bad file encoding" [6.33trans]
I added the following lines (to my ~/.emacs file), as suggested by Richard and they work immediately. For what it's worth, I am running on Mac OS X 10.5.8 on an Intel MacBook, and I've had it for a few years and tweaked any number of little things. This may be a 'default' problem, but it might also be just because I've copied old customization buffers forward from other machines. Thanks, Richard, for the tip, and thanks to all the rest of you for the org-mode community. -Ben On 2009-Nov-23, at 02:37, Richard Moreland wrote: Hi Ben, I'm replying off-list because I'm not sure this is the answer, but: (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (setq default-buffer-file-coding-system 'utf-8) Between that mess of options, it seems that you be able to have your files default to UTF-8 (which is the encoding MobileOrg is looking for). If this works for you, would please let the list know so the solution is archived? I'll also update the website with the appropriate details. Thanks! Richard On Nov 22, 2009, at 3:20 PM, Ben Alexander wrote: Thanks for org-mode and MobileOrg! I'm very grateful for all the helpful hints I've seen on the mailing list too. I an have a small problem with MobileOrg. After doing an org-mobile-push and syncing the results to the iPod touch, the agendas.org file doesn't appear on the iPod. Instead, it appears as if the only heading is "Bad file encoding" and the body text is "Unable to detect file encoding, please re-save this file using the proper encoding. At first I thought it was because I've got things like the pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex characters in my text (some of which contains Romanian, hence the especially odd t-with-a-comma). But I'm pretty sure I've expunged those characters from my files, and anyway, the agendas.org file should only contain the characters that my original org files contain. So, I'm happy enough to use the proper encoding, but I don't know what that is, and I don't save the adgendas.org file myself: org-mobile- push must do that on my behalf. If it is relevant, I am using a 5dollarhosting.com website for my webdav server, not my local machine, so I don't have complete control over the webserver configuration. I'm stumped as to what I should try next. Any pointers will be appreciated, Ben Alexander == Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c Package: Org-mode version 6.33trans current state: == (setq org-remember-default-headline "Remember Tasks" org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight bold)) org-special-ctrl-a/e t org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0 11 (face org-warning)) nil) ("A" "Angella related questions" tags #("angella" 0 7 (face org-warning)) nil) ("u" "unscheduled" todo #("TODO|DEFER" 0 10 (face org-warning)) ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote regexp) "<[^>\n]+>"))) (org-agenda-overriding-header "Unscheduled TODO entries: ") (org-agenda-sorting-strategy (quote (todo-state-up ) ) org-agenda-files '("/Users/ben/Reference/GTD/Reference.org" "/Users/ ben/Reference/GTD/birthdays.org" "/Users/ben/Reference/GTD/ craiova.org" "/Users/ben/Reference/GTD/diary.org" "/Users/ben/ Reference/GTD/filetabs.org" "/Users/ben/Reference/GTD/projects.org") org-agenda-include-diary t org-agenda-window-setup 'current-window org-hide-leading-stars t org-completion-use-ido t org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-skip-timestamp-if-done t org-after-todo-state-change-hook '(org-clock-out-if-current) org-agenda-todo-ignore-scheduled t org-odd-levels-only t org-log-state-notes-insert-after-drawers t org-special-ctrl-k t org-agenda-sorting-strategy '((agenda time-up tag-up) (todo category-keep priority-down) (tags category-keep priority-down) (search category-keep)) org-deadline-warning-days 7 org-stuck-projects '("/PROJECT" ("TODO" "BUY") nil "") org-export-preprocess-hook '(org-export-blocks-preprocess) org-mobile-inbox-for-pull "~/Reference/GTD/from-mobile.org" org-tab-first-hook '(
[Orgmode] Bug: org-mobile "Bad file encoding" [6.33trans]
Thanks for org-mode and MobileOrg! I'm very grateful for all the helpful hints I've seen on the mailing list too. I an have a small problem with MobileOrg. After doing an org-mobile-push and syncing the results to the iPod touch, the agendas.org file doesn't appear on the iPod. Instead, it appears as if the only heading is "Bad file encoding" and the body text is "Unable to detect file encoding, please re-save this file using the proper encoding. At first I thought it was because I've got things like the pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex characters in my text (some of which contains Romanian, hence the especially odd t-with-a-comma). But I'm pretty sure I've expunged those characters from my files, and anyway, the agendas.org file should only contain the characters that my original org files contain. So, I'm happy enough to use the proper encoding, but I don't know what that is, and I don't save the adgendas.org file myself: org-mobile-push must do that on my behalf. If it is relevant, I am using a 5dollarhosting.com website for my webdav server, not my local machine, so I don't have complete control over the webserver configuration. I'm stumped as to what I should try next. Any pointers will be appreciated, Ben Alexander == Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c Package: Org-mode version 6.33trans current state: == (setq org-remember-default-headline "Remember Tasks" org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight bold)) org-special-ctrl-a/e t org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0 11 (face org-warning)) nil) ("A" "Angella related questions" tags #("angella" 0 7 (face org-warning)) nil) ("u" "unscheduled" todo #("TODO|DEFER" 0 10 (face org-warning)) ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote regexp) "<[^>\n]+>"))) (org-agenda-overriding-header "Unscheduled TODO entries: ") (org-agenda-sorting-strategy (quote (todo-state-up ) ) org-agenda-files '("/Users/ben/Reference/GTD/Reference.org" "/Users/ ben/Reference/GTD/birthdays.org" "/Users/ben/Reference/GTD/craiova.org" "/Users/ben/Reference/GTD/diary.org" "/Users/ben/ Reference/GTD/filetabs.org" "/Users/ben/Reference/GTD/projects.org") org-agenda-include-diary t org-agenda-window-setup 'current-window org-hide-leading-stars t org-completion-use-ido t org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-skip-timestamp-if-done t org-after-todo-state-change-hook '(org-clock-out-if-current) org-agenda-todo-ignore-scheduled t org-odd-levels-only t org-log-state-notes-insert-after-drawers t org-special-ctrl-k t org-agenda-sorting-strategy '((agenda time-up tag-up) (todo category- keep priority-down) (tags category-keep priority-down) (search category-keep)) org-deadline-warning-days 7 org-stuck-projects '("/PROJECT" ("TODO" "BUY") nil "") org-export-preprocess-hook '(org-export-blocks-preprocess) org-mobile-inbox-for-pull "~/Reference/GTD/from-mobile.org" org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide- block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-cycle-global-at-bob t org-confirm-shell-link-function 'yes-or-no-p org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "DONE(d!)") (type "PROJECT(p)" "CLOSED(c!)") (sequence "BUY(b)" "BOUGHT(B!)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file "~/Reference/GTD/projects.org" org-directory "~/Reference/GTD/" org-tag-alist '((:startgroup) (#("ben" 0 3 (face nil)) . 98) (#("angella" 0 7 (face nil)) . 97) (#("vendor" 0 6 (face nil)) . 118) (:endgroup) (:startgroup) (#("us" 0 2 (face nil)) . 117) (#("london" 0 6 (face nil)) . 108) (#("romania" 0 7 (face nil)) . 114) (:endgroup) (:startgroup) (#("@home" 0 5 (face org-todo)) . 104) (#("@phone" 0 6 (face nil)) . 112) (#("@out" 0 4 (face nil)) . 111) (#("@computer" 0 9 (face nil)) . 99) (:endgroup)) org-cycle-hook '(org-cycle-hide-archi
[Orgmode] Keeping org files under git - trimming the repository
Hello all. This is really more of a git question, but I keep my org file stored under git and I've seen other people on this list speak of doing the same. Different people cite different benefits: + keeping home and work copies of todo.org in sync + storing todo.org on a USB stick for transport instead of using a network + safety while editing. If a slip of the fingers hits C-k on a folded line and you don't notice it for a long time, git allows you to find when that happen (git blame) and 'cherry-pick' a patch to bring the lost subtree forward in time. I don't really know how to do any of these things in git, but that's what you all say :-) About a year ago, I decided to learn how to write "macros" in lisp and started by teaching myself about the after-save-hook. I added a hook to auto commit every time I saved any org file. My simple, small text file of todo items is now a giant git repository. At last a question or two: Does this happen to you? What do you do? What new git command do I need to learn in order to do it? Is there some way to clone my git repo onto my USB stick, but make it a subset instead of the whole thing? That would be useful for me to learn for other git projects! Just curious! (and thanks to you all for the interesting discussions and excellent tool!) -Ben ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Does this happen to you? Aquamacs messes with you! (but I still like my Mac)
Hi Kevin, I'm sorry I didn't see this until just now, and it doesn't appear that anyone else has answered you. (I've moved to Romania, so I've been busy. No, really! Craiova!) The short answer is "I don't remember". But upon looking at my customization file in Aquamacs, I find the following line in my custom-set-faces code block: '(org-column-title class color) (min-colors 16) (background light)) (:inherit fixed-pitch :background "grey90" :underline t :weight bold which makes me think it that you need to customize the org-column- title face (Options -> Customize Emacs -> Specific Face -> then type with completion org-column-title). I think I left everything alone, but added an entry to the 'Inherit' list. I have the word 'fixed-pitch' without the quotes as my sole entry. I hope that helps you out, Ben Alexander On 2009-Mar-16, at 12:09, Kevin Brubeck Unhammer wrote: Ben Alexander <[EMAIL PROTECTED]> writes: (I have FINALLY got a fixed width font for the tab bar, so my column mode headings line up with the text in the buffer!!! How did you do this? I think I had them lined up in an earlier Aquamacs version, but I see now they don't line up any longer. I don't use column mode much, but if it's like this I'll never even start using it... (I tried setting the fonts via Options->Appearance->Font for org-mode, but I notice it doesn't change the headline font, see http://bayimg.com/gaOHeAAbF for when I chose a huge font.) best regards, Kevin ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Release 6.22
Hi Saurabh, I had fancy ideas once, and I've gone nowhere with them. I used org- map-entries to convert an org-mode file into an acceptable input file for ledger. See my note to the org-mode list at : http://groups.google.com/group/ledger-cli/browse_thread/thread/cba54edf065c7623 I haven't followed up on my new year's resolution because I had to move overseas instead. Any org-mode users in Romania? -Ben On 2009-Feb-10, at 12:05, Saurabh Agrawal wrote: Just yesterday night, I was thinking of an extension for basic double book accounting, wherein we can use TODO type keywords for Debit/Credit and Tags for account names. For each accounting entry to succeed, there should be two entries compulsorily, as is the rule for double book keeping. Then, there should be a pane on the left side maybe, updating different accounts (such as cash, bank, food, books etc.) real time. Finally, some report to show the transaction for a particular a/c (ie Tag) can be generated. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Updating the [/] and [%]
I'm not really surprised by this: headlines are really important in org-mode, but I tried it anyway. Org-mode version 6.15a "GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of 2008-09-21 on plume.sr.unh.edu - Aquamacs Distribution 1.5" On Mac OS X.5 The surprising this was that I got the message "Checkbox statistics updated in entire file (0 places) in *both* tests below! I normally use C-c C-c twice if all I need to do is update a checkbox after some kind of manual edit, so I'd never noticed this. -Ben On 2008-Dec-21, at 02:06, Eddward DeVilla wrote: Well, C-u C-c # is supposed to do it, but I just found a bug in 6.13a that's in Gentoo. Given the file = - [/] f - [ ] d - [ ] v - [X] g = pressing C-u C-c # displays the message "Checkbox satistics updated in entire file (0 places)" but does nothing, as it says. Given the file === * foo - [/] f - [ ] d - [ ] v - [X] g === pressing C-u C-c # updates the [/] token correctly. Can someone try this in on something more recent? Edd On Thu, Dec 18, 2008 at 7:17 PM, Bernt Hansen wrote: Jari Aalto writes: How do I force update of the [/] and [%] markers. Many times they don't follow item are edited, added, copied manually. For a checkbox list just C-c C-c on any checkbox to change the state twice. For TODO subtasks change the todo keyword with shift-left and shift-right -Bernt ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] reference to same row in spreadsheet
How about adding a customizable variable which defaults to nil. (Call it org-use-new-spreadsheet-semantics). If it is nil, whenever the new syntax is used, raise a warning. The warning could be: 1. just a message to the echo area 2. inserted into the top of the updated table 3. an error which aborts spreadsheet calculations This pushes the responsibility onto users to check their tables before they set the option. So I'm thinking it's unfair to make that an org-wide setting... More thinking... Another option is to include a file only variable like this #+ORG_VERSION: [6.2]-- or #+ORG_VERSION: --[6.2] The first option would cause old versions of org-mode to abort processing, and the second would cause new versions to abort. This might help with any and all future changes to syntax, and perhaps allow users to mark the files they don't want to change yet. Perhaps, if they are careful, they'll be able to load a different version of org-mode to process an individual file. I'm reminded of something I had learned about perl, long ago. If Carsten and community like this, perhaps someone could suggest the most elisp like way of doing version comparisons. Failing that, I'd suggest looking at the perl way of doing it, which allowed for multiple dots in the version string 1.0 < 2.0 < 3.0 < 10.0 < 20.0 < 100.0 and 1.0< 1.1 < 1.2 < 1.100 < 2.0 I think (but can't remember) that version numbers had to have pairs of digits (1.1.1 was illegal you had to use 1.1.1.0). There must have been a reason OR I'm wrong about the requirement. Just my musings On 2008-Dec-18, at 16:25, Carsten Dominik wrote: You are right, this is an incompatible change. Dammit. What should do? Opinions? The problem is that this change may lead to older tables evaluated incorrectly. I do like the new convention and think that @+0 or leaving out the row specifications are good alternatives - but maybe we are obliged to keep the old convention - Carsten On Dec 18, 2008, at 4:01 PM, Stephan Schmitt wrote: Hello, the reference to the last row @0 led to incompatible changes: * spreadsheet: relative reference to same row (using Org mode version 6.15d) The Org mode version 6.15 introduced @0 as a reference to the last row for spreadsheet (org-table) formulas. This leads to problems if you used it as reference to the same row before. - description from [[http://orgmode.org/Changes.html][Org-mode list of user-visible changes]]: Spreadsheet references to the last table line. You may now use @0 to reference the last dataline in a table in a stable way. - according to [[info:org:References]]: `0' refers to the current row and column. Also, if you omit either the column or the row part of the reference, the current row/column is implied. However this doesn't work since @0 refers to the last line. If you press `C-c *' with the cursor inside the tables below, the second column should contain the doubled value of the first. ** @0 refers to last line |---+---| | 1 | 4 | | 2 | 4 | |---+---| #+TBLFM: $2...@0$-1 this has worked before as reference to the same row, now it refers to the last row ** bug: omitting explicit reference |---+| | 1 | #ERROR | | 2 | #ERROR | |---+| #+TBLFM: $2=2*$-1 this seems to be a bug, should refer to the same row ** @+0 refers to same row |---+---| | 1 | 2 | | 2 | 4 | |---+---| #+TBLFM: $2...@+0$-1 works as expected Greetings, Stephan ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-mode and ledger cli accounting
*** org-mode and ledger cli accounting - two great tastes that taste great together :PROPERTIES: :COLUMNS: %16LEDGER_DATE %5LEDGER_REFERENCE %10ITEM %25LEDGER_ACCOUNT %10AMOUNT :END: * TODO Email the org-mode and ledger mailing lists I'm starting to use 'ledger' (http://www.newartisans.com/software/ledger.html ). There is an emacs mode for editing the native plain text file format, but I really like the org-mode UI. Date handling is great (imho) and column mode holds some promise (although I find it awkward to add a new headline while in column mode). And remember templates could ease data entry, too I think it would be great to use 'ledger' backend computation and org- mode's UI together! After a quick exchange of emails where I asked about the future plans of 'ledger' I was told that a new file format for 'ledger' could be added, if the org-mode community decided on a common format. I'd like to suggest a format, get some feedback on it, and get a sense of how many others are interested. I'm hoping to interest org- mode users in ledger, and ledger users in org-mode! As a temporary measure, I've used the org-map-entries API to iterate over entries looking for properties of the form "LEDGER_.*" to extract the appropriate details, format them like the current plain text 'ledger' file. Since there's a lot about 'ledger' I don't know (as well as elisp, org-mode, git, programming in general, accounting) I'd expect that my code will be ineffecient, inelegant, and dangerous. It comes with no warrenty. If you have some programming skills, I'd appreciate feedback on style, design, tests and documentation. For example, I'd like to use a :LEDGER: drawer instead of polluting the :PROPERTIES: namespace, but then I'd miss out on the easy org-entry-get API. Any suggestions? Here's an example tree, with a column-mode definition above, and a single minimal entry below. Here's how to use it at the moment (caveat, I wrote this assuming you already have ledger (the shell program) downloaded and ledger.el in your loaded into emacs. * How to use the sample code and data 1. In the file bens-org-ledger.el, modify the variable bens-org-ledger- file-name to point to a file you don't mind overwriting without warning. (Did I mention that my code might be dangerous?) 2. Load bens-org-ledger.el 3. Run the defun (bens-org-ledger) while the current buffer contains this org-tree 4. Now (find-file bens-org-ledger-file-name). In my setup, the extension automaticaly loads ledger.el and the file is in ledger-mode. 5. C-c C-o C-r reg in a ledger-mode buffer (visting a native ledger file) will run a basic register report. Try C-c C-o C-r bal for a basic balance report. * Wegman's :PROPERTIES: :LEDGER: entry :LEDGER_DATE: [2008-11-07 Fri] :LEDGER_REFERENCE: chq 1001 :END: *** :PROPERTIES: :LEDGER: transaction :LEDGER_ACCOUNT: Expenses:Food and Drink:Groceries :LEDGER_AMOUNT: -£10.00 :END: Since all text except the headline and specific properties is ignored, I can comment my transactions with body text! *** Assets:Checking :PROPERTIES: :LEDGER: transaction :LEDGER_DATE: [2008-11-13 Thu] :END: Instead of using the :LEDGER_ACCOUNT: property, I can use the headline. Properties come with completion (big win!) but headlines are easier to see outside of column mode. Also, in this case, the :LEDGER_DATE: property is ignored. Maybe it should become the 'effective date' in the future? *** This is my lisp code, from a file named bens-org-ledger.el It starts from the comments below to the end of the message. I'm sorry to be wordy but I thought having something that could be used (even awkwardly) would jump start the conversation ;; I'm naming every function I can with the bens-org-ledger prefix, ;; because these are temporary, pre-alpha attempts, intended to ;; elict comments from real programmers ;; ;; This code is copyright Ben Alexander ;; You have license to use, copy, and create derivative works ;; under the terms of the General Public License (version 2 or later). ;; (defvar bens-org-ledger-file-name "bens-org-ledger-sample.ledger" "This variable is the name of a file that will be overwritten during the processing of an org-mode file. OVERWRITTEN WITHOUT WARNING!") ;; except for this warning here (defun bens-org-ledger-create-entry () "this function retreives the LEDGER_DATE, LEDGER_REFERENCE (if it exists), and the LEDGER_DESCRIPTION properites of the current headline and formats them as the beginning of a new le
[Orgmode] Re: Help with org-map-entries and property searches
Genius! Thanks! On 2008-Dec-17, at 15:46, Bernt Hansen wrote: Ben Alexander writes: However, all of the following attempts to search for both kinds of (or all) values fail (no error, just the wrong value). What am I doing wrong? Try this: (add 2 more \ characters before the |) (length (org-map-entries t "+LEDGER={transaction\\\|entry}")) => 3 HTH, Bernt ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Help with org-map-entries and property searches
Hi, I'm trying to code lisp, and it's slow going for me. I was hoping someone with a few spare cycles could explain why this doesn't work the way I expect. I typed the following code into an org file and hit C-x C-e (eval-last-sexp): (length (org-map-entries t "+LEDGER=\"entry\"")) => 1 (length (org-map-entries t "+LEDGER=\"transaction\"")) => 2 This looks good: I do have two headlines with a property called LEDGER where the value is "transaction" (no quotes) However, all of the following attempts to search for both kinds of (or all) values fail (no error, just the wrong value). What am I doing wrong? (length (org-map-entries t "+LEDGER={\"transaction\"\|\"entry\"}")) => 0 (length (org-map-entries t "+LEDGER={transaction\|entry}")) => 0 (length (org-map-entries t "+LEDGER=entry")) => 0 (length (org-map-entries t "+LEDGER")) => 0 I was inspired by this example of a property search from the org info page (section 7.3) +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 \ +With={Sarah\|Denny}+SCHEDULED>="<2008-10-11>" I've tried this in GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of 2008-09-21 on plume.sr.unh.edu - Aquamacs Distribution 1.5 and GNU Emacs 22.3.1 (i386-apple-darwin9.5.1, Carbon Version 1.6.0) of 2008-11-07 on Xander.local (compiled via MacPorts) Org-mode version 6.15a in both. I also got the same results when I did it after a 'start-vanilla- aquamacs' (thanks to William Henney for the tip!) Thanks, Ben ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Idea for org-mode add on - org-console
On 2008-Nov-25, at 17:00, [EMAIL PROTECTED] wrote: From: Richard Riley <[EMAIL PROTECTED]> Date: 25 November 2008 14:24:18 GMT To: org-mode Subject: [Orgmode] Idea for org-mode add on - org-console I love org-mode. It is perfect for things like a work journal/ daily "work done" diary. I would love an org mode console. Reading what you described made me think of James TD Smith & Carsten's comments (Date: 25 November 2008 11:46:19 GMT) about a two key sequence to org-remember. If there were a way to designate a particular buffer for the prompting of org-remember (can Emacs have two mini-buffers?) then you could make a frame with two windows. The top buffer is just an org-remember buffer and hitting C-c C-c would prompt you for the template to apply. Then all that would need to be added is to automatically re-enter the org-remember buffer. Would it cause a stack explosion if the (imaginary) org-remember-after- filing-hook called org-remember again? I'll add that for my own purposes (and mainly because my remember- templates are rather primative) I find that one remember buffer can add multiple todo entries. I just keep on adding headlines with M-S- (org-insert-todo-heading) while my brain is hot with ideas before I hit C-c C-c (org-ctrl-c-ctrl-c). If I think I need to immediately refile, that's what C-u C-c C-c is for :-) Question about a console mode: Are you thinking of something like a shell buffer in emacs, where you have a default directory (org analogy: org-buffer/headline); access to history with M-p and M-n; where the buffer grows longer as you enter items. Or are you thinking that the buffer would be cleared to blank every time you hit C-c C-c (what I was assuming while writing the above paragraph) -Ben___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] RFC: Improvements to org-remember
On 2008-Nov-24, at 04:25, [EMAIL PROTECTED] wrote: From: James TD Smith <[EMAIL PROTECTED]> Date: 24 November 2008 01:25:57 EET To: emacs-orgmode@gnu.org Subject: [Orgmode] RFC: Improvements to org-remember * New features ** Adding non-headline items That's a fantastic idea! ** Updating completion statistics ** Automatic sorting Right now, I have a :SORT: property in my property drawer which looks like: :SORT: C-c S-6 p This is just a reminder to me for the key chord I need to play to get the sort I want. It's conveniently located near the headline and not too hard to open and read when I need to resort manually. It seems to me that having an hook like 'org-remember-after-filing would allow people to choose what kinds of updating they wanted done after a remember template was used. Mixing this with different types of templates may take some care: you don't want to run all the hooks inside a save-excursion if the point to to allow the hook to move point to a special place, but then all hooks would have to be written with that in mind. Perhaps the hooks should be run inside a (let ) with some official bindings for markers for the following: - org-remember-marker-to-beginning-of-new-text - org-remember-marker-to-end-of-new-text - org-remember-marker-to-parent-headline (perhaps most useful for non-headline remember templates) - org-remember-template-type But automatic sorting seems useful in many other contexts (like after scheduling or rescheduling an item, or changing priority, or editing the headline text) so perhaps some wishes/ideas from the list would be appropriate. Could org-mode take ownership of the :SORT: property for headlines, and have a org-sort-file-using-property (or a org-sort- headline-using-property) which could be added to hook lists where-ever the user wanted? Or is this too specific? Would it be nice to have plain lists (or checkboxed lists) have some kind of sort property too? Where could a user store this data so it could be easy to see but also easy to ignore.___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Does this happen to you? Aquamacs messes with you! (but I still like my Mac)
I normally use Aquamacs. It's very pretty, and uses the mouse without having to start an X server. But I'm starting to get a bit cheesed about all the things that don't work with org-mode (I have FINALLY got a fixed width font for the tab bar, so my column mode headings line up with the text in the buffer!!!) New problem: I have a very simple org mode buffer * TODO Mealplans ** Mealplan Fri If I go into column view and my cursor is the beginning of the file and I hit the down arrow, my cursor moves to the beginning of the next column (From the default column of ITEM to TODO). This happens everywhere, somewhat randomly. I switched to the command line version of emacs, and this didn't happen. My first thought was to check keyboard bindings. In emacs C-n and map to next-line, but in Aquamacs they map to visual-line- down. If I toggle visual-line-mode, the problem goes away (under quick testing) My question for the list. 1) Does anyone use visual-line-mode with org? Use it and like, I mean. 2) How did this happen to me? Is this an Aquamacs default that I can customize back to 'normal'? I can't find visual-line-mode documented in the info pages for Emacs. 3) On my mode line, I have a (Org vl Fill). the 'vl' does not go away when I toggle visual-line-mode. What is that? Another irritant lurking? --- Ok, I let this email sit awhile (never click send when angry!) If anyone else is living with this, I have an answer for 2) and 3) 2) Answer: Aquamacs has a customization group 'Aquamacs Is More Than Emacs'. This will be my first stop for the next irritation . 3) Answer: That customization group has an option for 'global-visual- line-mode'. Toggle that and the 'vl' goes away. Just in case anyone is wondering (because of all my complaining), I should advertise that Mac OS is a great machine for emacs users. For example, I'm still using Apple's Mail program and many emacs key strokes work auto-magically. C-n and C-p work visually, and C-f and C- b work normally, and C-a and C-e work on logical lines. Even C-k and C-y just work inside of most of the UI textboxes. Strangely, killing a line means you can yank it, even into another window, but it's a different clipboard than cmd-C and cmd-V. Even C-t works. Alas, C-u C- f does NOT work. None of this seems documented, so I don't know what other easter eggs are lurking, but I don't get frustrated moving from my org-mode buffer into an Apple Mail window just because of the typing. Aquamacs does let transient mark mode with with the shift-mouse-click, and cmd-C lets me pull text out of Aquamacs and into Mail. I'd bet that many of you on a mac already know this because of how hard it is to NOT type a C-p when you want to go up! Anyway, thanks for listening to the rant, and I hope it helps someone out there. -Ben Alexander ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] small doc patch
'teh' changed to 'the' --->% diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 8dd31c8..3991a21 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -409,7 +409,7 @@ t, also all archive files associated with the current select files will be included.") (defcustom org-agenda-skip-comment-trees t - "Non-nil means, skip trees that start with teh COMMENT keyword. + "Non-nil means, skip trees that start with the COMMENT keyword. When nil, these trees are also scand by agenda commands." :group 'org-agenda-skip :type 'boolean) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Problem with org-toggle-timestamp-type
Hi! I'm cannot figure out how to use version control in general, and git in particular. However, I think there is a mistake with org-toggle- timestamp-type. Currently, the message always returns "Timestamp is now active" regardless of wether it is or not. I think this is because the message is not inside the save-excursion block, so we can't be sure whether point was outside the timestamp (just in front) or inside (at the very end). Inside save-excursion, I think it is always moved to the end, does the edit, and is moved outside. Also, I think the sense of the test is backwards. And for some reason (if (equal (char-before) ?]) "in" "") didn't work (went to elisp debugger). I can't read lisp, it's beyond me. So here's the change I made (to org-version 6.10c) (defun org-toggle-timestamp-type () "Toggle the type ( or [inactive]) of a time stamp." (interactive) (when (org-at-timestamp-p t) (save-excursion (goto-char (match-beginning 0)) (insert (if (equal (char-after) ?<) "[" "<")) (delete-char 1) (goto-char (1- (match-end 0))) (insert (if (equal (char-after) ?>) "]" ">")) (delete-char 1) (message "Timestamp is now %sactive" (if (equal (char-before) ?>) "" "in") There's something else, and this might very well because my git repo is not what emacs is actually running, and my modified Makefile install target might be foobar. If I have a timestamp that looks like <2009-01-29 Thu>--<2009-01-29 Thu> and the cursor is in front of the first > symbol and then I hit the S- twice, my timestamp no longer is a range. It now looks like [2009-01-30 Fri] I tried to look at the org-ts[r]?-regexp-* variables, but my eyes crossed. Plus, I'm very afraid that any change I'd make would add parentheses, and thereby screwup every (match-begin 8) in the code. TFOM* Ben footnotes * TFOM = Thanks for Org-Mode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Problem with org-toggle-timestamp-type
I apologize if this is a repeat. It's in my sent items, but I haven't seen it on the list yet. I edited the message bit, and added a bit more: Hi! I cannot figure out how to use version control in general, and git in particular. So I can't generate a proper patch. However, I think there is a mistake with org-toggle-timestamp-type. Currently, the message always returns "Timestamp is now active" regardless of whether it is or not. I think this is because the message is not inside the save-excursion block, so we can't be sure whether point was outside the timestamp (just in front) or inside (at the very end). Inside save-excursion, I think it is always moved to the end, does the edit, and is moved outside. Also, I think the sense of the test is backwards. And for some reason (if (equal (char-before) ?]) "in" "") didn't work (went to elisp debugger). I can't read this much lisp, it's beyond me. So here's the change I made (to org-version 6.10c) (defun org-toggle-timestamp-type () "Toggle the type ( or [inactive]) of a time stamp." (interactive) (when (org-at-timestamp-p t) (save-excursion (goto-char (match-beginning 0)) (insert (if (equal (char-after) ?<) "[" "<")) (delete-char 1) (goto-char (1- (match-end 0))) (insert (if (equal (char-after) ?>) "]" ">")) (delete-char 1) (message "Timestamp is now %sactive" (if (equal (char-before) ?>) "" "in") There's something else, and this might very well because my git repo is not what emacs is actually running, and my modified Makefile install target might be foobar. If I have a timestamp that looks like <2009-01-29 Thu>--<2009-01-29 Thu> and the cursor is in front of the first > symbol and then I hit the S- twice, my timestamp no longer is a range. It now looks like [2009-01-30 Fri] And if the cursor is in front of the the first < symbol and I hit the S- key once (or if I use M-x org-toggle-timestamp-type), I get [2009-01-29 Thu]--<2009-01-29 Thu> but a second time, I get <2009-01-29 Thu]--<2009-01-29 Thu] That suggests to me that the regular expression isn't symmetric w.r.t. square brackets and curly brackets. I kinda know perl regex, but am completely unfamiliar with elisp's version. I tried to look at the org-ts[r]?-regexp-* variables, but my eyes crossed. Plus, I'm very afraid that any change I'd make would add parentheses, and thereby screwup every (match-begin 8) in the code. TFOM* Ben footnotes * TFOM = Thanks for Org-Mode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-cycle broken when cursor is at ellipses
So about this bug... I think I've figured out why I get this so often. I use Aquamacs on MacOS X, and it seems to store (in ~/Library/Preferences/Aquamacs Emacs/places.el) a list of files and values for point. Something about the timing of this means that point is left somewhere in the body (or maybe subheading?) of a headline, even though org-mode presents the file in 'Overview'. Since the point is in an unexpected location, even though the cursor looks fine, (org-cycle) doesn't work as it looks like it should. I think I'd like to turn off the 'places.el' thing. And I reiterate: this is really a tiny issue. Just hitting C-a fixes the state of point. On 2008-Oct-24, at 19:44, Avdi Grimm wrote: On Fri, Oct 24, 2008 at 2:33 PM, Ben Alexander <[EMAIL PROTECTED] > wrote: Ok, here's your chance. This is something that has bothered me for quite some time, but I've never been able to reliably reproduce the problem. And it's such a small issue. Thanks! I'll try to take a look tonight ... -Ben ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] import mail messages like mhc?
On 2008-Oct-25, at 16:39, [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] Date: 25 October 2008 13:10:27 BST To: emacs-orgmode@gnu.org Subject: [Orgmode] import mail messages like mhc? Hi All; I am currently using a Frankenstein-duct-tape-monster made from mhc and org-mode to track time and manage todos. For various reasons I would like to switch to just org-mode. One thing I really like about mhc is the ability to semi-automatically turn a mail message (in e.g. mew, gnus, wanderlust) into an agenda item/todo. Partly this is because mhc agenda items are MH messages, but the thing I would like to copy is that it reads the message body and surprisingly often guesses the date and time of an appointment. Before I try to port this to org-mode, has someone already done something similar? David Completely unrelated to org-mode: I would love to move my email to Emacs and use something like this, but I the only solutions I can understand rely on moving mail from my IMAP based inbox onto the local system. This is good; I want offline access. But this is bad: I want to refile email entries and move the messages on IMAP server into folders. Everything I've read indicates that once the mail has been downloaded to my laptop, any organization is only local, and not synced back to the IMAP folders. (And no, unfortunately I don't have login access to my IMAP server -- I do have ftp access though) Does anyone have some cheap advice on mixing email and org-mode? Back to org-mode: Since I haven't gotten any further than wishing Emacs could read my mail, I haven't looked to see if the (org-store-link) does the right magic thing in Rmail and/or Gnus. According the org-mode manual, there is all kinds of support for linking from your org-mode buffer back to the original email. And in terms of finding the right date from your mail message, I think the date parsing routine that C-. (org- time-stamp) uses absolutely rocks. For example, I just tried pasting the header from your email into the minibuffer after a 'C-.'. Org-mode didn't recognize the date because of the cruft of the To: field and the Subject: field. But within the minibuffer, I could hit C-p to get the the line with the date and *poof* like magic it found the date. And the minibuffer shows you what date it has computed. It did have a bit more trouble finding things like 'See you next Monday', But since C-k C-a and C-e work in the minibuffer, you might be able to yank the entire message into the buffer and then kill the text that doesn't have the date you want. Well, for short emails anyway. -Ben___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How you can help
On 2008-Oct-23, at 17:42, Avdi Grimm wrote: If someone would be so kind as to identify a small bug or feature, I would be happy to demonstrate this workflow in the form of code, time permitting. Ok, here's your chance. This is something that has bothered me for quite some time, but I've never been able to reliably reproduce the problem. And it's such a small issue. Sometimes, when it looks like my cursor is at the end of a headline and I hit tab, the headline does not cycle. Normally it does. It hit me that the point was not on the headline, it only looked like it. So here's the sample test.org file * First Headline Some body text * Second Headline (goto-char 17) ;that's the end of the first line (org-cycle) At this point the buffer looks like: * First Headline... * Second Headline (goto-char 25) (org-cycle) I think the buffer should look like this * First Headline Some body text * Second Headline but it still looks like: * First Headline... * Second Headline * ABOUT THIS BEHAVIOR I should be honest here. This may not be a bug. As I created this test data, it became a bit more clear that exactly where the cursor is matters a lot here. I *promise* that I've seen this behavior even when the cursor shows up before the ellipses, but in the test case I set up here, I could not make that happen. I also found that if I used the key-chord M-x goto-char 25, everything worked fine. The cursor stayed in front of the ellipses and the tab key worked. But when I used M-: (goto-char 25) the cursor moved to the same line as the ellipses, but after them. and the key stopped 'working'. I finally figured this out while playing with git. I switched branches at the command line and needed to perform a 'revert-buffer'. This left the cursor before the ellipses, but unable to properly (org- cycle) using the key. More experimenting I *think* the revert-buffer command tries to keep point close to the same place, and the org buffer had automatic folding. The bad thing about this for me is that I'll hit the key four times trying to make sure it's not just an empty tree. Meanwhile, (org-cycle) has indented the first line of the body, but hasn't shown me the text I'm changing. Then I get confused about why the buffer needs saving, probably 10 minutes later when I've forgotten all about hitting the tab key. But I'm way out of my depth to try to understand the relationship between (revert-buffer) (org-cycle) the arrow keys, and all. I just hit M-< or S- and try again. Or C-a, which sometimes works. Sometimes I grab the mouse as a last resort. * ABOUT TESTING ISSUES Just from this example, I'm eager to understand: 1. How can we differentiate between where the cursor appears and the value of point 2. How can we tell what the users sees on the screen versus what the buffer contains So the value of a testing framework is that this: if I'm going to announce to the world that I can't get something to work, (like the tab key), I'm going to make darn sure it's a real problem. I'm going to spend the time to create a small sample file, that reliable creates the problem, and I'm going to try a few different scenarios. But if I start to get lost or confused about which settings I've fiddled with or what is supposed to happen, I'll wander away from the problem and I won't submit the bug. We all lose in that scenario. But if the testing framework exists, and it is lightweight enough for novice emacs users (advanced enough to use M-x but not advanced enough to read lisp) then maybe I would have used it for this example. -Ben ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: How you can help
On 2008-Oct-23, at 16:49, Richard Riley wrote: Sebastian Rose <[EMAIL PROTECTED]> writes: Bernt Hansen <[EMAIL PROTECTED]> writes: Running a minimal emacs should suppress custom config files: emacs -q -l yourtest.el Added this one to the Clippboard section on new org-tests/index.org in Worg.git. (this section will be temporary...) Something like the above should only be a link (at most) to the emacs manual. Reproducing standard info is bad in the long run in case things in the base product (emacs) change for example. Some kind of regression testing framework would be awesome. Org- mode is large enough that this is almost a necessity to keep things stable and bug-free. It's big and feature-RICH. The nature of OSS means that the community using the product keep it stable and bug free. I dont think the efforts to produce meaningful regression tests would be beneficial in an ever morphing product like org-mode. Clearly my humble opinion on that one :-; I'm a bit clue-free on what the words mean. I think of regression tests as ways of defining the way "Things Should Work(TM)" so if someone commits as fix to org-mode that works fine on Debian, but breaks on Windows, there's a way for someone on Windows to easily (brainlessly) run the test and report back to the developer. I don't think of org-mode as 'ever morphing'. There are some features that are stable, and should remain so. A regression test would be valuable, presumably, for developers working on a new feature (don't screw up important existing functionality!) I must say I am dubious about this. It means, for the tests to be meaningful, that the output must be a fixed format in base org. I doubt this will ever be the case. The presentation will fluctuate while the core information (dates, schedules periods etc) will remain pretty much constant. I agree that the presentation is fluid and it was hard for me to imagine how to test it in an automated way. But I disagree (I think) in that having a test on the presentation is extremely powerful. I'm thinking that one example of how to write such a test could be copied when someone is trying to explain what they want to happen, and how it is not happening right now. Perhaps such a test would have a very limited useful life. I'd like to think that it could live and be useful for a very long time (that's why thinking about configuration/user customization issues in a test is important). But even if the test is only useful until the bug is fixed (or the feature implemented) , so be it. The majority of bugs that I see are often down to people misusing or using things in the base which are not fully explored. No amount of regression testing can cover things like that unless the regression tests include everyones customisations. Not everyone's customizations, just every customization org-mode has. I mean, if the feature is there, it should work. If the feature is important, it should work in the same way on every platform. The trick -- and I hope it's either solved or easy -- is exactly how to show that "the feature works the same way as it should, right now, on this platform" If I understand you properly, you're just saying that the user customization creates so much variability in the output, there isn't anyway you could capture all the possible presentations in a single test. Well, yeah, so user customizations need to be left out of the test case. Except that in the scenario I'm thinking of where someone (a mere mortal using org-mode, with limited lisp knowledge) is trying to report a bug, user customization will be critical. My first thought was asking org-mode to dump all the customization variables it has into a buffer (as buffer-local variables maybe?) would help someone else recreate the bug. (By starting org-mode with NO customizations, except what's found in the test case) Or are you suggesting that the source of presentation variation is due mostly to OS, Emacs version, or something else beyond the scope of our tests, so they couldn't be replicated on another machine? Do I think regression testing is important? Yes - in certain environments. But every time Carsten, you, myself or anyone else fires up org-mode we are already doing just that. -- Inventor: A person who makes an ingenious arrangement of wheels, levers and springs, and believes it civilization. ~Ambrose Bierce, The Devil's Dictionary ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How you can help
Well, I was just looking at http://www.emacswiki.org/emacs-fr/UnitTesting Unfortunately for me, I can't tell if Emacs comes with any builtin framework already, so I downloaded one of the many options listed on that page to my local site-lisp directory: http://www.wanglianghome.org/svn/test/test.el The personal issue I have is that I'm on a Mac, using Aquamacs, and the command line version of emacs is a different binary, so there might be trouble when a test passes at the command line, but fails where it matters to me. I don't even make sure that org-mode is up to date at the command line. I thought it wasn't, but I just checked and now it is. Plus, I don't really understand internals of emacs (like basic internals: I understand point and mark, buffer and file, but not transient mark, indirect buffer, symbols vs strings, window vs tab vs frame) The tutorial I'd need to write a test is one which lays out code I could copy and paste to do the following * setup the test environment - create a test directory - create a sample test.org file - put the cursor in a particular place * run the command we need to test - hit the 'TAB' key, or C-c C-c (some folks might need to be reminded how to find out exactly what command is actually being run when you hit a keystroke. And some of me might need to be told what lisp-code to use when the keystroke runs different commands at different places in a file) - reformat a table - clock in/out - create the agenda - export .html .ics .dvi file * How do we specify the correct result??? - check that the headline folded properly. What's the lisp code for getting the folded string as displayed? - check that the cursor is where it should be? especially when the cursor is near elipses... - check that the agenda is built properly. What's the lisp code for getting the agenda as a string? - check that the exported files are correct. Maybe the right suggestion is to run the export on two different files, so the test can focus on the 'diff' between them. That way different people who run the same test on different hosts can get the same result. More experienced folks must suggest whether it's better to have the expectation of a test be specified as a string in the test code or as a separate file in the test directory. It might depend on context, so feel free to lay out three or four cases. If even one kind of test for each of these 'cases' exists, hopefully we can encourage people to report bugs with the test. I mean, if people are already going through the effort to create the small sample org file to demonstrate their bug, and it's only a short (obvious) step to translating their english description of what should happen into equivalent lisp code that seems like a big temptation for someone to do it. Plus it might help them convince themselves that it really is a bug, and not that they are going crazy. I gotta move on for the day here, but I'll keep thinking a bit about this. On 2008-Oct-23, at 15:20, Sebastian Rose wrote: Hi Ben, I cc'ed the list. The tests I described in my email to the list are not automated. The reason for that is my lack of (e)lisp knowledge. BUT, they where easy to handle for non programmers. I think the little test will make it to the worg site this week, when all private data is removed. You could take a look at it by then. And: improve, improve, improve... :-) If you know of someone who knows how to do automated tests in elisp, or some technique, package, whatever, please post it to the list, so we all can take a look at it and comment->decide something. This is _highly_ _appreciated_. Ben Alexander <[EMAIL PROTECTED]> writes: Sebastian Rose wrote: 5. I also think of little packages for testing parts of org. I'm curious if you or someone else has any ideas for writing automated tests for org-mode. I haven't the foggiest idea how someone would write a test for the parts of org that control what is displayed on the screen. I mean, when the bug is 'it doesn't look right' how can you tell? Believe me, my idea is the foggiest of all possible ideas ;-) (so where my ideas of JavaScript some mounth ago), so I won't be of much help, I fear. Perhaps the git repository should have a small collection of small org- mode files that reproduce certain bugs? If there were some examples of how to create such a test, then perhaps bug reporters would find it much easier to create them. YES! Exactly. Every corner case an Org-file, every bug an Org-file. _DATA_ for testing is something, everyone _can_ provide. But git later, yes, maybe. Since this would need Carsten to think and act on this, I feel Worg is a nice place to start the first expieriments. We need Carstens power for other
Re: [Orgmode] How you can help
Sebastian Rose wrote: > 5. I also think of little packages for testing parts of org. I'm curious if you or someone else has any ideas for writing automated tests for org-mode. I haven't the foggiest idea how someone would write a test for the parts of org that control what is displayed on the screen. I mean, when the bug is 'it doesn't look right' how can you tell? Perhaps the git repository should have a small collection of small org- mode files that reproduce certain bugs? If there were some examples of how to create such a test, then perhaps bug reporters would find it much easier to create them. I do see some confusing issues due to different configuration files. So creating a test file might involve making sure org-mode doesn't read any configuration (how do you do that?) and possible asking org- mode to extract all the configuration variables it has right now and dump them into a test file (...and how do you do that?) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: install and info
Hi, On my Mac OS X (10.5.5) system, /usr/share/info looks like the directory with all the info files. Since I use MacPorts, I usually add the org-info file to /opt/local/share/info so the suggested change is slightly more convenient in that case, too. HTH, Ben Carsten Dominik <[EMAIL PROTECTED]> writes: Hi everyone, I'd be happy to change the default to infodir = $(prefix)/share/info if this is a better default for most systems. Is it better? So could people on different systems out there please check where the standard info directory is located? Thanks. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] How can I include body of tree as DESCRIPTION: tag using org-export-icalendar
Hello, I have read the org-mode info pages, and the FAQ online, and they've been a great source of help. I'm happily using org-mode on a Mac OS X system, and exporting to an iCalendar file and syncing with iCal. It works pretty well. I then use iSync to export my calendar to my mobile phone, so I can take my TODO list out for the day without burning trees (and ink cartridges). There are two features that would really be nice. The high priority one is some way of including some amount of the body of a TODO headline into the DESCRIPTION field. I put supporting information in the body, e.g. the phone number for an entry like this: *** TODO call stores for dishes :@PHONE: store 1: 0207 543 1234 store 2: 0207 777 That would be really, really nice to export. Since HTML exporting contains the body, is there already a way to do this in my org-mode file? The second feature request is a way to limit my exporting to a single tag or two (e.g. @PHONE and @ERRANDS). I think all I need to do is learn Lisp and write an org-agenda-skip-function to match a tag. I'm just not sure how to apply that just in the case of exporting to my phone. I don't really care what shows up in iCal, because if I can read that, I can read my org-mode file. Does anyone have any suggestions? Feel free to email me directly, and I will summarize any responses. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode