Re: [O] [PATH] Speedups to org-table-recalculate
Hi On Sat, Oct 11, 2014 at 12:16 PM, Michael Brand wrote: > Hi Nathaniel > > On Fri, Oct 10, 2014 at 9:43 PM, Nathaniel Flath > wrote: > > Mine is a pretty simple table (takes less than a second even in the > original > > case): > > Earlier I assumed that the issue is a very high number of messages > from the loops. Now your example table clarifies to me that the issue > is that already just one single message can take a significant time of > a message-less table recalculation (your 17 ms). > > Only with this I understand now why you want to remove also the > beginning/end processing messages. Good point as it should be > noticeable at least for org-table-iterate-buffer-tables in a buffer > with many tables where each one takes a short time to recalculate. > > I really wonder what the reason is that this > > (progn > (message "%d" (random)) ;; Prevent collapsing of message lines. > (time (message nil))) > > in a terminal (emacs -nw) shows most of the times only 0.05 to 0.10 ms > but in a window it shows most of the times 8 to 22 ms (here: GNU Emacs > 24.3.1 on Mac OS X 10.9). Which Emacs version and OS are you using? > I'm running 24.3.1 on Mac OS X 10.8.4. > > For your patch I suggest to remove only the first message and to add > the time check to all other messages. This should not make the patch > noticeably slower but would keep showing the progress for table > recalculations that last more than one second. To clean up the last > loop message from the mode line I suggest to check the end messages > against the very first log time in contrast to the next log time used > for the loop messages (variables "log_first" and "log_next" instead of > just "log"). > > I suggest you split your patch: One for "(when eqlist" and one for the > messages. The change with the messages will then become human readable > also with a simple line diff. OK, sounds reasonable. Patches are attached. > > > Original recalculation: (0 0 396224 0) > > > Version w/ time checks for per-field messages (still always printing at > > beginning/end of processing):(0 0 56929 0) > > > Version w/ time checks and removing all beginning/end of processing > > messages: (0 0 22077 0) > > > My patch: (0 0 17405 0) > > I could not reproduce a reliable difference between the last two. As > expected both did not log any message. Can you? > Rrunning more iterations they seemed to be mostly equal. Patches are attached. > > Michael > org-table-speedup-1.patch Description: Binary data org-table-speedup-2.patch Description: Binary data
Re: [O] Getting "org-mobile-sync" to work.
Sharon Kimble writes: > I'm trying to get mobileorg set up and working, which has worked. But I > also want to use "org-mobile-sync.el" from ELPA, the actual package > being "org-mobile-sync-20131118.1116". Looking at the source file it > says - > > --8<---cut here---start->8--- > ;;; Commentary: > > ;; Adds delayed `org-mobile-push' upon saving files that are part of > ;; `org-mobile-files-alist'. Watches the `org-mobile-capture-file' for > ;; changes with `file-notify.el' and then invokes `org-mobile-pull'. > > ;;; Requirements: > > ;; Emacs 24.3.50 with `file-notify-support' is required for it to work. > --8<---cut here---end--->8--- > > But I can't find "file-notify.el" on my system, nor by googling for it > either. Can somebody help me to get the file please? > > How do I know if "file-notify-support" is part of my Emacs please? If i understand correctly (and if i don't, please correct me!), 24.3.50 was the base for what has become the 24.4 pre-release / release candidate series. i'm running version 24.3.94.2, via the emacs-24 branch, which contains a package `filenotify.el` (note lack of dash!), and which i can successfully `require` Perhaps this is what `org-mobile-sync` is wanting? Alexis.
Re: [O] after-todo-statistics hook for checkboxes
At Fri, 17 Oct 2014 22:22:20 +0200, Nicolas Goaziou wrote: > This is because checkboxes (plain lists) are not related to TODO > keywords (headlines). There are TODO statistics cookies and checkbox > statistics cookies. Only the former run a hook once updated. Thanks for clarifying. I hadn't understood that distinction. It occurred to me, after I sent my last e-mail, that someone might want one action after updating todo statistics and a different action after updating checkbox statistics. Using the same hook for both wouldn't be correct in that case. So let me update my issue report/feature request: -- If there is a hook to do something after updating todo statistics, then it would make sense to have a hook for updating checkbox statistics as well. That hook should be called with the same arguments (n-done n-not-done) so that the user could use one function for both, if desired. I can do this pretty easily and update the documentation. I don't have FSF papers signed, but I'm willing to get that ball rolling as well. But before spending any time on that, I want to ask if this is okay. I understand the objection against pressing org-after-todo-statistics-hook into service for checkboxes. If there's an objection against simply *having* a hook for checkboxes, I'm afraid I don't understand that. Thanks for your patience, hjh
Re: [O] How to change a link?
On 2014-10-17, at 00:19, Thorsten Jolitz wrote: > However, here is a org-dp solution, use 't' instead of 'prepend to > replace the links, and whatever you want instead of "file+emacs" as > replacement. Of course one could easily re-search and replace "[[file:" > in this simple case, but this uses the parser and allows doing more > complex stuff in a clean way too: > > , > | * ORG SCRATCH > | > | ** Level 2 > | > | [[file+emacs:~/junk/org/minimal.org][min.org]] > | > | [[file:~/junk/org/minimal.org][min.org]] > | > | *** Level 3 > | > | [[file+emacs:~/junk/org/trash-me.org][trash.org]] > | > | [[file:~/junk/org/trash-me.org][trash.org]] > | > | > | #+BEGIN_SRC emacs-lisp :results none > | (require 'org-dp) > | (org-dp-map > |'(org-dp-rewire > | 'paragraph > | (lambda (cont elem) > |(let* ((link (car cont)) > | (raw-val (org-element-property :raw-link link)) > | (new-val (mapconcat 'identity > | (cons "file+emacs" > | (cdr > | (split-string > | raw-val ":" t))) > | ":"))) > | (org-element-put-property link :raw-link new-val))) > | 'prepend) > |org-link-re-with-space t) > | #+END_SRC > ` Hi Thorsten, one thing I don't quite understand yet: why is the first argument to org-dp-rewire `'paragraph'? My intuition says it should rather be 'link, though this doesn't seem to work. How come that you say 'paragraph, but the lambda in the second parameter gets the link data in `cont'? (This might be a stupid question, but I really want to grok this.) Second question: do I get it correctly that `org-element-put-property' returns the "new" version of the element (link, in this case), with everything as it was but the :raw-link property changed? TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] after-todo-statistics hook for checkboxes
Hello, James Harkins writes: > I'm sorry to be a pest, but I did get sent on a wild goose chase by > what is either a/ faulty behavior or b/ a faulty docstring. The > docstring of org-after-todo-statistics-hook says: "Hook that is called > after a TODO statistics cookie has been updated." Well, that isn't > true. Changing a checkbox updates a stats cookie, and the hook is > *not* called. This is because checkboxes (plain lists) are not related to TODO keywords (headlines). There are TODO statistics cookies and checkbox statistics cookies. Only the former run a hook once updated. > And it took more than an hour to figure that out. So, > for the sake of users dealing with this in the future, let's at least > fix the docstring then. Please provide a patch if you think a docstring can be improved. Regards, -- Nicolas Goaziou
Re: [O] [ox-latex] How to force ALL captions below their referents?
Nicolas Goaziou writes: > If we want to preserve backward-compatibility, t, nil and a list of > types (e.g. '(table src-block)) should suffice. No need for an alist. > > Still on my ToDo list but I'm not there yet. Feel free to beat me to it > if you want. Done. Feedback welcome.
[O] Hour times in sexp diary entries
I've been told that putting the our in the header is non-standard and not really supported; however, I can't find any other way to get an hour in there. *** 19:00-20:15 Scout Night (1st and 4th Wednesday) <%%(diary-float t 3 1)> <%%(diary-float t 3 4)> Appending an hour specification after the float doesn't seem to work (although I saw it advised somewhere), and I don't see a way to pu the hour in the float. Is putting it in the header really the proper way to do it, or is it likely to be dropped from versions somewhere in the future?
[O] in-agenda item formatting
I notice that the agenda doesn't support markup the way standard org files do; I can't use +strikeout+ to mark appointments I've missed, or *bold* to emphasize things. Is there an option to turn this on, or a simple patch to enable font markup?
Re: [O] How to change a link?
Marcin Borkowski writes: > On 2014-10-17, at 00:19, Thorsten Jolitz wrote: > >>> OK, so what is the canonical way of doing this? I don't want to use >>> org-dp, since it is another dependency. >> >> It is a problem to add dependencies to libraries the user must install >> himself, and at the same time its a pity that there is so much >> duplication instead of reuse ... > > Very true. I'm torn inside;). > >> However, here is a org-dp solution, use 't' instead of 'prepend to >> replace the links, and whatever you want instead of "file+emacs" as >> replacement. Of course one could easily re-search and replace "[[file:" >> in this simple case, but this uses the parser and allows doing more >> complex stuff in a clean way too: > > I'll study it, thanks! > Why not move org-dp into contrib? It's still a dependency but it's easier to satisfy if it's in contrib. Or, if it's deemed useful enough, even moved into core (perhaps after some cleanup)? Nick
Re: [O] # of parameters of `org-latex-format-headline-function'
Sebastien Vauban writes: > Hello, > > During the summer, the number of parameters of the > `org-latex-format-headline-function' changed from 5 to 6: addition of > `info'. > > The new version of my private formatting function is: > > ;; function for formatting the headline's text > (setq org-latex-format-headline-function > 'my/org-latex-format-headline) > > ;; markup for TODO keywords and for tags, as a printf format > (defun my/org-latex-format-headline (todo todo-type priority text tags info) > "Default function for formatting the headline's text." > (concat (when todo > (format "{%s\\textbf{\\textsc{\\textsf{%s " > (cond ((equal todo-type 'todo) "\\color{red}") > ((equal todo-type 'done) "\\color{teal}") > (t "\\color{gray}")) > todo)) > (when priority > (format "\\framebox{\\#%c} " priority)) > text > (when tags > (format "\\hfill{}\\fbox{\\textsc{%s}}" > (mapconcat 'identity tags ":") > > That works on `master', but not on Org from ELPA (`maint'). > > As parts of my config file are shared between my coworkers, and as some > of them don't have Git Org but the ELPA package, how can I support both > versions of Org? > > Do I have to test the Org version number, or is there a more clever way? > Make info an &optional parameter in your function: recent org will call it with a non-nil info, old org will call it without an info parameter (which I believe will make it nil inside your function). Untested. Nick
Re: [O] icicle-imenu and folded nodes
On 2014-10-15 12:14, Alan Schmitt writes: > Hello, > > (I'm also sending this to Drew as I'm not sure he's subscribed to the > list.) > > I really like imenu, but I prefer the icicle-imenu version because it > lets me directly target sub nodes. Unfortunately when I use it the > target node is not unfolded (the cursor ends up on an ellipsis). Is > there a way to reveal the target node? For the record, Drew has fixed icicle so that is now unfolds the node. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 signature.asc Description: PGP signature
Re: [O] How to change a link?
On 2014-10-17, at 00:19, Thorsten Jolitz wrote: >> OK, so what is the canonical way of doing this? I don't want to use >> org-dp, since it is another dependency. > > It is a problem to add dependencies to libraries the user must install > himself, and at the same time its a pity that there is so much > duplication instead of reuse ... Very true. I'm torn inside;). > However, here is a org-dp solution, use 't' instead of 'prepend to > replace the links, and whatever you want instead of "file+emacs" as > replacement. Of course one could easily re-search and replace "[[file:" > in this simple case, but this uses the parser and allows doing more > complex stuff in a clean way too: I'll study it, thanks! Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] # of parameters of `org-latex-format-headline-function'
Hello, During the summer, the number of parameters of the `org-latex-format-headline-function' changed from 5 to 6: addition of `info'. The new version of my private formatting function is: --8<---cut here---start->8--- ;; function for formatting the headline's text (setq org-latex-format-headline-function 'my/org-latex-format-headline) ;; markup for TODO keywords and for tags, as a printf format (defun my/org-latex-format-headline (todo todo-type priority text tags info) "Default function for formatting the headline's text." (concat (when todo (format "{%s\\textbf{\\textsc{\\textsf{%s " (cond ((equal todo-type 'todo) "\\color{red}") ((equal todo-type 'done) "\\color{teal}") (t "\\color{gray}")) todo)) (when priority (format "\\framebox{\\#%c} " priority)) text (when tags (format "\\hfill{}\\fbox{\\textsc{%s}}" (mapconcat 'identity tags ":") --8<---cut here---end--->8--- That works on `master', but not on Org from ELPA (`maint'). As parts of my config file are shared between my coworkers, and as some of them don't have Git Org but the ELPA package, how can I support both versions of Org? Do I have to test the Org version number, or is there a more clever way? Best regards, Seb -- Sebastien Vauban