Re: [O] inline images (png/jpg) are not displayed
> Uwe Brauer writes: > Maybe you have a timer that toggles it off after a while? I don't think org is doing the > toggling (and it does not happen in my experiments). Try evaluating (timer-list) in that > buffer. I have 4.53- undo-auto--boundary-timer 4.53 5.00 savehist-autosave 4.64 1.00 display-time-event-handler 304.7415.00 nnimap-keepalive * 0.50t jit-lock-context-fontify * 1.00t pabbrev-short-idle-timer * 1.20t reftex-view-crossref-when-idle * 5.00t pabbrev-idle-timer-function > C-h v org-image-actual-width RET ok, that works, thanks
Re: [O] [Ann] Tool to hack time
Christian Moe writes: > Here I was, hoping it was a tool to *actually* hack time. > > You know, M-x tardis-mode. The Doctor worked on this IIRC. If you notice weird behavior on your machine, you can be sure that the mode will have been released. Regards, Marco
Re: [O] editing orgmode code blocks always indents content..anyway to stop this?
On Tue, Jan 31, 2017 at 5:15 PM, Nick Dokos wrote: > org-edit-src-content-indentation > Hi Nick sorry for that awkward code snippet , i dunno how it got that way (the setq was missing :)) and why init was giving me any errors. ill check if now the indentation works and update everyone thx Z
Re: [O] Is it possible to "properly" indent inside latex fragments?
Nicolas Goaziou writes on Fri 3 Feb 2017 22:04: > > I have one (minor) question/concern, though: will the indentation > > survive an 'M-x indent-region' or 'M-x org-indent-region'? > > It should, now. Thank you for the heads up. Great, thanks again for your promptness; I can confess it now: the issue was not so minor in my mind :-) -- EOST (École et Observatoire des Sciences de la Terre) IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr 5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44 F-67084 Strasbourg Cedex, France| Fax: +33 (0)3 68 85 01 25
Re: [O] [PATCH] Support time units in est+
Hello, Malcolm Matalka writes: > Hey, this is my first elisp programming so I'm quite certain this is a > big hack. I just stole elements from elsewhere in the file. I'm hoping > this is good enough to get accepted then perhaps someone with more taste > would be able to refactor it to be a bit better. That's not bad. Thank you. > Let me know if I need to change anything. > > From 1167bd20e042ad2ae3f2712f596d76ad8b230336 Mon Sep 17 00:00:00 2001 > From: orbitz > Date: Wed, 18 Jan 2017 21:18:23 +0100 > Subject: [PATCH] org-colview.el: Add support for time units to est+ > > * lisp/org-colview.el: Add support for time units in est+. Ranges are > interpreted just like non-range estimates. You need to provide the name of the function being modified: * lisp/org-colview.el (org-columns--summary-estimate): Add support... > > TINYCHANGE > --- > lisp/org-colview.el | 44 > 1 file changed, 32 insertions(+), 12 deletions(-) > > diff --git a/lisp/org-colview.el b/lisp/org-colview.el > index 45c71a028..2a5c067ac 100644 > --- a/lisp/org-colview.el > +++ b/lisp/org-colview.el > @@ -1288,23 +1288,43 @@ When PRINTF is non-nil, use it to format the result." > (/ (apply #'+ (mapcar #'org-columns--age-to-seconds ages)) >(float (length ages) > > -(defun org-columns--summary-estimate (estimates printf) > +(defun org-columns--summary-estimate (estimates _) >"Combine a list of estimates, using mean and variance. > The mean and variance of the result will be the sum of the means > and variances (respectively) of the individual estimates." Could you expound the docstring? In particular, it should make the output format predictable. See `org-columns--summary-apply-times' for example. >(let ((mean 0) > -(var 0)) > +(var 0) > +(hms-flag nil) > +(duration-flag nil)) > (dolist (e estimates) > - (pcase (mapcar #'string-to-number (split-string e "-")) > -(`(,low ,high) > - (let ((m (/ (+ low high) 2.0))) > - (cl-incf mean m) > - (cl-incf var (- (/ (+ (* low low) (* high high)) 2.0) (* m m) > -(`(,value) (cl-incf mean value > -(let ((sd (sqrt var))) > - (format "%s-%s" > - (format (or printf "%.0f") (- mean sd)) > - (format (or printf "%.0f") (+ mean sd)) > + (pcase (split-string e "-") > +(`(,low ,high) > + (dolist (time (list high low)) > + (cond > +(duration-flag) > +((string-match-p org-columns--duration-re time) > + (setq duration-flag t)) > +(hms-flag) > +((string-match-p "\\`[0-9]+:[0-9]+:[0-9]+\\'" time) > + (setq hms-flag t > + (let* ((low-sec (org-columns--time-to-seconds low)) > +(high-sec (org-columns--time-to-seconds high)) > +(m (/ (+ low-sec high-sec) 2.0))) > + (cl-incf mean m) > + (cl-incf var (- (/ (+ (* low-sec low-sec) (* high-sec high-sec)) > 2.0) (* m m) > +(`(,value) (cl-incf mean (org-columns--time-to-seconds > value) There is much code duplication with `org-columns--summary-apply-times'. It would be better to avoid it. We may want to create a new function turning a list of durations into numbers (with `org-columns--time-to-seconds) and adding the type of the expected output, as a symbol, in front of the list. Then both `org-columns--summary-estimate' and `org-columns--summary-apply-times' could use it. It would mean we would process the list of estimates two times, but I don't think it matters much in practice. If you have an implementation for that, feel free to include it. Do not consider it a blocker, tho. We can always factor this out later. > +(let* ((sd (sqrt var)) > + (low-second (truncate (- mean sd))) > + (high-second (truncate (+ mean sd))) > + (low > +(cond (duration-flag (org-minutes-to-clocksum-string (/ > low-second 60.0))) > + (hms-flag (format-seconds "%h:%.2m:%.2s" low-second)) > + (t (format-seconds "%h:%.2m" low-second > + (high > +(cond (duration-flag (org-minutes-to-clocksum-string (/ > high-second 60.0))) > + (hms-flag (format-seconds "%h:%.2m:%.2s" high-second)) > + (t (format-seconds "%h:%.2m" high-second) > + (format "%s-%s" low high You don't need to `truncate' the estimates. I don't think the default output format should be "%h:%.2m". If no special format is present, I think the traditional "%.0f" can be used. Also, the duplicate `cond' can be factored out. The whole part above can be written (including suggestions aforementioned): (mapconcat (lambda (time) (cond (duration-flag (org-minutes-to-clocksum-string (/ time 60))) (hms-flag (format-seconds "%h:%.2m:%.2s" time)) (t (format "%.0f" time (l
Re: [O] Allowing multiple date trees in a single file
Hello, Carsten Dominik writes: > Attached is a patch that does the following: > > It consolidates all four different org-capture target types that have to do > with > date/week trees into a single one, called `file+olp+datetree'. This target > allows for an optional outline path specification to tell capture to build > the > datetree under a specific headline. To switch to a week tree, or to force > a date prompt is now the matter of setting one of the properties in the > org-capture-template variable. It sounds good. Thank you. > Everything works transparently, so users can update the way they > write their datetree captures, but they don't have to - the old syntax > remains > supported and will automatically switched when one uses customize to change > the variable. I am a bit worried by this compatibility layer. I mean, it is good to preserve compatibility with old templates, but it ought to be an ephemeral solution. I.e., no more `org-table--error-on-old-row-references' lingering around for ages. We could, for example, generate a deprecation warning when old templates are used. Then we will be able to remove this unnecessary piece of code in next major release. See for example the end of `org-open-file', although it is a bit more drastic (it raises an error, not a warning). > After a bit more testing, I'd like to apply this patch. Please let me know > if you agree. And additional testers would be useful. Anyone? Make sure > to backup your capture templates if something goes wrong. Some comments follow. > -@item (file+weektree+prompt "path/to/file") > -Will create a heading in a week tree, but will prompt for the date. > +one matched.}. If the optional outline path is given, the tree will be built > +under the node it is pointing to. Check out the @code{:time-prompt} and There's a missing space above. > +(defun org-capture-upgrade-templates (templates) > + "Update the template list to the new format. > +The new format unifies all the date/week tree targets into one that > +also allows for an optional outline path to specify a target." > + (let (target props) > +(mapcar > + (lambda (ee) > + (setq target (car (nth 3 ee))) > + (when (memq target '(file+datetree file+datetree+prompt > + file+weektree file+weektree+prompt)) > + (setq target (symbol-name target) props nil) > + (if (string-match "prompt" target) (setq props '(:time-prompt t))) > + (if (string-match "week" target) > + (setq props (append '(:tree-type week) props))) > + (setcar (nth 3 ee) 'file+olp+datetree) > + (setcdr (nthcdr 4 ee) (append props (nthcdr 5 ee > + ee) > + templates))) I suggest the following. Less `setq', `setcar', `setcdr' makes Org a better place. (defun org-capture-upgrade-templates (templates) "Update the template list to the new format. TEMPLATES is a template list, as in `org-capture-templates'. The new format unifies all the date/week tree targets into one that also allows for an optional outline path to specify a target." (mapcar (lambda (template) (pcase template ;; Match templates with an obsolete "tree" target type. Replace ;; it with common `file+olp-datetree'. Add new properties ;; (i.e., `:time-prompt' and `:tree-type') if needed. (`(,key ,desc ,type (file+datetree . ,path) ,template . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) ,@props)) (`(,key ,desc ,type (file+datetree+prompt . ,path) ,template . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) :time-prompt t ,@props)) (`(,key ,desc ,type (file+weektree . ,path) ,template . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) :tree-type week ,@props)) (`(,key ,desc ,type (file+weektree+prompt . ,path) ,template . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) :tree-type week :time-prompt t ,@props)) ;; Other templates are left unchanged. (_ template))) templates)) > - (file+weektree+prompt \"path/to/file\") > - Will create a heading in a week tree, prompts for date > + (file+olp+datetree \"path/to/file\" \"Level 1 heading\" ...) > + Will create a heading in a date tree for today's date. > + If no headings are given, the tree will be on top level. Nitpick: It may be just me, but "If no heading is given" sounds better. > ELisp programs can set KEYS to a string associated with a template > in `org-capture-templates'. In this case, interactive selection > will be bypassed. > @@ -902,6 +920,7 @@ Store them in the capture property list." > (insert "* " headline "\n") > (beginning-of-line 0))) > (`(file+olp ,path . ,outline-path) > + (setq outline-path (org-capture-sanitize-olp outline-path)) See below about `org-capture-sanitize-olp'. Also, it is better to make the `setq' a let-binding when possible.
Re: [O] Bug: org-agenda-only-exact-dates [9.0.4 (9.0.4-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20170124/)]
Thanks for the reply. On 2017-02-03 16:16, Nicolas Goaziou wrote: Hello, "Tamulis, Andrius" writes: I note that in the latest version of orgmode, that the org-agenda-only-exact-dates variable is no longer "honored". It is set twice in org-agenda.el, but never checked, and so affects nothing. When this functionality was deleted, This variable is not documented in the manual. It has no docstring either. I see no functionality here, only an obscure dynamically scoped parameter. If you search for org-agenda-exact-dates, you will find that I'm not the only one who has used this variable, and not the only one who has noticed its absence in version 9. was any thought given to how one may recreate the action of this variable? That is, in orgmode 9.0.4, how can I create an agenda that only shows entries whose exact timestamp, scheduled or deadline, is the given day? And that ignores "Sched. nx" and "In m d." entries? I assume binding both `org-deadline-warning-days' and `org-scheduled-past-days' to 0 would be a start. Also, you could bind `org-agenda-span' to `day'. The two variables you mention above fix almost everything for me - but is there a "org-deadline-past-days" variable? Something that I could set so that past due deadlines not be mentioned? Or may I suggest that "org-agenda-todo-ignore-deadlines" have a value like "past", but one that ignores deadlines that are in the past, but include those for today. Or does that variable only work with TODO lists, and not with agendas? What I am trying to do is an agenda view in which only the tasks specifically for the given day - whether scheduled or deadline - appears. Thanks, Andrius
Re: [O] Bug: Log mode shows the wrong clock note [9.0.4 (9.0.4-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)]
On 3 February 2017 at 20:01, Nicolas Goaziou wrote: > The fix for the other issue you reported about CLOCK and notes probably > has also fixed this one. Could you confirm it? According to my very brief test, yes it fixed. Thank you! -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/
Re: [O] Sync up the org in emacs master to org maint branch?
John Wiegley writes: > Many software projects have package ecosystems surrounding them that deal with > similar issues, and I can't, off-hand, think of cases where the answer was > "let's move some of those packages into core development to ease > ___". Just from the software I worked with over the years, I remember KDevelop, Typo3, Drupal and MediaWiki moving plugins to core. It's really not uncommon. I still use Drupal, and moving important plugins to core has made updates *much* less brittle. I just wish Jenkins would do the same already... -David
[O] I have org-plus-contrib from ELPA. How do I temporarily test Org from git?
Hi. I wanted to temporarily run git Org so I could test a fix by Nicolas Goaziou. I have pulled the master branch and adapted local.mk. In that file, I set: prefix = ~/.emacs.d/locally_built_org # Where local lisp files go. # $(prefix)/emacs/site-lisp/org lispdir= $(prefix)/site-lisp # Where local data files go. # $(prefix)/emacs/etc/org datadir = $(prefix)/etc # Where info files go. # infodir = $(prefix)/info infodir = /usr/local/emacs/share/info I have built and run ‘make test’ (there were two unexpected test failures, but they regard functionality I don’t use). In init.el I added (add-to-list 'load-path (concat user-emacs-directory "locally_built_org/site-lisp")) At that point (just before ‘sudo make install’), [1] scared me with the warning "We strongly recommend to stick to a single installation method". Does that mean I cannot install Org from git if I already have it from ELPA? I wanted Org from git to just override Org from ELPA. 1: http://orgmode.org/org.html#Installation As a precaution, I have uninstalled ELPA org-plus-contrib before ‘sudo make install’. After testing, I installed ELPA org-plus-contrib again. Was that really necessary? -- • I am Brazilian. I hope my English is correct and I welcome corrections. • Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z. • Free (as in free speech) software for Android: https://f-droid.org/
Re: [O] I have org-plus-contrib from ELPA. How do I temporarily test Org from git?
Hello, Jorge Morais Neto writes: > Hi. I wanted to temporarily run git Org so I could test a fix by Nicolas > Goaziou. I have pulled the master branch and adapted local.mk. [...] > I have built and run ‘make test’ (there were two unexpected test failures, but > they regard functionality I don’t use). In init.el I added > (add-to-list 'load-path > (concat user-emacs-directory > "locally_built_org/site-lisp")) You don't need to build or install anything. Make a test config file that looks something like this: (add-to-list 'load-path "/lisp/") (require 'org) You can put any other settings you want to test in here. Assuming the above file is called org-config.el, start emacs like so: emacs -q -l /path/to/test/config/file > At that point (just before ‘sudo make install’), [1] scared me with the > warning "We strongly recommend to stick to a single installation method". > Does that mean I cannot install Org from git if I already have it from ELPA? > I wanted Org from git to just override Org from ELPA. > 1: http://orgmode.org/org.html#Installation > > As a precaution, I have uninstalled ELPA org-plus-contrib before > ‘sudo make install’. After testing, I installed ELPA org-plus-contrib > again. Was that really necessary? No, you can use "emacs -q" to avoid loading your main init file. -- Kyle
Re: [O] I have org-plus-contrib from ELPA. How do I temporarily test Org from git?
Kyle Meyer writes: [...] > You can put any other settings you want to test in here. Assuming the > above file is called org-config.el, start emacs like so: Oops, ignore the "Assuming .. org-conig.el" part. -- Kyle
Re: [O] I have org-plus-contrib from ELPA. How do I temporarily test Org from git?
Kyle Meyer writes: >> As a precaution, I have uninstalled ELPA org-plus-contrib before >> ‘sudo make install’. After testing, I installed ELPA org-plus-contrib >> again. Was that really necessary? > > No, you can use "emacs -q" to avoid loading your main init file. That still loads the site init files. Besides, he might need something else from ELPA for testing, so just starting up a bare-bones Emacs might not be very helpful either. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] Bug: org-agenda-only-exact-dates [9.0.4 (9.0.4-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20170124/)]
"Tamulis, Andrius" writes: > The two variables you mention above fix almost everything for me - but > is there a "org-deadline-past-days" variable? Something that I could > set so that past due deadlines not be mentioned? Or may I suggest that > "org-agenda-todo-ignore-deadlines" have a value like "past", but one > that ignores deadlines that are in the past, but include those for > today. Have you tried to set this variable to -1? According to the docstring, it should do what you want. I didn't test it, tho. Regards,
[O] [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account
* ox-bibtex.el (org-bibtex-process-bib-files) solve a bug in which ox-bibtex was not considering enterily keys like "Author et&bsp; al., 1999" as valid. --- contrib/lisp/ox-bibtex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el index 56dec38..fb34a5e 100644 --- a/contrib/lisp/ox-bibtex.el +++ b/contrib/lisp/ox-bibtex.el @@ -235,7 +235,7 @@ Return new parse tree." ;; Update `org-bibtex-html-entries-alist'. (goto-char (point-min)) (while (re-search-forward - "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\(\\w+\\)" nil t) + "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t) (push (cons (match-string 1) (match-string 2)) org-bibtex-html-entries-alist))) ;; Open produced HTML file, wrap references within a block and -- 2.9.3