Re: [O] ox-latex export code block results without \texttt
I'm sorry, :results latex solved my problem. :)From: joon...@outlook.com To: emacs-orgmode@gnu.org Date: Fri, 1 May 2015 17:34:34 -0500 Subject: [O] ox-latex export code block results without \texttt Hi, When I export a org file with an inline code like Two plus two equals src_python{return(2+2)} to latex, it is exported as Two plus two equals \texttt{4}. Is there any way to suppress \texttt and have it exported as a common text? Usually I would want the verbatim font, but in this particular case I want to combine some texts with a result of a calculation automatically. Best,Joon
[O] ox-latex export code block results without \texttt
Hi, When I export a org file with an inline code like Two plus two equals src_python{return(2+2)} to latex, it is exported as Two plus two equals \texttt{4}. Is there any way to suppress \texttt and have it exported as a common text? Usually I would want the verbatim font, but in this particular case I want to combine some texts with a result of a calculation automatically. Best,Joon
[O] Recurse through a directory tree in org-agenda
It is common to have something like this in an org configuration: (customize-set-variable 'org-agenda-files '(~/org)) This means that all the org files in ~/org (but not all the org files in subdirectories of ~/org) will be automatically included in the agenda. It seems like a common request on this mailing list is: what if I created a fairly involved directory tree with org files throughout, how do I include all those directories in org-agenda-files? And also, what if I modify my filesystem and create a new directory somewhere under ~/org - do I have to restart Emacs or rerun the code that configures org? Here's a solution that seems to take care of everything automatically for me (and also filters out things that I don't want to include, like directories named zz_old, .git and zz_journal) (require 'find-lisp) (require 'cl) (defun yn/recurse-subdirectories (directory) (let ((predicate (lambda (pred) (lexical-let ((p pred)) (lambda (dir parent) (and (not (or (string= dir .git) (string= dir zz_old) (string= dir zz_journal))) (funcall p dir parent))) (append (find-lisp-find-files-internal directory (funcall predicate 'find-lisp-file-predicate-is-directory) (funcall predicate 'find-lisp-default-directory-predicate)) (cons directory nil (defadvice org-agenda-files (before yn/org-agenda-files (optional unrestricted archives)) (customize-set-variable 'org-agenda-files (yn/recurse-subdirectories org-directory))) (ad-activate 'org-agenda-files) I don't have contributor papers signed with the FSF (yet) but obviously the intent of this message is for everyone to use this.
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. As you see, I kind of stole your notes and the org-bullets customization, so thanks for that:) Oleh
Re: [O] navigate between source code blocks
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. 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. Leo Ufimtsev | Intern Software Engineer @ Eclipse Team - 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: Thursday, April 30, 2015 1:25:45 PM Subject: Re: [O] navigate between source code blocks Leo Ufimtsev lufim...@redhat.com writes: Worf I think is a bit on the vi side of things. Helm is more generic. Worf is as much on the vi side of things, as `org-use-speed-commands' are. Almost not at all. It just takes vi-style hjkl arrows, because Emacs-style bnpf arrows aren't convenient. And it's got the best Helm implementation for navigating to headings. I've just added named blocks to this list as well. Screenshot: http://oremacs.com/download/worf-goto.png. The command to call is M-x `worf-goto' or g while in `worf-mode'. Oleh
Re: [O] [Bug?] Smart quotes and latex environments
Hello, Jacob Gerlach jacobgerl...@gmail.com writes: I tried this instead: -- #+Latex:\begin{myenvironment} Foo #+Latex:\end{myenvironment} -- which exports to: -- \begin{myenvironment} ``Foo'' \#+Latex:\end{myenvironment} -- This seems like a bug. According to syntax, you are expected to add a space after colons, e.g., #+Latex: \begin{myenvironment} Foo #+Latex: \end{myenvironment} I commited a change to allow missing space. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] org-timer.el: Use hh:mm:ss format instead of minutes
Hello, Brice Waegenire brice@gmail.com writes: I have took in consideration all of your points, is it better now? The current patch doesn't overwrite the present behavior of org-set-timer it only add the possibility to use hh:mm:ss format. Thank you. Some comments follow in addition to Kyle's. From: Brice Waegeneire brice@gmail.com Date: Fri, 24 Apr 2015 14:18:45 +0200 Subject: [PATCH] org-timer.el: hh:mm:ss format for setting a timer * lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss format. * testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add hh:mm:ss format in the test. Commit message is incomplete, i.e., you changed default value for `org-timer-default-timer'. --- lisp/org-timer.el | 23 --- testing/lisp/test-org-timer.el | 8 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 0593573..022125f 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -65,12 +65,12 @@ the value of the timer. :group 'org-time :type 'string) -(defcustom org-timer-default-timer 0 - The default timer when a timer is set. +(defcustom org-timer-default-timer 0 + The default timer when a timer is set, in minutes or hh:mm:ss format. When 0, the user is prompted for a value. :group 'org-time :version 24.1 - :type 'number) + :type 'string) Since you change default value, you need to update keywords: :version 25.1 :package-version '(Org . 8.3) + (and (listp opt) (not (null opt)) org-timer-default-timer) (and (consp opt) org-timer-default-timer) (read-from-minibuffer - How many minutes left? + How much time left? (minutes or h:mm:ss) (if (not (eq org-timer-default-timer 0)) - (number-to-string org-timer-default-timer)) + (eval org-timer-default-timer)) +(if (string-match ^[0-9]+$ minutes) + (setq minutes (concat minutes :00))) Nitpick: \\`[0-9]+\\' (if (not (string-match [0-9]+ minutes)) (org-timer-show-remaining-time) - (let* ((mins (string-to-number (match-string 0 minutes))) - (secs (* mins 60)) + (let* ((secs (org-timer-hms-to-secs (org-timer-fix-incomplete minutes))) let* - let Regards, -- Nicolas Goaziou
Re: [O] not in sub-editing buffer
Hello, Detlef Steuer detlef.ste...@gmx.de writes: Whatever file I open, I canĀ“t save it with C-c C-s and get the message not in sub-editing buffer I verified org is the culprit using emacs -Q and only loading org. I can save without/before loading org. Fixed in bce77d0db31cd0f58daf731b0995e3d862541389. Thank you. Regards, -- Nicolas Goaziou
Re: [O] navigate between source code blocks
Thank guys. Wolf is new to me and I am trying it now, it already feels very attractive! This increases my navigation efficiency quite a bit! Zhihao On 30 Apr 2015, at 18:25, Oleh Krehel ohwoeo...@gmail.com wrote: Leo Ufimtsev lufim...@redhat.com writes: Worf I think is a bit on the vi side of things. Helm is more generic. Worf is as much on the vi side of things, as `org-use-speed-commands' are. Almost not at all. It just takes vi-style hjkl arrows, because Emacs-style bnpf arrows aren't convenient. And it's got the best Helm implementation for navigating to headings. I've just added named blocks to this list as well. Screenshot: http://oremacs.com/download/worf-goto.png. The command to call is M-x `worf-goto' or g while in `worf-mode'. Oleh
Re: [O] Can't save file with latest version of org
On Thu, Apr 30, 2015 at 02:06:22PM -0400, Kyle Meyer wrote: Hello, Richard Stanton stan...@haas.berkeley.edu wrote: I just ran git pull to update to the latest version of org-mode. Now, when I try to save an org file, I get the error message: user-error: Not in a sub-editing buffer I think this issue is already being discussed in another thread: http://thread.gmane.org/gmane.emacs.orgmode/97349 -- Kyle Just in case it's not fixed yet, you can work around it by M-x org-src-mode to toggle org-src-mode off. -- Best wishes, Ian.
[O] Filters lost after reviving buried, sticky agenda
Dear all, I regularly lose all my filters when I bury a sticky agenda and revive it later. In that case, the variable `org-agenda-tag-filter' is set to nil, although it was non-nil before burying. I played around a bit, and found out that `org-agenda-tag-filter' is buffer-local (which is not a surprise). When the agenda buffer is revived, the function `org-agenda-prepare' is called, which, among others, should reset the filters (provided that `org-agenda-persistent-filter' is set). The beginning of the function is ---8--- (defun org-agenda-prepare (optional name) (let ((filter-alist (if org-agenda-persistent-filter (list `(tag . ,org-agenda-tag-filter) `(re . ,org-agenda-regexp-filter) `(car . ,org-agenda-category-filter) ...)) ---8--- It seems to me that `org-agenda-tag-filter' is read *before* the old agenda buffer is poped up (i.e., made current), and thus results in a `nil' value. Indeed, if I replace the definition of `filter-alist' by ---8--- (let ((filter-alist (if org-agenda-persistent-filter (with-current-buffer (get-buffer org-agenda-buffer-name) (list `(tag . ,org-agenda-tag-filter) `(re . ,org-agenda-regexp-filter) `(car . ,org-agenda-category-filter)) ...) ---8--- then the bug (seems to) disappear. My question is now: is this correct, or did I understand something wrong? If my understanding is correct, how this bug be fixed more elegantly? Best, Daniel -- Daniel Borchmann http://daniel.kxpq.de GPG (Mail)0849 473E 6BF0 B504 DF0B D640 455E 3610 01FF 778F signature.asc Description: PGP signature