Re: [O] feature request for empty blocks in customized agenda
Hi I'm not sure if someone will find this feature useful enough to incorporate. However, even if it doesn't get added, I think you can get the behavior you want using org-agenda-finalize-hook. Hopefully the snippet below can be a useful starting point. #+begin_src elisp (defun org-agenda-delete-empty-blocks () Remove empty agenda blocks. A block is identified as empty if there are fewer than 2 non-empty lines in the block (excluding the line with `org-agenda-block-separator' characters). (when org-agenda-compact-blocks (user-error Cannot delete empty compact blocks)) (setq buffer-read-only nil) (save-excursion (goto-char (point-min)) (let* ((blank-line-re ^\\s-*$) (content-line-count (if (looking-at-p blank-line-re) 0 1)) (start-pos (point)) (block-re (format %c\\{10,\\} org-agenda-block-separator))) (while (and (not (eobp)) (forward-line)) (cond ((looking-at-p block-re) (when ( content-line-count 2) (delete-region start-pos (1+ (point-at-bol (setq start-pos (point)) (forward-line) (setq content-line-count (if (looking-at-p blank-line-re) 0 1))) ((not (looking-at-p blank-line-re)) (setq content-line-count (1+ content-line-count) (when ( content-line-count 2) (delete-region start-pos (point-max))) (goto-char (point-min)) ;; The above strategy can leave a separator line at the beginning ;; of the buffer. (when (looking-at-p block-re) (delete-region (point) (1+ (point-at-eol)) (setq buffer-read-only t)) (add-hook 'org-agenda-finalize-hook #'org-agenda-delete-empty-blocks) #+end_src a starting point seems to be an understatement ;) this seems to work exactly as intended. Thanks! Completely blanked out the use of any hooks, although it seems the obvious thing to do ;) Thanks again Arun
Re: [O] macro expansion in #+begin_latex
Hello, wero_sacero mail2w...@gmail.com writes: hi, is there anybody that know why in the lastest version of org-mode exporting in latex, the macro like {{{title}}} is not expanded if it is put in a begin_latex? In version 7.9... it was working, and I think it should work also now. Can anyone explain me if it is a non-feature or a bug? It is a non-feature. Macro are not allowed in raw or verbatim environments. Regards, -- Nicolas Goaziou
[O] macro expansion in #+begin_latex
hi, is there anybody that know why in the lastest version of org-mode exporting in latex, the macro like {{{title}}} is not expanded if it is put in a begin_latex? In version 7.9... it was working, and I think it should work also now. Can anyone explain me if it is a non-feature or a bug? Thanks a lot, Wero
[O] feature request for empty blocks in customized agenda
Hi I just started using a customized agenda with many blocks and some of my blocks are often empty. However, org-mode still insert the header and the separator between blocks. Is there a way to skip empty blocks completely? I had a quick look at org-agenda.el and it seems that it directly inserts text, e.g. the header, into the buffer, before it even knows how many items it added. I guess one could remember point at the beginning, count the items inserted and if that's 0, delete backwards to the saved point? My elisp knowledge is probably not good enough to add this though and it also seems one would have to add it at different location (org-agenda-list, org-agenda-todo, etc). I also checked org-agenda-compact-blocks, but that removes the separator from all blocks, which is not what I want. Any chance to get something like this added? Thanks Arun
Re: [O] Organizing and taming hectic Academia work (faculty viewpoint)? Tips or a good guides sought after :)
Hi list and John Thank you all for all the great advice i will start incorporating them into my daily workflow John: org-ref looks great but is it also used for managing you references? that is searching for entries, grouping by keys, exporting them to html, adding etc. does it have a table view or other? if not what do you use for managing your references? best Z On Fri, Jun 12, 2015 at 5:02 PM, Ken Mankoff mank...@gmail.com wrote: Hi Julian, On 2015-06-10 at 10:16, Julian Burgos jul...@hafro.is wrote: a) I first write in org-mode. Export to Word, either exporting first to ODT and then to Word, or to LaTex and then use pandoc to convert LaTex to Word. My coauthor can edit the document as he wishes, using the Track changes option. Then, I transcribe their edits back into the org-mode document. Advantage of this approach: your coauthor receives a clean word file, that could include figures, references, etc., and he/she uses the tools she likes to edit the file. Disadvantage: you have to manually incorporate the changes to the org-mode file each time there are edits. b) I write the manuscript in org-mode. Then I send the org-mode file to my coauthor. Because the org-mode file is just a text file, my coauthor can use Word to edit it. I ask him/her *not* to use track changes and to save the edited version also as a text file. Then, when I receive it I use ediff in emacs to compare both documents and incorporate the edits I want. Advantage of this approach: the merging of the documents is easy using ediff. Disadvantage: your coauthor has to edit a weird-looking document, with markup, code blocks, etc. It seems like with a bit of extra (scriptable?) work you could remove both disadvantages. Why can't you use method (a) above, and then DOCX - Org via pandoc (with --accept-all option)? I know pandoc introduce some of its own changes to the Org syntax but not the document itself. You can get around this. You can remove the pandoc-generated changes automagically so that only co-author changes appear in Org format, which you can then use with your (b) above and emacs ediff. Original: Your Org source A: Org - DOCX for co-authors (using pandoc) B: Org - DOCX - Org (using pandoc). C: A - Org (using pandoc and --accept-all-changes) D: B-Original The difference between B and Original are pandoc-introduced changes that you do not want. Ignore/remove these changes from C, call it D and then the difference between D and the Original are your co-author comments. Now your authors can edit DOCX with Track Changes and you can work on those edits with Emacs ediff. -k.
Re: [O] Organizing and taming hectic Academia work (faculty viewpoint)? Tips or a good guides sought after :)
I guess you could say I use it to manage my references. E.g. I add references using the functions in doi-utils.el. I can search them using helm-bibtex (which is not part of org-ref, we just use it because it is awesome), and from that I can see groups of references with keywords, etc... helm-bibtex provides the tableview I think you are referring to as a helm selection buffer. Alternatively in org-ref you could use the older reftex interface. When I click on a cite link, there actions available to do things like open the entry, find related articles, etc... (org-ref-build-full-bibliography) allows you to build a pdf version of a bibtex file pretty conveniently. the jmax-bibtex.el file in org-ref provides additional functionality to clean up bibtex entries, etc... so, it is fair to say emacs+org-ref+helm-bibtex is how I manage my references, and use them in writing. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sat, Jun 13, 2015 at 3:06 PM, Xebar Saram zelt...@gmail.com wrote: Hi list and John Thank you all for all the great advice i will start incorporating them into my daily workflow John: org-ref looks great but is it also used for managing you references? that is searching for entries, grouping by keys, exporting them to html, adding etc. does it have a table view or other? if not what do you use for managing your references? best Z On Fri, Jun 12, 2015 at 5:02 PM, Ken Mankoff mank...@gmail.com wrote: Hi Julian, On 2015-06-10 at 10:16, Julian Burgos jul...@hafro.is wrote: a) I first write in org-mode. Export to Word, either exporting first to ODT and then to Word, or to LaTex and then use pandoc to convert LaTex to Word. My coauthor can edit the document as he wishes, using the Track changes option. Then, I transcribe their edits back into the org-mode document. Advantage of this approach: your coauthor receives a clean word file, that could include figures, references, etc., and he/she uses the tools she likes to edit the file. Disadvantage: you have to manually incorporate the changes to the org-mode file each time there are edits. b) I write the manuscript in org-mode. Then I send the org-mode file to my coauthor. Because the org-mode file is just a text file, my coauthor can use Word to edit it. I ask him/her *not* to use track changes and to save the edited version also as a text file. Then, when I receive it I use ediff in emacs to compare both documents and incorporate the edits I want. Advantage of this approach: the merging of the documents is easy using ediff. Disadvantage: your coauthor has to edit a weird-looking document, with markup, code blocks, etc. It seems like with a bit of extra (scriptable?) work you could remove both disadvantages. Why can't you use method (a) above, and then DOCX - Org via pandoc (with --accept-all option)? I know pandoc introduce some of its own changes to the Org syntax but not the document itself. You can get around this. You can remove the pandoc-generated changes automagically so that only co-author changes appear in Org format, which you can then use with your (b) above and emacs ediff. Original: Your Org source A: Org - DOCX for co-authors (using pandoc) B: Org - DOCX - Org (using pandoc). C: A - Org (using pandoc and --accept-all-changes) D: B-Original The difference between B and Original are pandoc-introduced changes that you do not want. Ignore/remove these changes from C, call it D and then the difference between D and the Original are your co-author comments. Now your authors can edit DOCX with Track Changes and you can work on those edits with Emacs ediff. -k.
Re: [O] Pushing and pulling to google calendar
Fabrice Popineau fabrice.popineau at supelec.fr writes: Am I missing something if I cite https://github.com/myuhe/org-gcal.elwhich is using the v3 Google Calendar api. Still lacks of true bidirectional sync, but that could happen. Any idea about how to use this piece of code. I can't seem to make this work. Thanks for any help.
Re: [O] feature request for empty blocks in customized agenda
Hi, Arun Persaud apers...@lbl.gov wrote: Hi I just started using a customized agenda with many blocks and some of my blocks are often empty. However, org-mode still insert the header and the separator between blocks. Is there a way to skip empty blocks completely? Not that I'm aware of. I had a quick look at org-agenda.el and it seems that it directly inserts text, e.g. the header, into the buffer, before it even knows how many items it added. I guess one could remember point at the beginning, count the items inserted and if that's 0, delete backwards to the saved point? My elisp knowledge is probably not good enough to add this though and it also seems one would have to add it at different location (org-agenda-list, org-agenda-todo, etc). I also checked org-agenda-compact-blocks, but that removes the separator from all blocks, which is not what I want. Any chance to get something like this added? I'm not sure if someone will find this feature useful enough to incorporate. However, even if it doesn't get added, I think you can get the behavior you want using org-agenda-finalize-hook. Hopefully the snippet below can be a useful starting point. #+begin_src elisp (defun org-agenda-delete-empty-blocks () Remove empty agenda blocks. A block is identified as empty if there are fewer than 2 non-empty lines in the block (excluding the line with `org-agenda-block-separator' characters). (when org-agenda-compact-blocks (user-error Cannot delete empty compact blocks)) (setq buffer-read-only nil) (save-excursion (goto-char (point-min)) (let* ((blank-line-re ^\\s-*$) (content-line-count (if (looking-at-p blank-line-re) 0 1)) (start-pos (point)) (block-re (format %c\\{10,\\} org-agenda-block-separator))) (while (and (not (eobp)) (forward-line)) (cond ((looking-at-p block-re) (when ( content-line-count 2) (delete-region start-pos (1+ (point-at-bol (setq start-pos (point)) (forward-line) (setq content-line-count (if (looking-at-p blank-line-re) 0 1))) ((not (looking-at-p blank-line-re)) (setq content-line-count (1+ content-line-count) (when ( content-line-count 2) (delete-region start-pos (point-max))) (goto-char (point-min)) ;; The above strategy can leave a separator line at the beginning ;; of the buffer. (when (looking-at-p block-re) (delete-region (point) (1+ (point-at-eol)) (setq buffer-read-only t)) (add-hook 'org-agenda-finalize-hook #'org-agenda-delete-empty-blocks) #+end_src -- Kyle