Re: [O] problems while editing in org-columns mode
Hi Andrea, I pushed another fix for the second problem you reported, something along the lines of what you suggested. Let me know if it works for you, and thanks for reporting this, -- Bastien
Re: [O] org-mode + pomodoro
Sergey Konoplev gray.ru at gmail.com writes: Hi all, Are there ways to use Pomodoro technique (http://www.pomodorotechnique.com/) with org-mode? If there are what are the best practices? Thank you in advice. There is the org-pomodoro package. https://github.com/lolownia/org-pomodoro It provides `org-pomodoro` function, which starts a countdown. In the end it starts a short or long break timer accordingly. You also get clock ticking and pomodoro finishing sounds.
Re: [O] [RFC] Org Minor Mode?
Bastien b...@gnu.org writes: Hi Bastien, Thorsten Jolitz tjol...@gmail.com writes: This is quite low level and I haven't done anything on this level yet, but it might be a way to stick with performant constant regexp strings, but make them more general. That's an idea -- but the one I wanted to explore is this: instead of running Org functions in the current buffer (e.g., an emacs-lisp-mode buffer), the functions would run transparently in a temporary buffer before updating the current one. For example, see this code in `org-open-at-point': ;; Exception n°2: links in comments. ((eq type 'comment) (let ((string-rear (replace-regexp-in-string ^[ \t]*# [ \t]* (buffer-substring (point) (line-beginning-position (string-front (buffer-substring (point) (line-end-position (with-temp-buffer (let ((org-inhibit-startup t)) (org-mode)) (insert value) (goto-char (point-min)) (when (and (search-forward string-rear nil t) (search-forward string-front (line-end-position) t)) (goto-char (match-beginning 0)) (org-open-at-point) (when (string= string-rear ) (forward-char)) Obviously, this is a bit fragile and just good enough for this defun, but we could generalize it and make it more robust. oh, I see, this must be a very recent addition, did not have this section in my version (- must update). There was a recent discussion on emacs-devel about adding a generic `inverse-comment' function to core emacs, this would be a nice use case (I would need that badly for outorg too, would enable it to deal with special multi-line comments like those in C or Java). Unfortunately they got lost in discussing how to deal with 'inline' comments, e.g. those after a line. If the devel's could be convinced to drop these special-case requirements and add a robust generic core function to emacs that inverts outcommented lines (single and multi), it would be very easy to implement this idea in a major-mode agnostic way. Would be even better if the function returned start and end point of the inverted region so one could act on it somehow afterwards. There have been proposols and even implementations, but no conclusion yet, maybe its worth to enter that discussion. This could be a solution - let many of the high-level commands check if - org-minor-mode is active - they are in a comment and if so use a temp buffer to act on the uncommented text. One problem is that more and more Org functions seems to get redefined in terms of the new parser functionality, and obviously then can't be used anymore outside org-mode. I realized this when looking at `org-open-at-point', e.g. this snippet: #+begin_src emacs-lisp (...) (let* ((context (org-element-context)) type) ;; On an unsupported type, check if point is contained within ;; a support one. (while (and (not (memq (setq type (org-element-type context)) '(headline inlinetask link footnote-definition footnote-reference timestamp))) (setq context (org-element-property :parent context (...) #+end_src Maybe this renders the whole idea of using Org functions outside of org-mode as useless? For this snippet to work, I assume the whole buffer must have been parsed successfully and thus must be in valid Org syntax? To illustrate this way of approaching the problem of using Org in non-Org buffers, consider `org-move-item-up': in an elisp comment, we would copy the comment paragraph at point in `with-temp-buffer', uncomment the buffer, call `org-move-item-up', then comment out the content and send it back to the original buffer as a replacement. I've not studied this idea thoroughly, and this may feels clumsy first, but if it spares us with the need to generalize org-mode to the point that org-mode is not really a separate mode anymore, it might be worst digging into this direction. Hope this is clearer now! Yes, thanks! I think I get your idea of rather do some more conditional action in some high-level user commands and keep the frequently called low-level functions as performant as possible. -- cheers, Thorsten
[O] org-agenda-insert-diary-make-new-entry adds entry as first child?
Hi! The documentation for org-agenda-insert-diary-make-new-entry says that it adds the entry as the last child, but it seems that it’s adding it as the first child instead. (My org-agenda-insert-diary-strategy is 'date-tree.)
Re: [O] move org line to next superior level
Uwe Ziegenhagen ziegenha...@gmail.com writes: Thorsten Jolitz tjolitz at gmail.com writes: #+begin_src emacs-lisp (defun tj/move-entry-to-next-day () Move entry at point to next parent and tag it. (unless (org-on-heading-p) (outline-previous-heading)) (org-mark-subtree) (kill-region (region-beginning) (region-end)) (org-up-heading-safe) (org-forward-heading-same-level 1) (forward-line) (yank) (outline-previous-heading) (org-mark-subtree) (org-change-tag-in-region (region-beginning) (region-end) postponed nil)) #+end_src This works with you example Org snippet, but is not tested otherwise. Hi Thorsten, your code works fine, I'd like to change it a little in that way that the original line should remain but should get the status POSTPONED I tried by inserting a new (yank) line, this didn't work as it sometimes moved the entry two headlines away. I am also not sure if org-todo is the correct command: (defun tj/move-entry-to-next-day () Move entry at point to next parent and tag it. (unless (org-on-heading-p) (outline-previous-heading)) (org-mark-subtree) (kill-region (region-beginning) (region-end)) (yank) ;; causes issues (org-todo POSTPONED) ;; is this correct? (org-up-heading-safe) (org-forward-heading-same-level 2) (forward-line) (yank) (outline-previous-heading) (org-mark-subtree) (org-change-tag-in-region (region-beginning) (region-end) postponed nil)) Here is a more robust version of the function, that works for me on your example snippet #+begin_src emacs-lisp (defun tj/copy-entry-to-next-day (state) Copy entry at point to next parent and change its STATE. (interactive sState: ) (save-excursion (save-restriction (widen) (unless (org-on-heading-p) (outline-previous-heading)) (org-copy-subtree) (org-todo state) (org-up-heading-safe) (org-forward-heading-same-level 2) (forward-line) (org-yank #+end_src thus ,--- | M-x tj/copy-entry-to-next-day RET DONE `--- converts ,- | * aaa | ** TODO | * bbb | ** TODO `- to , | * aaa | ** DONE |- State DONE from TODO [2014-05-30 Fr 11:00] | * bbb | ** TODO | ** TODO ` This works, because in my config, C-h v org-todo-keywords shows: , | org-todo-keywords is a variable defined in `org.el'. | Its value is | ((sequence TODO(t) NEXT(n) | DONE(d!/!)) | (sequence WAITING(w@/!) HOLD(h@/!) | CANCELLED(c@/!) PHONE)) | | Original value was | ((sequence TODO DONE)) ` thus DONE is defined. If you want to use POSTPONED, you need to ,- | M-x customize-variable RET org-todo-keywords `- and add it. But anyway, I still think you complicate your life unnessesary with this unidiomatic workflow. If you do use this function, the interactive part could be improve to let you select from the defined org-todo-keywords. -- cheers, Thorsten
Re: [O] still seeing semi-regular lockups
Hello, Daimrod daim...@gmail.com writes: I've attached part of the traces (the whole traces are way too big) and the backtraces. Thanks for looking into this. However, you are running a compiled Org, which renders backtraces less useful. Also, you may want to disable cache refresh on idle time with, e.g., (setq org-element-cache-sync-idle-time 3600) It could make the bug easier to reproduce. Regards, -- Nicolas Goaziou
Re: [O] org-table-copy-down incrementor
Hi Bastien, I'm late to this party I know, but wanted to confirm all is working well for me too. Best regards, Stacey On 20 May 2014, at 15:11, Bastien b...@gnu.org wrote: Hi Michael, Michael Brand michael.ch.br...@gmail.com writes: For me it would be already enough and preferred when the increment would be the same as in the two fields above point. I pushed a change in master for this -- can you please check it works as expected for you? Thanks for this suggestion! (A lot easier than other routes likes using a dedicated #+TBLINC line.) Best, -- Bastien
Re: [O] org-table: Reference *one* cell below a hline?
Hi James, James Harkins jamshar...@gmail.com writes: I have this: | Section | Seconds | |--+-| | Theme| 54 | | 12/8 | 80 | | 6/8 | 66 | | Clarinet | 116 | | Oboe | 89 | | Bassoon | 60 | |--+-| | | | #+TBLFM: @II+1$2=vsum(@I$2..@II$2) After calculation (C-u C-u C-c *), I expected: When I run this from master, I get this user-error: Can't assign to hline relative reference which implies that hline relative references are not supported here. Don't you get this error? What version of Org and Emacs are you running? -- Bastien
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
Hi Nikolai, Nikolai Weibull n...@disu.se writes: The documentation for org-agenda-insert-diary-make-new-entry says that it adds the entry as the last child, but it seems that it’s adding it as the first child instead. (My org-agenda-insert-diary-strategy is 'date-tree.) I fixed the docstring, thanks. -- Bastien
Re: [O] Filtering org-clock-display
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] getting directory of org installation in elisp
Hi Rainer, Rainer M Krug rai...@krugs.de writes: And I want to load this R code into R, controlled from org. Ok, I understand now -- then yes, you can use the etc/ directory for R code that will be loaded. But please anticipate that this new etc/ content needs to be added to Emacs when people install Org -- see how ox-odt.el is dealing with the issue of adding the data in etc/schemas and etc/styles. HTH, -- Bastien
Re: [O] org-plus-contrib package upgrade fails
Hi Sharon, Sharon Kimble boudic...@skimble.plus.com writes: If it is a failing at my end, where is hack-local-variables please and what should the suffix be? I don't have a fix for this, but I do recommend using the manual method of cloning the git repository. ~$ git clone git://orgmode.org/org-mode.git ~$ git checkout maint ~$ make autoloads Then update your load-path to load Org from where you cloned the git repository. HTH, PS: Problems with org-plus-contrib are of the kinds that make me want to let contributed Org packages to live outside of the Org core repository. -- Bastien
Re: [O] [RFC] Org Minor Mode?
Hi Thorsten, Thorsten Jolitz tjol...@gmail.com writes: One problem is that more and more Org functions seems to get redefined in terms of the new parser functionality, and obviously then can't be used anymore outside org-mode. That's not a problem if we follow the path I suggest: since the tempoary buffer we operate in will be in org-mode at some point, the parser will work there. -- Bastien
Re: [O] Moving footnotes
Hi Leonard, from the master branch, you can now use `org-footnote-inline-footnotes' to convert external footnotes into inline ones. This is also accessible from the `C-c C-x f' menu that gets displayed when calling `C-c C-x f' from a location where no sensible footnote action can be done, or from `C-u C-c C-x f', which forces the display of this menu. As for converting numbered footnotes into random ones, yes, this should be feasible -- hopefully someone can provide this hack and add it to worg/org-hacks.org. Thanks, -- Bastien
[O] Escaping again!
I have some pseudo-haskell in slides I am preparing with org and ox-reveal - \(+\):: Int → Int → Int - \(-\):: Int → Int →Int - \(\leq\):: Int → Int → Bool - \(=\):: Int → Int → Bool Those '::' are haskell for has type However putting a space before the '::' makes it into a definition list! Ive also tried making the \( \) enclose the whole line -- no use! So how to escape the :: and tell org: Please dont make this a definition list?
Re: [O] Moving footnotes
Hello, Bastien b...@gnu.org writes: from the master branch, you can now use `org-footnote-inline-footnotes' to convert external footnotes into inline ones. You didn't ask for it, but here are a few comments about it anyway ;) (concat org-footnote-re \\]) will fail for numbered footnotes, since the regexp already contains the closing bracket for this case. I suggest to use: (while (re-search-forward org-footnote-re nil t) (let ((context (save-excursion (backward-char) (org-element-context (when (and (eq (org-element-type context) 'footnote-reference) (eq (org-element-property :type context) 'standard)) ...))) Also, as a rule of thumb, (car (org-element-at-point)) = (org-element-type (org-element-at-point)) Indeed, `car' relies on the internal representation of the object, which might change. Public interface is less likely to do so. You don't need to use `org-forward-element' since you called `org-element-at-point', which will give you all the information needed, which is probably (org-element-property :end element). You should check if `org-footnote-section' is not nil before trying to remove it. Eventually, you should note that this process is bound to fail in some situations, as footnote definitions can contain way more objects than inline ones (e.g., lists, tables, multiple paragraphs ...). Worse, it will break the current document when attempting to do so since footnote definitions can contain blank lines. All in all, I'm not convinced this should be a function provided in Org. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org Minor Mode?
Bastien b...@gnu.org writes: Hi Bastien, Thorsten Jolitz tjol...@gmail.com writes: One problem is that more and more Org functions seems to get redefined in terms of the new parser functionality, and obviously then can't be used anymore outside org-mode. That's not a problem if we follow the path I suggest: since the tempoary buffer we operate in will be in org-mode at some point, the parser will work there. I'm still not sure if this path isn't just the outorg path: copy a subtree or a whole buffer into a temp-buffer, uncomment the comment sections, enclose the source-code in source-blocks, and put the buffer in Org-mode - only that the tmp buffer in this case is not for user editing but for program execution. What will be copied to the temp-buffer? Only the comment-section at point? The subtree at point? The (outcommented) element at point? Won't some Org functions fail without the subtree/buffer context? What if text is inserted as side-effect? E.g state change logs when going from TODO to done, or even footnotes? -- cheers, Thorsten
Re: [O] BUG in reference by ID to remote table (was Re: org babel question: reference tables in remote file)
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: You didn't ask for it, but here are a few comments about it anyway ;) Sure ! I unconsciously asked, I guess. 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, rewrite the function with the suggested enhancements and add it to worg/org-hacks.org? If you don't want to clean my dirt after me that's okay, I will do so later on. Thanks, PS: I think it's useful to trigger the org-footnote-action menu when org-footnote-new cannot do anything useful. -- Bastien
Re: [O] [RFC] Org Minor Mode?
Hi Thorsten, Thorsten Jolitz tjol...@gmail.com writes: I'm still not sure if this path isn't just the outorg path: copy a subtree or a whole buffer into a temp-buffer, uncomment the comment sections, enclose the source-code in source-blocks, and put the buffer in Org-mode - only that the tmp buffer in this case is not for user editing but for program execution. Yes -- that's the outorg path but transparent to the user, with no editing in the middle. What will be copied to the temp-buffer? Only the comment-section at point? The subtree at point? The (outcommented) element at point? Won't some Org functions fail without the subtree/buffer context? What if text is inserted as side-effect? E.g state change logs when going from TODO to done, or even footnotes? Well, I don't know. Again, all this feels certainly dirty, but I'm trying to find something that will feel less awkward than making tons of Org regexps relative to their contexts, including the context for non-org-mode buffers... -- Bastien
Re: [O] Escaping again!
Hi Rustom, Rustom Mody rustompm...@gmail.com writes: - \(+\):: Int → Int → Int - \(-\):: Int → Int →Int - \(\leq\):: Int → Int → Bool - \(=\):: Int → Int → Bool 1. \(+\) :: Int → Int → Int 2. \(-\) :: Int → Int →Int 3. \(\leq\) :: Int → Int → Bool 4. \(=\) :: Int → Int → Bool would do -- but this is not entirely satisfactory. For now description lists accept both - and +. I'm all for allowing only - so that we could use + \(+\) :: Int → Int → Int + \(-\) :: Int → Int →Int + \(\leq\) :: Int → Int → Bool + \(=\) :: Int → Int → Bool in your example. What do you and others think? -- Bastien
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
On Fri, May 30, 2014 at 2:10 PM, Bastien b...@gnu.org wrote: Nikolai Weibull n...@disu.se writes: The documentation for org-agenda-insert-diary-make-new-entry says that it adds the entry as the last child, but it seems that it’s adding it as the first child instead. (My org-agenda-insert-diary-strategy is 'date-tree.) I fixed the docstring, thanks. Wouldn’t it be better to fix the function? I’m thinking that you probably want entries added later during the day to appear later in the file, right? (I’m asking before I consider writing a patch.) Thanks!
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
Hi Nikolai, Nikolai Weibull n...@disu.se writes: Wouldn’t it be better to fix the function? I’m thinking that you probably want entries added later during the day to appear later in the file, right? Personally, I prefer to have recent entries added at the top. (I’m asking before I consider writing a patch.) The thing to check is whether the current behavior is consistent across possible values of `org-agenda-insert-diary-strategy'. Can you do this? Thanks, -- Bastien
Re: [O] [RFC] Org Minor Mode?
Bastien b...@gnu.org writes: Hi Bastien, Thorsten Jolitz tjol...@gmail.com writes: What will be copied to the temp-buffer? Only the comment-section at point? The subtree at point? The (outcommented) element at point? Won't some Org functions fail without the subtree/buffer context? What if text is inserted as side-effect? E.g state change logs when going from TODO to done, or even footnotes? Well, I don't know. Again, all this feels certainly dirty, but I'm trying to find something that will feel less awkward than making tons of Org regexps relative to their contexts, including the context for non-org-mode buffers... I thought about a very low level solution, i.e. at the syntax table level, giving ^ ... $ a different meaning, but thats a bit over my head and I have my doubt if its possible at all. BTW, I think I already implemented your idea for when porting the speed commands to outshine: ,-- | (defconst outshine-speed-commands-default | '( | (Outline Navigation) | (n . (outshine-speed-move-safe | 'outline-next-visible-heading)) | [...] | (j . (outshine-use-outorg 'org-goto)) | (g . (outshine-use-outorg 'org-refile)) | (Outline Visibility) | (c . outline-cycle) | (C . outshine-cycle-buffer) | ;; FIXME needs to be improved! | ( . (outshine-use-outorg | (lambda () | (message |%s (substring-no-properties | (org-display-outline-path))) |(sit-for 1)) | 'WHOLE-BUFFER-P)) |[...] `-- This `outshine-use-outorg' function does more or less what you talk about: #+begin_src emacs-lisp (eval-after-load 'outorg '(defun outshine-use-outorg (fun optional whole-buffer-p rest funargs) Use outorg to call FUN with FUNARGS on subtree. FUN should be an Org-mode function that acts on the subtree at point. Optionally, with WHOLE-BUFFER-P non-nil, `outorg-edit-as-org' can be called on the whole buffer. Sets the variable `outshine-use-outorg-last-headline-marker' so that it always contains a point-marker to the last headline this function was called upon. The old marker is removed first. Then a new point-marker is created before `outorg-edit-as-org' is called on the headline. (save-excursion (unless (outline-on-heading-p) (outline-previous-heading)) (outshine--set-outorg-last-headline-marker) (if whole-buffer-p (outorg-edit-as-org '(4)) (outorg-edit-as-org)) (if funargs (funcall fun funargs) (funcall fun)) (outorg-copy-edits-and-exit #+end_src So maybe I should stop insisting on an org-minor-mode, because outshine and outorg together already do the trick? I just thought it would be better, faster and more powerfull if Org's regexps would be more abstract and Org functions could act directly in the programming mode buffers. -- cheers, Thorsten
[O] Printable calendar?
I'm trying to make a printable calendar of my bike commuting trips during the month of May. I don't need any fancy calendar functions, so I figured a simple table would do it. I created the ord file whose contents are below, but when I export to HTML, there are some quirks ... 1) Some of the dates are right aligned within the cells, and others left. 2) I'd like to have full borders on the table Also, is there a better way to do this? I know emacs has calendar tools, and org has diary and agenda tools, but they seemed like overkill for trying to get a simple calendar page printed. Thanks, -pd cut here #+STARTUP: showeverything logdone #+options: num:nil toc:nil #+author: Peter Davis #+title: Every Day in May 2014 | Sun | Mon | Tue | Wed | Thu | Fri | Sat | |--+-+-+-+-+-+--| | | | | | 1 | 2 | 3| | | | | | | | | | | | | | AM: 3.6 | AM: 3.6 | AM: 7.6 | | | | | | PM: 3.7 | PM: 3.7 | AM: 7.6 | |--+-+-+-+-+-+--| |4 | 5 | 6 | 7 | 8 | 9 | 10 | | | | | | | | | | AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1 | | | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 | | |--+-+-+-+-+-+--| | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | | | | *BIKE* | | | AM: 7.6 | | | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1 | | | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 | |--+-+-+-+-+-+--| | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | | | | | | | | | | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5 | | | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | | | |--+-+-+-+-+-+--| | 25 | 26 | 27 | 28 | 29 | 30 | 30 | | *BIKE* | | | *TRIKE* | | | | | AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 | | | | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | | | |--+-+-+-+-+-+--| cut here -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
Re: [O] [RFC] Org Minor Mode?
Hi Thorsten, Thorsten Jolitz tjol...@gmail.com writes: So maybe I should stop insisting on an org-minor-mode, because outshine and outorg together already do the trick? Indeed! (Do you have a screencast demonstrating this? It's all a bit abstract when put in words.) I just thought it would be better, faster and more powerfull if Org's regexps would be more abstract and Org functions could act directly in the programming mode buffers. I'm surely getting old, but better is the ennemy of good. If we already have something that fills the needs for org-minor-mode, then let's advertize this more and spare the work involved by making things faster... (do you really need to make outshine+outorg faster?) -- Bastien
Re: [O] still seeing semi-regular lockups
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Daimrod daim...@gmail.com writes: I've attached part of the traces (the whole traces are way too big) and the backtraces. Thanks for looking into this. However, you are running a compiled Org, which renders backtraces less useful. Ok, I was wondering why the backtraces was so ugly, I didn't think about byte-compilation... Thanks for the tip. Also, you may want to disable cache refresh on idle time with, e.g., (setq org-element-cache-sync-idle-time 3600) It could make the bug easier to reproduce. Thanks, I'll try again this w.e. Best, -- Daimrod/Greg
Re: [O] [RFC] Org Minor Mode?
Bastien b...@gnu.org writes: Hi Bastien, Thorsten Jolitz tjol...@gmail.com writes: So maybe I should stop insisting on an org-minor-mode, because outshine and outorg together already do the trick? Indeed! (Do you have a screencast demonstrating this? It's all a bit abstract when put in words.) Not yet, but outshine users know that they can use many of the same speed commands on outshine headers like on org headers. I'll see if I can upload something to youtube. I just thought it would be better, faster and more powerfull if Org's regexps would be more abstract and Org functions could act directly in the programming mode buffers. I'm surely getting old, but better is the ennemy of good. If we already have something that fills the needs for org-minor-mode, then let's advertize this more and spare the work involved by making things faster... (do you really need to make outshine+outorg faster?) My motivation for an org-minor-mode came from situations where I wanted some feature for outshine, like e.g. the :archive: tag (that keeps subtrees permanently folded and would be very useful for hiding commentary subtrees in programming mode files) or visibility cycling for other elements than headlines, and I figured that it was all there in Org-mode, but I would have to reimplement it on top of the outline.el backend. After this discussion it seems that reimplementing things is still the better (and maybe the only viable) option. So lets close this thread, and I focus on improving outshine/outorg so that they become (not by name, but by functiionality) a kind of Org minor-mode. Thanks for your time and input! -- cheers, Thorsten
Re: [O] Escaping again!
Hi Bastien On Fri, May 30, 2014 at 7:30 PM, Bastien b...@gnu.org wrote: Hi Rustom, Rustom Mody rustompm...@gmail.com writes: - \(+\):: Int → Int → Int - \(-\):: Int → Int →Int - \(\leq\):: Int → Int → Bool - \(=\):: Int → Int → Bool 1. \(+\) :: Int → Int → Int 2. \(-\) :: Int → Int →Int 3. \(\leq\) :: Int → Int → Bool 4. \(=\) :: Int → Int → Bool would do -- but this is not entirely satisfactory. For now description lists accept both - and +. I'm all for allowing only - so that we could use + \(+\) :: Int → Int → Int + \(-\) :: Int → Int →Int + \(\leq\) :: Int → Int → Bool + \(=\) :: Int → Int → Bool in your example. What do you and others think? If you are asking me about a proposed change, I thank you for the consideration :-) Please dont take the following too seriously -- I am just spoilt by the fact that I am an old programmer. Here is a command I ran on the org sources and its output: $ grep -r '' . ./contrib/lisp/ox-groff.el: \\(\\)?[ \t]*\n .br\n output))) ./lisp/ox-latex.el:\\(\\)?[ \t]*\n \n output))) ./lisp/ox-latex.el: \\(\\)?[ \t]*\n \n contents))) ./lisp/ox-odt.el:\\(\\)?[ \t]*\n text:line-break/ output t))) ./lisp/ox-man.el: (setq output (replace-regexp-in-string \\(\\)?[ \t]*\n .br\n ./lisp/ox-html.el: \\(\\)?[ \t]*\n ./lisp/ox-html.el: \\(\\)?[ \t]*\n ./lisp/ox-texinfo.el:\\(\\)?[ \t]*\n @*\n output))) ./lisp/ox-texinfo.el: \\(\\)?[ \t]*\n \n contents))) ./lisp/org.el:(looking-at \\($\\|[^]\\ So sometimes we need that much ESCAPE-ing. I realise that the general support for escaping in org is much harder than in a programming language like lisp because there are so many different contexts and different entities to escape. However I would also like to humbly submit that if one doesn't have systematic general escaping, there will always be legitimate uses that will not be addressable. Anyways… if you are doing this just for me (!) very kind of you! For now I am getting along using '꞉' (Unicode 0xA789). Regards, Rusi -- http://blog.languager.org
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
On Fri, May 30, 2014 at 4:04 PM, Bastien b...@gnu.org wrote: Nikolai Weibull n...@disu.se writes: Wouldn’t it be better to fix the function? I’m thinking that you probably want entries added later during the day to appear later in the file, right? Personally, I prefer to have recent entries added at the top. (I’m asking before I consider writing a patch.) The thing to check is whether the current behavior is consistent across possible values of `org-agenda-insert-diary-strategy'. Can you do this? When set to 'top-level, the documentation mentions that it adds it to the end of the file and testing confirms this. It thus seems more consistent to always add entries towards the end of the file.
Re: [O] Escaping again!
[...] if one doesn't have systematic general escaping, there will always be legitimate uses that will not be addressable. +1 As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of course the reverse function.) I've never even looked for one, though, because it is my understanding that org does not have general-case escaping, and without that, no such function could be complete (and stay complete). I understand that it won't be easy, since every character I can see on my keyboard already has a purpose (or three). To review: my requested new function is conceptually simple. If the implementation can't be simple due to the lack of general-case escaping, then maybe this is an argument in favor of a deep change to org, but, that's a conversation I don't know how to participate in. So good luck and thanks for your consideration, and thanks for such a useful piece of software. :) Cheers, --Dave
Re: [O] Printable calendar?
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? Thanks, -pd cut here #+ATTR_HTML: :border 2 :frame border | Sun | Mon | Tue | Wed | Thu | Fri | Sat | |--+-+-+-+-+-+--| | /| | | | | || | | | | | 1 | 2 | 3| | | | | | | | | | | | | | AM: 3.6 | AM: 3.6 | AM: 7.6 | | | | | | PM: 3.7 | PM: 3.7 | AM: 7.6 | |--+-+-+-+-+-+--| | 4| 5 | 6 | 7 | 8 | 9 | 10 | | | | | | | | | | AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1 | | | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 | | |--+-+-+-+-+-+--| | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | | | | *BIKE* | | | AM: 7.6 | | | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1 | | | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 | |--+-+-+-+-+-+--| | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | | | | | | | | | | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5 | | | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | | | |--+-+-+-+-+-+--| | 25 | 26 | 27 | 28 | 29 | 30 | 30 | | *BIKE* | | | *TRIKE* | | | | | AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 | | | | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | | | |--+-+-+-+-+-+--| cut here -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
Hi Nikolai, Nikolai Weibull n...@disu.se writes: When set to 'top-level, the documentation mentions that it adds it to the end of the file and testing confirms this. It thus seems more consistent to always add entries towards the end of the file. Okay -- please go ahead with a patch if you have time. Thanks, -- Bastien
Re: [O] Escaping again!
Hi Rustom, Rustom Mody rustompm...@gmail.com writes: Anyways… if you are doing this just for me (!) very kind of you! Well, I will make a separate thread asking if other users would be fine with the change -- but glad you found the solution above. -- Bastien
[O] taskjuggler exporter ignores SCHEDULED attribute and requires a space between BLOCKER tasks
The attached file demonstrates two bugs regarding the task juggler exporter. I load the ox-taskjuggler file and export with the key sequence C-c C-e J j 1. SCHEDULED date is not exported as a start attribute. 2. The BLOCKER attribute requires a space between two dependency tasks. For example, Task 3 in the attached file depends on Task 1 and Task 2. Setting :BLOCKER: aa,bb has no impact on the generated file. The attribute is ignored. If I set :BLOCKER: aa, bb (note the space between aa and bb), the produced file declares the dependency. * Project A :taskjuggler_project: :PROPERTIES: :leaves_holiday: Ascension Day 2014-05-29 :leaves_holiday: Whit Monday 2014-06-9 :leaves_holiday: Bastille Day 2014-07-14 :leaves_holiday: Assumption of Mary 2014-08-15 :leaves_holiday: Armistice Day 2014-11-11 :leaves_holiday: Christmas Eve 2014-12-24 :leaves_holiday: Christmas Day 2014-12-25 :leaves_holiday: St Stephen's Day 2014-12-26 :leaves_holiday: New Year's Eve 2014-12-31 :start: 2014-05-05 :END: *** TODO Task 1 SCHEDULED: 2014-06-18 Wed :PROPERTIES: :start: 2014-06-18 :Effort: 1w :allocate: dev :task_id: aa :BLOCKER: previous-sibling # :start: 2014-05-30 :END: *** TODO Task 2 SCHEDULED: 2014-06-20 Fri :PROPERTIES: :Effort: 1w :allocate: dev :task_id: bb :BLOCKER: previous-sibling # :start: 2014-05-30 :END: *** TODO Task 3 SCHEDULED: 2014-06-26 Thu :PROPERTIES: :Effort: 1w :allocate: dev :task_id: cc :BLOCKER: aa,bb # :start: 2014-05-30 :END: * Resources:taskjuggler_resource: ** Developer :PROPERTIES: :resource_id: dev :resource_email: d...@mail.org :END:
Re: [O] getting directory of org installation in elisp
Bastien b...@gnu.org writes: Hi Rainer, Hi Bastien, Rainer M Krug rai...@krugs.de writes: And I want to load this R code into R, controlled from org. Ok, I understand now -- then yes, you can use the etc/ directory for R code that will be loaded. But please anticipate that this new etc/ content needs to be added to Emacs when people install Org -- see how ox-odt.el is dealing with the issue of adding the data in etc/schemas and etc/styles. Thanks for the hint to look at ox-odt.el ant their file in etc/ - I was thinking about the installation issue but didn't look at it in detail yet. HTH, Definitely, Rainer -- 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 pgpdPRk94rByy.pgp Description: PGP signature
Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?
On Fri, May 30, 2014 at 5:24 PM, Bastien b...@altern.org wrote: Hi Nikolai, Nikolai Weibull n...@disu.se writes: When set to 'top-level, the documentation mentions that it adds it to the end of the file and testing confirms this. It thus seems more consistent to always add entries towards the end of the file. Okay -- please go ahead with a patch if you have time. Here’s a suggested solution. We keep track of whether the parent entry already has any children, then we call org-insert-heading with two universal arguments to add an entry at the end of the current subtree. Finally, if there weren’t any children already, we demote the entry we added so that it becomes a child of the parent entry. Please note that this was written while eating dinner with my kid. (defun org-agenda-insert-diary-make-new-entry (text) Make new entry as last child of current entry. Add TEXT as headline, and position the cursor in the second line so that a timestamp can be added there. (let ((org-show-following-heading t) (org-show-siblings t) (org-show-hierarchy-above t) (org-show-entry-below t) (has-children (save-excursion (org-goto-first-child))) col) (org-back-over-empty-lines) (or (looking-at [ \t]*$) (progn (insert \n) (backward-char 1))) (org-insert-heading 16 t) (unless has-children (org-do-demote)) (setq col (current-column)) (insert text \n) (if org-adapt-indentation (org-indent-to-column col)) (let ((org-show-following-heading t) (org-show-siblings t) (org-show-hierarchy-above t) (org-show-entry-below t)) (org-show-context (org-show-context
Re: [O] A version of `show-branches' that doesn't expand archivedsubtreess
Say I've got the following file: --begin-- * Top ** Second *** Third ** Archive :ARCHIVE: *** Thing *** Another thing --end-- I'd like to be able to put the cursor at the beginning of that top heading and press (e.g.) C-u C-c C-k, and have it then fold as this: --begin-- * Top ** Second *** Third ** Archive :ARCHIVE:... --end-- (Side note: what's the function for the pretty scissors begin/end thing?) Thanks, gnrc Bastien b...@gnu.org writes: GNRC vd43...@yahoo.com writes: Is there such a function? Please be more explicit about what you need.
Re: [O] Escaping again!
David Loyall wrote: [...] if one doesn't have systematic general escaping, there will always be legitimate uses that will not be addressable. +1 As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of course the reverse function.) Just another instance that I had to deal with today. When using reveal and ox-reveal one needs to set #+REVEAL_ROOT: path/to/reveal.js I wanted to 'comment out' that line. After trying ':' and single-quote neither of which worked, I finally got it by making it into: #+REVEAL_ROOT_XX: ...
Re: [O] Printable calendar?
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): --8---cut here---start-8--- #+ATTR_HTML: :border 2 :frame border | | Sun | Mon | Tue | Wed | Thu | Fri | Sat | |---+--+-+-+-+-+-+--| | / | l | | | | | | l | |---+--+-+-+-+-+-+--| | | | | | | 1 | 2 | 3| | | | | | | | | | | | | | | | AM: 3.6 | AM: 3.6 | AM: 7.6 | | | | | | | PM: 3.7 | PM: 3.7 | AM: 7.6 | |---+--+-+-+-+-+-+--| | | 4| 5 | 6 | 7 | 8 | 9 | 10 | | | | | | | | | | | | AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1 | | | | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 | | |---+--+-+-+-+-+-+--| | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | | | | | *BIKE* | | | AM: 7.6 | | | | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1 | | | | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 | |---+--+-+-+-+-+-+--| | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | | | | | | | | | | | | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5 | | | | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | | | |---+--+-+-+-+-+-+--| | | 25 | 26 | 27 | 28 | 29 | 30 | 30 | | | *BIKE* | | | *TRIKE* | | | | | | AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 | | | | | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | | | |---+--+-+-+-+-+-+--| --8---cut here---end---8--- 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.
Re: [O] Escaping again!
Rustom Mody rustompm...@gmail.com writes: David Loyall wrote: [...] if one doesn't have systematic general escaping, there will always be legitimate uses that will not be addressable. +1 As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of course the reverse function.) Just another instance that I had to deal with today. When using reveal and ox-reveal one needs to set #+REVEAL_ROOT: path/to/reveal.js I wanted to 'comment out' that line. After trying ':' and single-quote neither of which worked, I finally got it by making it into: #+REVEAL_ROOT_XX: ... I usually just do # +FOO adding a space. Nick
Re: [O] A version of `show-branches' that doesn't expandarchivedsubtreesss
Alexander Baier alexander.ba...@mailbox.org writes: On 2014-05-30 18:27 GNRC wrote: Say I've got the following file: --begin-- * Top ** Second *** Third ** Archive :ARCHIVE: *** Thing *** Another thing --end-- I'd like to be able to put the cursor at the beginning of that top heading and press (e.g.) C-u C-c C-k, and have it then fold as this: --begin-- * Top ** Second *** Third ** Archive :ARCHIVE:... --end-- I do not know how to do this with C-c C-k, but pressing TAB twice on the level one heading works for me just as well. The subtree tagged with :ARCHIVE: will only open when you press C-TAB. Ah, my example was incomplete: Start with --8---cut here---start-8--- * Top top contents ** Second second contents *** Third third contents ** Archive :ARCHIVE: *** Thing thing contents *** Another thing another thing contents --8---cut here---end---8--- and then get to --8---cut here---start-8--- * Top ** Second *** Third ** Archive :ARCHIVE:... --8---cut here---end---8--- TAB twice shows the contents. I just want to see the heading structure, but not that which is under archived subtrees. (Side note: what's the function for the pretty scissors begin/end thing?) Do you mean `message-mark-inserted-region', bound to C-c m in gnus? Yup, thanks. I'm using mu4e, so it C-c M-m, for any interested mu4e users. HTH,
Re: [O] Escaping again!
Nick Dokos ndo...@gmail.com writes: I usually just do # +FOO Well, I do # #+FOO so that uncommenting makes this right again. -- Bastien
Re: [O] taskjuggler exporter ignores SCHEDULED attribute and requires a space between BLOCKER tasks
Hi Anakreontas, Anakreontas Mentis anakreontas.men...@imag.fr writes: The attached file demonstrates two bugs regarding the task juggler exporter. I load the ox-taskjuggler file and export with the key sequence C-c C-e J j This is the same bug than the one you reported here, right? http://article.gmane.org/gmane.emacs.orgmode/86923 If so, please wait at least two weeks before bumping the thread. Thanks, -- Bastien
[O] Searching on gmane fails
I get a Forbidden error message, either from gnus or from the web. Anybody else seeing that? Nick