Re: [O] Searching on gmane fails
Hi Nick, Nick Dokos ndo...@gmail.com writes: I get a Forbidden error message, either from gnus or from the web. Anybody else seeing that? Yes, http://search.gmane.org is not accessible right now. I dropped a note to Lars. -- Bastien
Re: [O] LaTex export questions
On 28 May 2014 06:31, Alan Tyree typh...@aanet.com.au wrote: Hi Steven, You want to learn more about LaTeX, but it's not too much. I wrote a little book called Self-publishing with LyX that will help you set up the title page as well as some of your other problems. This is not a sales pitch -- it's free :-). Self-publishing with LyX ISBN: 978-0-9803-3242-1 http://www.lulu.com/content/1085870 Cheers, Alan I half-way through your book and it is a good read! I am a long-time LyX fan so you are preaching for the choir ad far as I am concerned :-) Now I feel tempted (inspired) to create a small DIY book binding introduction. I have experimented with this a bit and find you can do decent paperbacks with very limited resources. -- Martin Schöön http://hem.bredband.net/b262106/index.html
Re: [O] Moving footnotes
Bastien b...@gnu.org writes: Nicolas Goaziou n.goaz...@gmail.com writes: All in all, I'm not convinced this should be a function provided in Org. Okay. Still, it's useful to have it *somewhere*. If you have a moment, could you revert the commit Done. rewrite the function with the suggested enhancements Here it is. It could be prettier but I think it should get the job done. (defun org-footnote-inline-footnotes () Convert external footnotes into inline ones. (interactive) (org-with-wide-buffer (let ((random-labels (make-hash-table :test #'equal)) failed seen) (goto-char (point-min)) (while (re-search-forward org-footnote-re nil t) (let ((context (save-excursion (backward-char) (org-element-context ;; Ignore false positives. (when (eq (org-element-type context) 'footnote-reference) (let ((label (org-element-property :label context))) ;; Ignore anonymous footnotes. (when label (if (member label seen) (let ((normalized-label (gethash label random-labels))) (when normalized-label (search-backward [ nil t) (forward-char) (insert normalized-label) (delete-region (point) (progn (skip-chars-forward 0-9) (point) (push label seen) (when (eq (org-element-property :type context) 'standard) (let ((beg (copy-marker (org-element-property :begin context))) (end (copy-marker (save-excursion (goto-char (org-element-property :end context)) (skip-chars-backward \t) (point (definition (save-excursion (goto-char (point-min)) (catch 'exit (while (re-search-forward (format ^\\[%s\\] (regexp-quote label)) nil t) (let ((def (save-excursion (backward-char) (org-element-at-point (when (eq (org-element-type def) 'footnote-definition) (let ((cbeg (org-element-property :contents-begin def)) (cend (org-element-property :contents-end def))) ;; Ensure definition can be inline, ;; i.e., contains a single ;; paragraph. Return nil if it ;; cannot. (if (not cbeg) (throw 'exit ) (goto-char cbeg) (let ((contents (org-element-at-point))) (if (or (not (eq (org-element-type contents) 'paragraph)) ( (org-element-property :end contents) cend)) (throw 'exit nil) (throw 'exit (prog1 (org-trim (buffer-substring cbeg cend)) (delete-region (org-element-property :begin def) (org-element-property :end def))) (if (not definition) (push label failed) (delete-region beg end) (goto-char beg) ;; Convert [1] to [fn:random-id] to avoid ;; confusion between [1] and [fn:1]. (let ((normalized-label (if (not (org-string-match-p \\`[0-9]+\\' label)) label (require 'org-id) (puthash label (concat fn: (substring (org-id-uuid) 0 8)) random-labels (insert [ normalized-label : definition ]))) (set-marker beg nil) (set-marker end nil) (cond (failed (user-error Some footnotes could not be converted : %s (mapconcat #'identity failed , ))) ;; If process completed without failure, there is no regular ;; footnote definition left, so we remove footnote sections, ;; if any.
Re: [O] BUG in reference by ID to remote table (was Re: org babel question: reference tables in remote file)
Hi Bastien Thanks for the suggestion. I'm traveling at the moment, but I'll check it out as soon as I get a chance. Will Sent from a leading brand of mobile device On 30/05/2014, at 16:44, Bastien b...@gnu.org wrote: Hi William, William Henney when...@gmail.com writes: There is an apparent bug when using the ID property to refer to cells in remote tables, which is currently the only way to refer to a table in an external file. One way to deal with this is to set (setq org-table-use-standard-references nil) Since the default value for the variable is not nil, we could also consider preventing the conversion in remote(...) formulas. What do you think? -- Bastien
Re: [O] Moving footnotes
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Here it is. It could be prettier but I think it should get the job done. Wow, thanks! I didn't expect this to be that long... I tested it with various input files and it works fine. PS: I think it's useful to trigger the org-footnote-action menu when org-footnote-new cannot do anything useful. Sure, I will add it back later today, unless you're faster than me. No hurry. I won't be connected later today. Thanks a lot! -- Bastien
Re: [O] Printable calendar?
On Fri, May 30, 2014 at 01:20:21PM -0400, Nick Dokos wrote: Peter Davis p...@pfdstudio.com writes: Ok, I was able to get the column rules I want. (See below) I'm still puzzled by the right/left alignment. In the org buffer the columns appear correctly aligned, but in HTML output, the left (Sun) and right (Sat) columns are right-aligned, while all the others are left-aligned. Clues? You can force the misbehaving columns to behave - more or less: the M value on the 17th will cause problems (btw, I prefer to have a non-exported zeroth column for things like / and ! that are basically table metadata - see (info (org) Advanced features) for details): Thanks, Nick. That worked beautifully (once I noticed that May has 31 days instead of 30 twice.) The misbehaviour is caused by the heuristic used in org-export-table-cell-alignment: , | Return alignment as specified by the last alignment cookie in the | same column as TABLE-CELL. If no such cookie is found, a default | alignment value will be deduced from fraction of numbers in the | column (see `org-table-number-fraction' for more information). ` You can play around with org-table-number-fraction (default: 0.5) to change the behaviour. A value of 0.25 will right-align them all, whereas a value of 0.75 will left-align them all. But I wouldn't want to bet my life on that: it depends on the contents of the table so it seems like a fragile solution at best. BTW, the 0.25 and 0.75 values above are purely trial-and-error (actually derived from the smallest ratio I found edebugging over the columns: 6/21). Nick Footnotes: [fn:1] The heuristic counts empty cells as numbers if the non-empty row above it is a number, so for the first column for example, there are 21 cells and 11 of them are numbers. Interesting, but it sounds to me like org is trying to be too smart for its own good here, making inferences based on the contents of the cells. I'll stick with the 'l' notation, which seems more reliable. Thank you! -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
Re: [O] Filtering org-clock-display
I'm getting an error on HEAD now: Debugger entered--Lisp error: (void-function org-add-props) (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (quote face) (quote org-warning)) (message (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (quote face) (quote org-warning))) (condition-case nil (load (concat (file-name-directory load-file-name) org-loaddefs.el) nil t t t) (error (message (org-add-props WARNING: No org-loaddefs.el file could be found from where org.el is loaded. nil (qu$ (or (equal this-command (quote eval-buffer)) (condition-case nil (load (concat (file-name-directory load-file-name) org-loaddefs.el) nil t t t) (error (message (org-add-props WARNING: No org-loaddefs.el file could b$ eval-buffer(#buffer *load*-416952 nil /Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el nil t) ; Reading at buffer position 3681 load-with-code-conversion(/Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el /Users/nslater/.emacs.d/vendor/org-mode/lisp/org.el nil t) require(org) eval-buffer(#buffer *load*-693116 nil /Users/nslater/.emacs.d/lisp/init-org.el nil t) ; Reading at buffer position 127 load-with-code-conversion(/Users/nslater/.emacs.d/lisp/init-org.el /Users/nslater/.emacs.d/lisp/init-org.el nil t) require(init-org) eval-buffer(#buffer *load* nil /Users/nslater/.emacs.d/init.el nil t) ; Reading at buffer position 2043 load-with-code-conversion(/Users/nslater/.emacs.d/init.el /Users/nslater/.emacs.d/init.el t t) load(/Users/nslater/.emacs.d/init t t) #[0 ^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\210^K\322=\203a^@\324\325\32$ command-line() normal-top-level() On 30 May 2014 14:15, Bastien b...@gnu.org wrote: Hi Noah, Noah Slater nsla...@tumbolia.org writes: That's pretty cool. Any reason it doesn't use the same syntax as the :tstart param though? I first want to see if the new feature is useful before adding up more subfeatures. So let's wait until 8.3 is released and see if (more) people want more flexibility here. In the meantime, I think it makes sense to offer the predefined ranges that we can use in org clock tables. This breaks a function I had written (and perhaps other people's functions). This is now fixed, thanks, -- Bastien
Re: [O] problems while editing in org-columns mode
Bastien b...@gnu.org writes: Let me know if it works for you, Hi! I tried a recent git snapshot (Fri May 30 19:28:04 2014 +0200) and performed some manual tests (1 to 5, see below). - in org-columns mode (C-c C-x C-c): - 1) PASS: org-columns-edit-value (e) updates correctly the empty/whitespace string - in normal org-mode (i.e. not org-columns mode): - 2) PASS: org-set-property (C-c C-x p) and org-set-property-and-value (C-c C-x P) update correctly the empty/whitespace string - 3) FAIL: when using org-set-property or org-set-property-and-value interactively, tab autocompletion for the Property: prompt can't find the name of property X if the old value of X was an empty/whitespace string - 4) FAIL: org-delete-property (M-x org-delete-property) commands skips/ignores a property name if the value is empty/whitespace string I think that commit 822dcfc881a5df3249fcecf4b7bc71ee9c321b92 addressed the tests 1) and 2) and they pass, so I'd say the commit is OK. The tests 3) and 4) pass if I use the following (naive, demonstrative-only, just-to-give-the-idea) patch: diff --git a/lisp/org.el b/lisp/org.el index d645897..a772743 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15530,7 +15530,7 @@ things up because then unnecessary parsing is avoided. (setq range (org-get-property-block beg end)) (when range (goto-char (car range)) - (while (re-search-forward org-property-re + (while (re-search-forward (org-re-property .*? 'literal t) (cdr range) t) (setq key (org-match-string-no-properties 2) value (org-trim (or (org-match-string-no-properties 3) ))) @@ -15619,7 +15619,7 @@ If yes, return this value. If not, return the current value of the variable. (if (and range (goto-char (car range)) (re-search-forward - (org-re-property property) + (org-re-property property nil t) (cdr range) t)) (progn (delete-region (match-beginning 0) (1+ (point-at-eol))) For curiosity I also tested a wrong-syntax input: - 5) if the user edits manually the :PROPERTIES: block and adds an empty-valued property (example: :prop1:) and he forgets to add at least one whitespace character after :prop1: then the tests 1)-2)-3)-4) fail I'd say: 5) is acceptable behaviour, but special care must be taken by users that hand-edit empty-valued properties, as it's easy to miss a whitespace while typing. and thanks for reporting this, Thanks to you for your work on this one. Cheers, Andrea
Re: [O] Filtering org-clock-display
Noah Slater nsla...@tumbolia.org writes: I'm getting an error on HEAD now: Please run `make' or `make autoloads'. See http://orgmode.org/manual/Installation.html -- Bastien
[O] How to find the headline matching a string
Hi all, Suppose I have a string, my first task, that I know is tagged with laptop. I want to search through the agenda files for a headline that matches this string, to be able to mark it as DONE (in an automated fashion). I can't find a function to search through for the headline --- is there one? Else, is it best to concat all the agenda files into a larger buffer, then parse the buffer and iterate through the headlines with org-element-map? Cheers, Chris
Re: [O] How to find the headline matching a string
Chris Poole li...@chrispoole.com writes: Hi all, Suppose I have a string, my first task, that I know is tagged with laptop. I want to search through the agenda files for a headline that matches this string, to be able to mark it as DONE (in an automated fashion). I can't find a function to search through for the headline --- is there one? Else, is it best to concat all the agenda files into a larger buffer, then parse the buffer and iterate through the headlines with org-element-map? Cheers, Chris Depending on how automated you need this to be, the `org-map-entries' function can be given a scope of 'agenda (see its docstring). You could call it with the agenda scope and a matcher for the laptop tag -- that would at least get you all the headings in all the agenda files with the laptop tag. Then the actual mapping function could call `org-get-heading' on each of the matching headings, and check the text. In these cases, though, I generally try to find a way to know the heading's ID property, and use `org-id-goto'. Hope that helps, Eric
[O] tyuyyyjkkllkklll
l))l
Re: [O] An org password manager
Dear Bastien, This is my first time submitting a patch, so I do not know if this is the way I am supposed to do it. Best, Jorge --- org-passwords.el: Add an org derived mode for managing passwords * contrib/lisp/org-passwords.el: new file. The file gives a mode for consulting a passwords database with entries in org format. The database opens in Read-Only mode and a timer is set to close the database. The file provides functions for making usernames and passwords available to the facility for pasting text of the window system (clipboard on X and MS-Windows, pasteboard on Nextstep/Mac OS, etc.) without inserting them in the kill-ring. It also provides functions for generating passwords as a random string of characters or as a number of random words from a dictionary. 1 file changed, 342 insertions(+) contrib/lisp/org-passwords.el | 342 ++ Newcontrib/lisp/org-passwords.el diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el new file mode 100644 index 000..8c00d61 --- /dev/null +++ b/contrib/lisp/org-passwords.el @@ -0,0 +1,342 @@ +;;; org-passwords.el --- org derived mode for managing passwords + +;; Author: Jorge A. Alfaro-Murillo jorge.alfaro-muri...@yale.edu +;; Created: December 26, 2012 +;; Keywords: passwords, password + +;; This file is NOT part of GNU Emacs. +;; +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see http://www.gnu.org/licenses/. +; +;; +;;; Commentary: + +;; This file contains the code for managing your passwords with +;; Org-mode. + +;; A basic setup needs to indicate a passwords file, and a dictionary +;; for the random words: + +;; (require org-passwords) +;; (setq org-passwords-file ~/documents/passwords.gpg) +;; (setq org-passwords-random-words-dictionary /etc/dictionaries-common/words) + +;; Basic usage: + +;; `M-x org-passwords' opens the passwords file in +;; `org-passwords-mode'. + +;; `M-x org-passwords-generate-password' generates a random string +;; of numbers, lowercase letters and uppercase letters. + +;; `C-u M-x org-passwords-generate-password' generates a random +;; string of numbers, lowercase letters, uppercase letters and +;; symbols. + +;; `M-x org-passwords-random-words' concatenates random words from +;; the dictionary defined by `org-passwords-random-words-dictionary' +;; into a string, each word separated by the string defined in +;; `org-passwords-random-words-separator'. + +;; `C-u M-x org-passwords-random-words' does the same as above, and +;; also makes substitutions according to +;; `org-passwords-random-words-substitutions'. + +;; It is also useful to set up keybindings for the functions +;; `org-passwords-copy-username' and +;; `org-passwords-copy-password' in the +;; `org-passwords-mode', to easily make the passwords and usernames +;; available to the facility for pasting text of the window system +;; (clipboard on X and MS-Windows, pasteboard on Nextstep/Mac OS, +;; etc.), without inserting them in the kill-ring. You can set for +;; example: + +;; (eval-after-load org-passwords +;; '(progn +;;(define-key org-passwords-mode-map +;; (kbd C-c u) +;; 'org-passwords-copy-username) +;;(define-key org-passwords-mode-map +;; (kbd C-c p) +;; 'org-passwords-copy-password))) + +;; Finally, to enter new passwords, you can use `org-capture' and a minimal template like: + +;; (p password entry (file ~/documents/passwords.gpg) +;;* %^{Title}\n %^{PASSWORD}p %^{USERNAME}p) + +;; When asked for the password you can then call either +;; `org-passwords-generate-password' or `org-passwords-random-words'. +;; Be sure to enable recursive minibuffers to call those functions +;; from the minibuffer: + +;; (setq enable-recursive-minibuffers t) + +;;; Code: + +(require 'org) + +(define-derived-mode org-passwords-mode org-mode + org-passwords-mode + Mode for storing passwords + nil) + +(defgroup org-passwords nil + Options for password management. + :group 'org) + +(defcustom org-passwords-password-property PASSWORD + Name of the property for password entry password. + :type 'string + :group 'org-passwords) + +(defcustom org-passwords-username-property USERNAME + Name of the property for password entry
Re: [O] tyuyyyjkkllkklll
My. Thoughts. Exactly. On Sat, May 31, 2014 at 8:46 PM, jean-jacques Rétorré jj.reto...@gmail.com wrote: l))l
Re: [O] How to find the headline matching a string
Eric Abrahamsen: the `org-map-entries' function can be given a scope of 'agenda That worked perfectly, thanks. Here's what I ended up with: (org-map-entries (lambda () (when (equal title (org-get-heading t t)) (org-entry-put (point) TODO DONE))) tag 'agenda) Cheers, Chris On Sat, May 31, 2014 at 4:27 PM, Eric Abrahamsen e...@ericabrahamsen.net wrote: Chris Poole li...@chrispoole.com writes: Hi all, Suppose I have a string, my first task, that I know is tagged with laptop. I want to search through the agenda files for a headline that matches this string, to be able to mark it as DONE (in an automated fashion). I can't find a function to search through for the headline --- is there one? Else, is it best to concat all the agenda files into a larger buffer, then parse the buffer and iterate through the headlines with org-element-map? Cheers, Chris Depending on how automated you need this to be, the `org-map-entries' function can be given a scope of 'agenda (see its docstring). You could call it with the agenda scope and a matcher for the laptop tag -- that would at least get you all the headings in all the agenda files with the laptop tag. Then the actual mapping function could call `org-get-heading' on each of the matching headings, and check the text. In these cases, though, I generally try to find a way to know the heading's ID property, and use `org-id-goto'. Hope that helps, Eric
Re: [O] How to find the headline matching a string
Chris Poole li...@chrispoole.com writes: That worked perfectly, thanks. Here's what I ended up with: (org-map-entries (lambda () (when (equal title (org-get-heading t t)) (org-entry-put (point) TODO DONE))) tag 'agenda) could you maybe send a little more of the code? I would like to understand how it exactly works. Many thanks in advance. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
[O] bug#17651: 24.3.91; Emacs hangs in Org
Sebastien Vauban wrote: Emacs 24.3.91.1 (of 2014-05-12) regularly hangs with Org-mode version 8.2.6 (release_8.2.6-1010-g1ca86f). Well I guess this is an Org bug, which will get more attention on the Org list. (See eg http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17484)
Re: [O] How to find the headline matching a string
Igor Sosa Mayor: could you maybe send a little more of the code? I would like to understand how it exactly works. Sure --- it's part of a quick setup file for the GTD methodology that I'm writing. The specific function in question is here: https://github.com/chrispoole643/org-gtd/blob/6b13d4fdf024923756653e75c0ba313898ff7a9d/org-gtd.el#L111 Cheers, Chris
Re: [O] How to find the headline matching a string
Chris Poole li...@chrispoole.com writes: Sure --- it's part of a quick setup file for the GTD methodology that I'm writing. The specific function in question is here: interesting. Thanks for sharing the code. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
Re: [O] How to find the headline matching a string
Chris Poole li...@chrispoole.com writes: Eric Abrahamsen: the `org-map-entries' function can be given a scope of 'agenda That worked perfectly, thanks. Here's what I ended up with: (org-map-entries (lambda () (when (equal title (org-get-heading t t)) (org-entry-put (point) TODO DONE))) tag 'agenda) As much as I like the powerful `org-map-entries', I wonder if it will coexist with `org-element-map' in the future, since it does not use the new parser. Whats the recommendation here? Should one rather use ,--- | (org-element-map (org-element-parse-buffer) 'headline (lambda () ...)) `--- nowadays, or do both functions serve different purposes, or is it just a matter of taste? -- cheers, Thorsten
Re: [O] Filtering org-clock-display
Works! Thanks! Can I pass in the range when calling it from a function? At the moment, I'm calling org-clock-display from a wrapper function that does some other things. It would be cool to configure a default range when calling it in that function. On 31 May 2014 16:48, Bastien b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org writes: I'm getting an error on HEAD now: Please run `make' or `make autoloads'. See http://orgmode.org/manual/Installation.html -- Bastien
Re: [O] Patch for testing `org-open-at-point'
Hi Bastien, Thank you very much for implementing this. Really appreciated. So do you think it is a good idea to add my test (the patch) now for testing this? For your convenience, I've attached again in this message the same patch I had sent on April 10. Thanks, York On Sun, Apr 20, 2014 at 3:56 PM, York Zhao gtdplatf...@gmail.com wrote: Hi Bastien, I apologize that I missed your reply, I discovered it until now when I was checking the replies in the Sent folder. The question is this: are we fine handling raw links in properties, or do we also need Org links (e.g. bracket links) there? To me, raw link is hardly useful because too often the web link is really long, in which case the bracket link acts like a way of abstraction. Thank you very much for considering this fix. On Thu, Apr 17, 2014 at 2:48 PM, Bastien b...@gnu.org wrote: Hi York, York Zhao gtdplatf...@gmail.com writes: * Peter :PROPERTIES: :ADDRESS: xxx xxx :HOME_PHONE: xxx xxx xxx :WORK_PHONE: xxx xxx xxx :URL: www.foo.bar :END: The question is this: are we fine handling raw links in properties, or do we also need Org links (e.g. bracket links) there? Speaking for me, raw links is enough, and this is what I plan to implement. But maybe other users have existing use-cases for Org links there, I don't know. -- Bastien From df0788134a16baa9762616637c0fe7f568e3e63e Mon Sep 17 00:00:00 2001 From: York Zhao gtdplatf...@gmail.com Date: Thu, 10 Apr 2014 21:21:15 -0400 Subject: [PATCH] test-org-element: Add test for `org-open-at-point' with link being heading property. --- testing/lisp/test-org-element.el | 9 + 1 file changed, 9 insertions(+) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 576e3d3..8cfceac 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1461,6 +1461,15 @@ e^{i\\pi}+1=0 (search-forward file:) (org-element-property :type (org-element-context)) +(ert-deftest test-org-element/org-open-at-point () + Test `org-open-at-point' with link being a heading property. + (org-test-with-temp-text + * Headline +:PROPERTIES: +:URL: point[[info:org#Top]] +:END: +(org-open-at-point))) + Macro -- 1.8.4
Re: [O] How to find the headline matching a string
Thorsten Jolitz tjol...@gmail.com writes: Chris Poole li...@chrispoole.com writes: Eric Abrahamsen: the `org-map-entries' function can be given a scope of 'agenda That worked perfectly, thanks. Here's what I ended up with: (org-map-entries (lambda () (when (equal title (org-get-heading t t)) (org-entry-put (point) TODO DONE))) tag 'agenda) As much as I like the powerful `org-map-entries', I wonder if it will coexist with `org-element-map' in the future, since it does not use the new parser. Whats the recommendation here? Should one rather use ,--- | (org-element-map (org-element-parse-buffer) 'headline (lambda () ...)) `--- nowadays, or do both functions serve different purposes, or is it just a matter of taste? Interesting! I wasn't even aware of org-element-map, thanks for that. Obviously I don't know the answer to your question, but they do seem to do very similar things. On the other hand, `org-element-map' won't do multiple files, and if you want to restrict to certain elements you have to do the matching logic yourself (as opposed to `org-map-entries's agenda-style search string). I'd be curious, too, to hear if `org-map-entries' is going to get EOL'd at some point. I suppose it's safe so long as `org-scan-tags' remains the heart of the agenda process. Here's my stab at two roughly equivalent functions, one using org-element, the other older function. Just for the hell of it I tried using benchmark to profile them, but have no idea if the results mean much of anything. Most importantly, I don't really know if `org-element-parse-buffer' ends up using the cache or not -- I assume not. (defun my-find-title-element-map (title) (interactive sTitle: ) (let ((files (org-agenda-files)) found) (dolist (f files) (with-current-buffer (org-get-agenda-file-buffer f) (org-element-map (org-element-parse-buffer 'headline) 'headline (lambda (hl) (when (string= title (org-element-property :title hl)) (push (move-marker (make-marker) (org-element-property :begin hl)) found)) found)) (defun my-find-title-entries-map (title) (interactive sTitle: ) (let (found) (org-map-entries (lambda () (when (string= title (org-get-heading t t)) (push (move-marker (make-marker) (line-beginning-position)) found))) nil 'agenda) found)) (benchmark-run 100 (my-find-title-element-map Unique Heading Text)) = (164.576821235 142 23.892782392000186) (benchmark-run 100 (my-find-title-entries-map Unique Heading Text)) = (58.111630133 36 6.04777874516) This isn't quite an idle inquiry: part of Gnorb does exactly this (scanning all agenda files for headings with a certain property value). While using `org-map-entries' in an interactive function is currently good enough, I'd eventually like to have it happen more often, and quickly, in non-interactive functions. I was considering making my own mini-cache, but if `org-element-map' can do it, and do it quickly (presumably using the cache), I'd much prefer using that. Thanks, Eric
[O] #+INCLUDE: myfile.html html does not include /literally/; Org processes
Hello, I am trying to include an HTML file (say myfile.html, which has only the body) in an Org file so that upon export the contents of myfile.html are /literally/ inserted in the appropriate section of the exported HTML file. Following http://orgmode.org/manual/Include-files.html, I used #+INCLUDE: myfile.html html But checking the exported HTML document, I see that the included HTML file myfile.html has been processed by Org. Other options (such as src or example) work as expected. How can I get the literal include behaviour with #+INCLUDE, as if the contents of myfile.html were wrapped in #+BEGIN_HTML #+END_HTML delimiters? I don't want to use #+BEGIN_SRC sh :results html exports results cat myfile.html #+END_SRC for these reasons: 1. myfile.html could be rather large and dumping its contents in the Org file clutters things up. 2. Changing myfile.html would change the Org file, and makes a mess since my Org file is under git version control. Thanks, -- Omid Sent from my Emacs
Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes
Omid omidl...@gmail.com writes: Hello, I am trying to include an HTML file (say myfile.html, which has only the body) in an Org file so that upon export the contents of myfile.html are /literally/ inserted in the appropriate section of the exported HTML file. Following http://orgmode.org/manual/Include-files.html, I used #+INCLUDE: myfile.html html Untested, but the doc seems to say that --8---cut here---start-8--- #+INCLUDE: myfile.html src html --8---cut here---end---8--- should work. -- Nick
Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes
Hello Nick, Thanks for your reply. But no, src html results in the included HTML being processed by Org and wrapped in pre class=src src-html, just like if the contents of myfile.html were put in #+BEGIN_SRC html #+END_SRC Omid Sent from my Emacs On 06/01/2014 12:42 AM, Nick Dokos wrote: Omid omidl...@gmail.com writes: Hello, I am trying to include an HTML file (say myfile.html, which has only the body) in an Org file so that upon export the contents of myfile.html are /literally/ inserted in the appropriate section of the exported HTML file. Following http://orgmode.org/manual/Include-files.html, I used #+INCLUDE: myfile.html html Untested, but the doc seems to say that --8---cut here---start-8--- #+INCLUDE: myfile.html src html --8---cut here---end---8--- should work.
[O] Hiding checked items in a checkbox list (FR?)
Is it possible to hide the checked items? E.g. I have a long shopping list of items I regularly buy, but for the current date I need only a dozen of them. I'd like to be able to show all the items; possibly to check all of them; then uncheck the dozen I currently need; then hide the checked items. The next problem is that MobileOrg should respect the preliminary hiding done before the visit to the shop. I do not request that it hide the checked (= bought) items as well (actually I'd prefer it to leave them checked and visible; but also its hiding-on-the-fly is quite acceptable). -- Sergio
Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes
Here is a minimal example, in case someone wants to try myfile.html: p bHello, World!/b /p orgincludehtml.org: * Test #+INCLUDE: ./myfile.html html I am using Org-mode version 8.2.6 (from ELPA) and GNU Emacs 24.3.1. Omid Sent from my Emacs On 06/01/2014 12:42 AM, Nick Dokos wrote: Omid omidl...@gmail.com writes: Hello, I am trying to include an HTML file (say myfile.html, which has only the body) in an Org file so that upon export the contents of myfile.html are /literally/ inserted in the appropriate section of the exported HTML file. Following http://orgmode.org/manual/Include-files.html, I used #+INCLUDE: myfile.html html Untested, but the doc seems to say that --8---cut here---start-8--- #+INCLUDE: myfile.html src html --8---cut here---end---8--- should work.
Re: [O] Hiding checked items in a checkbox list (FR?)
Sergio Pokrovskij writes: The next problem is that MobileOrg should respect the preliminary hiding done before the visit to the shop. I do not request that it hide the checked (= bought) items as well (actually I'd prefer it to leave them checked and visible; but also its hiding-on-the-fly is quite acceptable). Sorry, but i'm not sure i follow. Do you mean something like the following example workflow? 1. Have list of (say) 10 grocery items in org-mode. 2. Initially mark all of them as 'unneeded' by checking all items with a single command. 3. Uncheck (say) 3 items that are 'needed'. 4. Run org-mobile-push. 5. MobileOrg displays only the 3 'needed' items; the other 7 checked (i.e. unneeded) items are hidden. 6. As items are purchased and checked off the list, they can either: (a) remain visible; or (b) become hidden upon being checked. Is that correct? Alexis.