Re: [O] Resolving conflicts with ediff and folding
I have the following lisp code can do the trick: (add-hook 'ediff-quit-hook (lambda () (cond ((eq major-mode 'org-mode) (visible-mode 0) -- Tian Qiu On Tue, Apr 28, 2015 at 5:43 PM Sebastien Vauban sva-n...@mygooglest.com wrote: J. David Boyd wrote: Charles C. Berry ccbe...@ucsd.edu writes: On Tue, 21 Apr 2015, Suvayu Ali wrote: Something that has been bugging me for many years now, everytime I resolve conflicts in Org files with ediff, it's a pain. All the buffers keep folding the outlines, hiding the conflicts. I keep going to the buffers manually (which can be somewhat of a pain in a text terminal), and unfolding them manually. But of course the PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded! And then after I have jumped through hoops, and resolved the conflicts, I realise I could have just switched to text-mode before invoking ediff! Is there a way where I don't have to remember to switch the major mode before invoking ediff[1]? Or maybe an ediff experience where the buffers are forced to unhide text. I guess it should be possible to just temporarily remove all overlays or invisible properties. Any thoughts, ideas? Did you see this thread: http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html ?? That't what I was going to say. I added that to my setup long ago, and it has been working fine since then. I don't ediff all that often, but when I do it certainly helps. The only (tiny) problem is that the `truncate-lines' and `visible-mode' settings stay in the buffer after the Ediff session -- while one would love to get back to the original settings of the buffer.c Best regards, Seb -- Sebastien Vauban
[O] Changing TODO status on non-current date
Hi all, assume that I have a habit (or other TODO headline where the /date/ of converting to DONE is important), and I completed it, say, at 23:30 and forgot to change the status immediately. Is there any way to tell Org that the change was not today, but e.g. yesterday or two days ago etc.? This is especially important with habits, since the date information is then recorded in two places, so changing it manually is a nuisance. I assume that what I'm after could be done with advice and cl-letf-ing current-time and/or current-time-string, but I'm wondering whether someone has it solved already. OTOH, org-todo already has a bunch of prefix argument options (up to triple C-u), so I'd have either to resort to /quadruple/ C-u (not good UI) or something else completely - any ideas? Maybe a /negative/ argument, or just C-- C-c C-t? (Of course, I'd also need doing this from the agenda, so org-agenda-todo might also need some tweaking.) TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University
Re: [O] ob-R, problem with try/catch
Charles C. Berry ccbe...@ucsd.edu writes: On Sun, 26 Apr 2015, Nicolas Goaziou wrote: Hello, Rainer M Krug r.m.k...@gmail.com writes: Possible a candidate for the new linting library for org, to mark it as an invalid argument combination Done. Do you know any other such combinations? Except for langs emacs-lisp, clojure, ruby, picolisp, and python `:results pp' does nothing. mathematica refers to pp but I don't get what it does - it looks like raw would be a more suitable :results format. Of course, somebody could add a pretty print routine for another language, so maybe avoid hard coding the langs. Thinking about it, I don't think that the combinations should be defined in the linting library, but in the language definition (ob-XXX.el), by a function which returns all tested combinations, i.e. all combinations which have been tested, including if they work or not. The linting library could then query these lists and use them. This would keep the language definition in the ob-XXX.el file and make it easier to maintain. Rainer I guess this would be 'low' trust? == For inline src block and inline babel call, `:results list' and `:results table' are invalid and throw an error in `org-babel-insert-result'. HTH, Chuck -- 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 PGP: 0x0F52F982 signature.asc Description: PGP signature
Re: [O] org-babel R ascii results: unable to export table
Hi, sorry for replying so late. Thank you very much, your answer pointed me in the right direction (I solved with :results output drawer) Marco. Il giorno Thu, 30 Apr 2015 11:45:20 -0400 Ista Zahn istaz...@gmail.com ha scritto: Hi Marco, Here is a fairly minimal example to get you started: Begin Example #+PROPERTY: header-args:R :session *R* :results output drawer :exports both #+BEGIN_SRC R library(ascii) options(asciiType=org) #+END_SRC #+BEGIN_SRC R ascii(mtcars[1:5, 1:5]) #+END_SRC #+BEGIN_SRC R ascii(summary(lm(hp ~ wt, data = mtcars))) #+END_SRC ### End Example First execute the code blocks with 'M-x org-babel-execute-buffer' then export. For more control I would refer to the manual section at http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code Best, Ista On Thu, Apr 30, 2015 at 7:32 AM, Marco Barbàra jab...@gmail.com wrote: Dear org-mode community, First, I want to apologize for subscribing mainly because I need help. I recently started using org-mode as a tool for reproducible research (trying to do R-based literate programming). What I'm trying to is explained in this example file: http://orgmode.org/worg/org-contrib/babel/examples/ascii.org which I downloaded trying to understand how to export R output produced with the R 'ascii' package. Running this example, after adding :exports results to ascii-example3 block, _on the first attempt_, the output was exported as an odt table (i was happy, this is my desired outcome). But afterwards, any subsequent attempts to export the same block resulted in a verbatim block, which is the same problem I was trying to solve. I tried to export as a latex buffer too, and even there i got a verbatim environment. I don't think it is bug, it is probably that I still don't understand org-babel well. Sorry not to provide any other sample code, but I wouldn't know where to begin. Any advice would be very appreciated. Thank you very much Marco Barbara
Re: [O] navigate between source code blocks
Leo Ufimtsev wrote: There are some build in things also, E.g you can name source code blocks: #+name: EDE Config #+begin_src emacs-lisp (require 'ede) (global-ede-mode) (load-file (concat user-emacs-directory my/cedet-projects.el)) #+end_src And then with Helm + org-babel-goto-named-src-block you can search your named source code blocks. Would you mind sharing your config for the above (Helm + org-babel-goto-named-src-block)? Best regards, Seb -- Sebastien Vauban
Re: [O] Changing TODO status on non-current date
Marcin Borkowski mb...@mbork.pl writes: assume that I have a habit (or other TODO headline where the /date/ of converting to DONE is important), and I completed it, say, at 23:30 and forgot to change the status immediately. Is there any way to tell Org that the change was not today, but e.g. yesterday or two days ago etc.? This is especially important with habits, since the date information is then recorded in two places, so changing it manually is a nuisance. Yeah, I run into this frequently. It's almost a habit with me :) I haven't looked for a solution, and usually just go edit things by hand, which is error prone. -DAve
Re: [O] Problem with org-agenda-clockreport-mode and tag-filtered view in agenda
Resurrecting an old thread that reported a problem that I am also having: the prefix argument to org-agenda-clockreport-mode seems to be ignored instead of applying the current filter. I investigated, and commit 2e9c2d7128e0491491d00b585be83ac688587d00 http://orgmode.org/w/?p=org-mode.git;a=commit;h=2e9c2d7128e0491491d00b585be83ac688587d00 appears to be first one where C-u R does not apply the current filter. For me, commit 30220ffcdcef45c0237f80a2347d4da19877f64a works as expected. I also just checked master and maint, and they both still ignore the prefix argument. The commit message contains: (org-agenda-clockreport-mode, org-agenda-set-mode-name): Don't consider tag filters. So it seems that this behavior is intended, although the documentation at http://orgmode.org/manual/Agenda-commands.html still refers to the old behavior. Is this assumption correct, and if so is there a different way to filter the clockreport by tag? Cheers, Josh
Re: [O] navigate between source code blocks
- Original Message - From: Oleh Krehel ohwoeo...@gmail.com To: Leo Ufimtsev lufim...@redhat.com Cc: emacs-orgmode@gnu.org, Zhihao Ding zhihao.d...@imm.ox.ac.uk Sent: Friday, May 1, 2015 11:13:28 AM Subject: Re: [O] navigate between source code blocks Leo Ufimtsev lufim...@redhat.com writes: And it's got the best Helm implementation for navigating to headings. Well, when I hear someone use the word 'best', I see it as a challenge X-D. I used worf-goto for a while. It's certainly amazing and on the odd occasion I still use it, but lately I've switched over to: helm-org-in-buffer-headings The difference is that worf-goto only looks at the specific headings (e.g the line it self), where as helm-org-in-buffer-headings searches the whole hierarchy. E.g if I have a structure like this: * Gdb ** Break *** on line (1) *** on function * Eclipse ** Break *** on line *** on function And I search for gdb break line, then I will not get a match with worf-goto, but helm-org-in-buffer-headings does do a match on (1). For example in the attached screenshot I search for gdb cmd break. It's also smart enough to trim long headings. This is particularly useful for finding the deeply nested sub-items. from what I gather, worf doesn't have an equivalent: https://github.com/abo-abo/worf/blob/master/worf.el Imho it would benefit from having something of that sort in the package. Thanks for the feedback, Leo. It's doable, but then it would be pretty much identical to helm-org-in-buffer-headings. If you or anyone else is interested, post at https://github.com/abo-abo/worf/issues. It just takes vi-style hjkl arrows, because Emacs-style bnpf arrows aren't convenient. Well, I use the Colemak layout, so hjkl is actually not very convenient for me :-/. Meh. Well, it's always something, isn't it :) By the way, I'm trying to go with general-purpose tools these days. Here's a link to the search that you mentioned using swiper: http://oremacs.com/download/org-mode-swiper.png. Swiper is an isearch replacement, so I could just: 1. C-s break - see 38 matches. 2. C-a \* SPC - see 9 matches. 3. C-n repeatedly to navigate to the one that I want. I've been meaning to try swiper for a while, I've sort of been waiting for it to mature a bit. I'll try the suggestion above sometime, maybe on a thursday evening after work X-D. As you see, I kind of stole your notes and the org-bullets customization, so thanks for that:) I am impressed at your finding-emacs-configs-online skills =). Oleh -- Leo Ufimtsev | Intern Software Engineer @ Eclipse Team
Re: [O] navigate between source code blocks
- Original Message - From: Sebastien Vauban sva-n...@mygooglest.com To: emacs-orgmode@gnu.org Sent: Monday, May 4, 2015 6:08:02 AM Subject: Re: [O] navigate between source code blocks Leo Ufimtsev wrote: There are some build in things also, E.g you can name source code blocks: #+name: EDE Config #+begin_src emacs-lisp (require 'ede) (global-ede-mode) (load-file (concat user-emacs-directory my/cedet-projects.el)) #+end_src And then with Helm + org-babel-goto-named-src-block you can search your named source code blocks. Would you mind sharing your config for the above (Helm + org-babel-goto-named-src-block)? This is my .emacs.d folder, which I soft symlink: ln -s ~/git/ldts/.emacs.d ~/.emacs.d https://github.com/LeoUfimtsev/ldts/tree/master/.emacs.d Of Some interest: - init loader and customizations: (not so intresting) https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/init.el - legacy .emacs file which I haven't fully moved to my orgdotemacs (not as interesting) https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/.emacs - my org-babel-config: https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/orgdotemacs.org#org-babel-configuration But truth be told, my config is somewhat messy with things all over the place. You may want to go with norangs's org-babel config, (I got my stuff from there also) http://doc.norang.ca/org-mode.html#OrgBabel Let me know if you have questions. Thank you. Best regards, Seb -- Sebastien Vauban -- Leo Ufimtsev | Intern Software Engineer @ Eclipse Team
Re: [O] Converting a Dissertation Template from docx to .org to use for LaTeX
Hi Paul, Paul Harper harper.pau...@gmail.com writes: How do I get the preamble above the title? How do I make the fonts smaller in the title? I need some items to appear on a page of their own. (ie. Ethical Approval, Abstract, Declaration, Table of Contents.) How do I do that? Do you know KOMA-Scrip? It has good support for title pages. Check section 3.7 in the KOMA-Script manual. If it has everything you need just that. If your university provides a latex template, and one department there certainty will, why not use that? Just port the university's class or recommend preamble to Org via org-latex-classes, org-latex-title-command, #+LATEX_HEADER or similar. Alternatively, it's not hard roll you own title-page.tex. An example is below. You may also find interest in Eric's experience on writing a thesis in Org: http://lists.gnu.org/archive/html/emacs-orgmode/2014-08/msg00113.html Example of a titlepage: \begin{fullsizetitle} \vspace{2cm} \begin{center} \begin{minipage}[t][0.89\textheight]{.80\linewidth} \sffamily \raggedleft \itshape \mbox{{\Large \PaperType\xspace $\circ$ \University\xspace $\circ$ \Date}} \vspace{1.5cm} \noindent {\fontsize{20mm}{20mm}\selectfont \noindent\rule{.9\textwidth}{2pt}\\[.25ex] \noindent\Title \noindent\rule{.9\textwidth}{2pt}\vspace*{1ex}} {\fontsize{15mm}{15mm}\selectfont \vspace{3cm} {\Huge supervised by:\\[-1ex] \Supervisor} \vfill \makebox[\textwidth][r]{\parbox[b]{2cm}{\huge written\\[-1ex]by} \Author} {\huge \SubAuthor}} \end{minipage} \end{center} \end{fullsizetitle} \clearpage % backside of titlepage \thispagestyle{empty} \mbox{}{\itshape\sffamily\noindent\vfill \noindent {\larger[2]{\rule{\textwidth}{.8pt}\vspace*{2ex}% I would like to thank \Supervisor for\cdots\\[1ex]\rule{\textwidth}{.8pt}}} \vfill\vfill\noindent% I would also like to acknowledge financial support from \begin{itemize*} \item f1 \item f2 \end{itemize*}} \clearpage -- Send from my Emacs
Re: [O] Converting a Dissertation Template from docx to .org to use for LaTeX
Hi Paul, For this type of one-off project (a thesis), I'd suggest you a) remove all Org-generated LaTeX header, b) create your own LaTeX preamble that you \include{preamble} in your Org file, and then all of your questions become LaTeX questions, not Org questions. Those LaTeX questions are likely easily googlable (or bingable) and found on TeX.SE. At the top of your Org document you can embed all the LaTeX code you want to generate the custom title and signature pages required by your institution. Just my 2c. On 2015-05-04 at 11:58, Paul Harper harper.pau...@gmail.com wrote: I need some items to appear on a page of their own. (ie. Ethical Approval, Abstract, Declaration, Table of Contents.) How do I do that? \clearpage command in LaTeX. -k.
Re: [O] ob-R, problem with try/catch
Hello, Rainer M Krug rai...@krugs.de writes: Thinking about it, I don't think that the combinations should be defined in the linting library, but in the language definition (ob-XXX.el), by a function which returns all tested combinations, i.e. all combinations which have been tested, including if they work or not. The linting library could then query these lists and use them. This would keep the language definition in the ob-XXX.el file and make it easier to maintain. This is already the case. See, e.g., `org-babel-header-args:R' and `org-babel-common-header-args-w-values'. The linting library doesn't hard-code any combination anymore. Regards, -- Nicolas Goaziou0x80A93738