Re: [O] [html-export question] location with JS.
The issue is that the javascript that I use absolute position in pixels, and the browser doesn't update the location when zooming... Any ideas on how to solve this? Which browser? It seems to work well with zooming in Firefox and Safari, so I'd say you're doing something right and the browser's doing something wrong. (As you can guess from my attitude, though, I'm not a professional web developer.) Yours, Christian
Re: [O] can I refile or archive from the agenda without rebuilding?
Kyle Meyer k...@kyleam.com writes: Alan Schmitt alan.schm...@polytechnique.org wrote: On 2014-12-15 09:31, Samuel Loury konubi...@gmail.com writes: [...] This is how I did it: #+begin_src emacs-lisp (defun as/org-agenda-refile-noupdate (optional goto rfloc) Call `org-agenda-refile' with arguments GOTO, RFLOC, and t. (interactive P) (org-agenda-refile goto rfloc t)) (add-hook 'org-agenda-mode-hook (lambda () (local-set-key (kbd C-c C-w) 'as/org-agenda-refile-noupdate))) #+end_src You could also use (define-key org-agenda-mode-map [remap org-agenda-refile] 'as/org-agenda-refile-noupdate) I'm curious: is it better to use an advice or to redefine a function? I usually prefer to define a new function because it allows you to use both the old and new variant. That makes sense. Thanks for the advice (no pun intended). -- Konubinix GPG Key: 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A signature.asc Description: PGP signature
Re: [O] org-log-reschedule: inactive time-stamp instead
* Nicolas Goaziou m...@nicolasgoaziou.fr wrote: Hello, Hi Nicolas! Karl Voit devn...@karl-voit.at writes: Those active time-stamps clutter my daily agenda a bit. Therefore: ,[ what I would like to get ] | :LOGBOOK: | - Rescheduled from [2014-12-17 Mi] on [2014-12-16 Di 17:01] | :END: ` So can someone please add an option for this variable to get inactive time-stamps? This should be the default behaviour. In my memory, this was the case in the past. My guess is, that this changed when I did an update of my org git repository. Currently: Org-mode version 8.3beta (release_8.3beta-544-g77f088) Have you customized somehow `org-log-note-headings'? No, but thanks for the pointer - looks very handy to me! ,[ my setting which is not customized ] | Value: ((done . CLOSING NOTE %t) | (state . State %-12s from %-12S %t) | (note . Note taken on %t) | (reschedule . Rescheduled from %S on %t) | (delschedule . Not scheduled, was %S on %t) | (redeadline . New deadline from %S on %t) | (deldeadline . Removed deadline, was %S on %t) | (refile . Refiled on %t) | (clock-out . )) ` I could not locate anything suspicious in my config file[1] via M-x occur + active. [1] https://github.com/novoid/dot-emacs/blob/master/main.el -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: get Memacs from https://github.com/novoid/Memacs https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] [html-export question] location with JS.
Rasmus ras...@gmx.us writes: Hi, For my CV I'm trying to place a box (div, whatever) at the left edge of the content-div. My org-file looks like - year0–year1 :: FooCorp - note1 - note2 {{{BOL(year½)}}} And I want the ouput to look like: year0–year1FooCorp - note1 year½ - note2 In the attached example I have the desired output for LaTeX, and the output for html is also fine *as long as you don't zoom*. The issue is that the javascript that I use absolute position in pixels, and the browser doesn't update the location when zooming... Any ideas on how to solve this? Hoping for pixel perfect rendering for html is fraught with difficulty - it's not really designed for that sort of thing. If that's what you want then you may be better off producing a pdf.
Re: [O] [html-export question] location with JS.
Hi Christian, Christian Moe m...@christianmoe.com writes: The issue is that the javascript that I use absolute position in pixels, and the browser doesn't update the location when zooming... Any ideas on how to solve this? Which browser? It seems to work well with zooming in Firefox and Safari, so I'd say you're doing something right and the browser's doing something wrong. For a moment I hoped it was just a bug in the larger stylesheet(!). Unfortunately, I think the nice behavior you saw was 'cause my example was too minimal... Try the attached file which has a title. I definitely see it here, zooming in and out, especially when the window ain't to large... BTW: I tested using Firefox and Gnome Web. (As you can guess from my attitude, though, I'm not a professional web developer.) As you can /see/, me neither... Thanks, Rasmus -- Together we will make the possible totay impossible! test.org Description: Lotus Organizer
Re: [O] [html-export question] location with JS.
Paul Rudin p...@rudin.co.uk writes: Hoping for pixel perfect rendering for html is fraught with difficulty - it's not really designed for that sort of thing. I'm only asking for two things (divs/spans) to be (almost) on the same line (if you rerun the new example I sent to Christian you might see it can go quite bad or see this¹ screen-shot)... I tried to put the script in window.onresize but somehow it's not always working... If that's what you want then you may be better off producing a pdf. I prefer both. Html is very comfortable on the screen and it's remarkably capable for printing these days as well via CSS. E.g. I found this, @media print {div[class^=outline-], div[class*= outline-] {page-break-inside: avoid;}} Which makes page-breaks on print sensible. I'm still having issues with small-caps, and a \vfill replacement for print. And the above. Other than that I'm quite pleased with html. —Rasmus Footnotes: ¹ Here's what it looks like zooming in and out: http://i.imgur.com/RLHI47C.png -- Bang bang
[O] [bug] Effort and column view
Hello, I reported a possible bug a couple of weeks ago and since then I have notice related bugs in todays HEAD (that may have existed before). 1) The column view of TODO items only shows the total Effort at the top and the Effort for the last item, 2) The column view of the org-agenda (restricted to current buffer with '', get list of todos with 't') only shows the Effort for the last item and the total Effort at the top shows the same value as for the last item 3) Narrowing by tag (the original possible bug reported) shows similar behaviour as above Myles
Re: [O] [html-export question] location with JS.
It still works fine for me in Firefox with the added title and text, zooming in and out (except when the window becomes seriously too small, and the year jumps up on top of the other one, but that, I think, has to be expected). A different problem is that the script only picks out every other bol-year DIV, as you will soon see if you add more entries with boxes on the left. The reason is that getElementsByClassName returns a live HTMLCollection that updates according to the document order of the elements even as the script changes that order. To loop through them, try simply var e = elements[0]; // instead of var e = elements[i]; Yours, Christian Rasmus writes: Hi Christian, Christian Moe m...@christianmoe.com writes: The issue is that the javascript that I use absolute position in pixels, and the browser doesn't update the location when zooming... Any ideas on how to solve this? Which browser? It seems to work well with zooming in Firefox and Safari, so I'd say you're doing something right and the browser's doing something wrong. For a moment I hoped it was just a bug in the larger stylesheet(!). Unfortunately, I think the nice behavior you saw was 'cause my example was too minimal... Try the attached file which has a title. I definitely see it here, zooming in and out, especially when the window ain't to large... BTW: I tested using Firefox and Gnome Web. (As you can guess from my attitude, though, I'm not a professional web developer.) As you can /see/, me neither... Thanks, Rasmus
[O] [patch] org-element: Deal with subscript like: _{x}
From a4b14292b96a0f5e5d262087ec3e8de7c209f863 Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 17 Dec 2014 21:59:44 +0800 Subject: [PATCH] org-element: Deal with subscript like: _{x} * lisp/org-element.el (org-element--object-lex): Deal with subscript like: _{x}. --- lisp/org-element.el |3 +++ 1 个文件被修改,插入 3 行(+) diff --git a/lisp/org-element.el b/lisp/org-element.el index d5d4bb9..bf8b152 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4215,6 +4215,9 @@ to an appropriate container (e.g., a paragraph). (?^ (and (memq 'superscript restriction) (org-element-superscript-parser))) (?_ (or (and (memq 'subscript restriction) + (if (eq org-export-with-sub-superscripts '{}) + (eq (char-after (+ (point) 1) ) ?{) + t) (org-element-subscript-parser)) (and (memq 'underline restriction) (org-element-underline-parser -- 1.7.10.4 --
Re: [O] [html-export question] location with JS.
Hi Christian, Thanks for the insightful comments. Javascript is an interesting domain; totally foreign to me, though. Christian Moe m...@christianmoe.com writes: (except when the window becomes seriously too small, and the year jumps up on top of the other one, but that, I think, has to be expected). This is what I'm trying to get rid of, somehow... In my full document it seemed to jump around much more. . . I think I got it working now by rerunning the script on resize and cloning the node rather than modifying the original node. I have no idea if this is bad. It works wonderfully in the newest Firefox and Gnome Web. A different problem is that the script only picks out every other bol-year DIV, as you will soon see if you add more entries with boxes on the left. The reason is that getElementsByClassName returns a live HTMLCollection that updates according to the document order of the elements even as the script changes that order. Interesting. To loop through them, try simply var e = elements[0]; // instead of var e = elements[i]; Thanks this is very helpful. Next step: Proper small caps and make it work well on my phone! Thanks, Rasmus -- And I faced endless streams of vendor-approved Ikea furniture. . . test.org Description: Lotus Organizer
Re: [O] can I refile or archive from the agenda without rebuilding?
On 2014-12-16 15:46, Kyle Meyer k...@kyleam.com writes: Alan Schmitt alan.schm...@polytechnique.org wrote: On 2014-12-15 09:31, Samuel Loury konubi...@gmail.com writes: [...] This is how I did it: #+begin_src emacs-lisp (defun as/org-agenda-refile-noupdate (optional goto rfloc) Call `org-agenda-refile' with arguments GOTO, RFLOC, and t. (interactive P) (org-agenda-refile goto rfloc t)) (add-hook 'org-agenda-mode-hook (lambda () (local-set-key (kbd C-c C-w) 'as/org-agenda-refile-noupdate))) #+end_src You could also use (define-key org-agenda-mode-map [remap org-agenda-refile] 'as/org-agenda-refile-noupdate) Thank you for this suggestion, it is most useful. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 signature.asc Description: PGP signature
Re: [O] [patch] org-element: Deal with subscript like: _{x}
This seem to be a wrong patch, sorry! Feng Shu tuma...@gmail.com writes: From a4b14292b96a0f5e5d262087ec3e8de7c209f863 Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 17 Dec 2014 21:59:44 +0800 Subject: [PATCH] org-element: Deal with subscript like: _{x} * lisp/org-element.el (org-element--object-lex): Deal with subscript like: _{x}. --- lisp/org-element.el |3 +++ 1 个文件被修改,插入 3 行(+) diff --git a/lisp/org-element.el b/lisp/org-element.el index d5d4bb9..bf8b152 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4215,6 +4215,9 @@ to an appropriate container (e.g., a paragraph). (?^ (and (memq 'superscript restriction) (org-element-superscript-parser))) (?_ (or (and (memq 'subscript restriction) +(if (eq org-export-with-sub-superscripts '{}) +(eq (char-after (+ (point) 1) ) ?{) + t) (org-element-subscript-parser)) (and (memq 'underline restriction) (org-element-underline-parser -- 1.7.10.4 --
Re: [O] doc patch: move footnote in external links
On 2014-12-16 22:54, Nicolas Goaziou m...@nicolasgoaziou.fr writes: I think *headline links should assume this variable is non-nil, notwithstanding its real value. Of course, a `query-to-create' value still makes sense. WDYT? I'm fine with this. Here is the patch extended to take this into account, which is mostly deleting all the code that deals with headline match when `org-link-search-must-match-exact-headline' is nil. From d94259f988b84a73df4bc4111cd0b569b31e56e5 Mon Sep 17 00:00:00 2001 From: Alan Schmitt alan.schm...@polytechnique.org Date: Fri, 12 Dec 2014 08:26:05 +0100 Subject: [PATCH] Function `org-link-search' does exact headline search * lisp/org.el (org-link-search): Change headline search such that it always does an exact search. * doc/org.texi (External links): Cleanup footnote about the `org-link-search-must-match-exact-headline' option for text searches and add a footnote about the effect of the same option for heading searches. --- doc/org.texi | 7 +-- lisp/org.el | 27 +++ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 7c464ca..7a91f70 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3559,10 +3559,13 @@ file:projects.org::some words @r{text search in Org file}@footnote{ The actual behavior of the search will depend on the value of the option @code{org-link-search-must-match-exact-headline}. If its value is @code{nil}, then a fuzzy text search will be done. If it is t, then only the -exact headline will be matched. If the value is @code{'query-to-create}, +exact headline will be matched. If the value is @code{query-to-create}, then an exact headline will be searched; if it is not found, then the user will be queried to create it.} -file:projects.org::*task title@r{heading search in Org file} +file:projects.org::*task title@r{heading search in Org file}@footnote{ +Headline searches always match the exact headline. If the headline is not +found and the value of the option @code{org-link-search-must-match-exact-headline} +is @code{query-to-create}, then the user will be queried to create it.} file+sys:/path/to/file@r{open via OS, like double-click} file+emacs:/path/to/file @r{force opening by Emacs} docview:papers/last.pdf::NNN @r{open in doc-view mode at page} diff --git a/lisp/org.el b/lisp/org.el index 1383d76..4ddb4b0 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -11062,8 +11062,7 @@ visibility around point, thus ignoring org-emphasis-alist) \\|) \\))) (pos (point)) - (pre nil) (post nil) - words re0 re1 re2 re3 re4_ re4 re5 re2a re2a_ reall) + words re0 re2 re4_ re4 re5 re2a re2a_ reall) (cond ;; First check if there are any special search functions ((run-hook-with-args-until-success 'org-execute-file-search-functions s)) @@ -7,8 +6,9 @@ visibility around point, thus ignoring ((derived-mode-p 'org-mode) (org-occur (match-string 1 s))) (t (org-do-occur (match-string 1 s) - ((and (derived-mode-p 'org-mode) org-link-search-must-match-exact-headline) - (and (equal (string-to-char s) ?*) (setq s (substring s 1))) + ((and (derived-mode-p 'org-mode) + (or (and (equal (string-to-char s) ?*) (setq s (substring s 1))) + org-link-search-must-match-exact-headline)) (goto-char (point-min)) (cond ((let (case-fold-search) @@ -11140,11 +11140,6 @@ visibility around point, thus ignoring (error No match (t ;; A normal search string - (when (equal (string-to-char s) ?*) - ;; Anchor on headlines, post may include tags. - (setq pre ^\\*+[ \t]+\\(?:\\sw+\\)?[ \t]* - post (org-re [ \t]*\\(?:[ \t]+:[[:alnum:]_@#%:+]:[ \t]*\\)?$) - s (substring s 1))) (remove-text-properties 0 (length s) '(face nil mouse-face nil keymap nil fontified nil) s) @@ -11161,15 +11156,9 @@ visibility around point, thus ignoring [^a-zA-Z_\r\n]+) \\)[^a-zA-Z_]) re4 (concat [^a-zA-Z_] re4_) - re1 (concat pre re2 post) - re3 (concat pre (if pre re4_ re4) post) - re5 (concat pre .* re4) - re2 (concat pre re2) - re2a (concat pre (if pre re2a_ re2a)) - re4 (concat pre (if pre re4_ re4)) - reall (concat \\( re0 \\)\\|\\( re1 \\)\\|\\( re2 - \\)\\|\\( re3 \\)\\|\\( re4 \\)\\|\\( - re5 \\))) + re5 (concat .* re4) + reall (concat \\( re0 \\)\\|\\( re2 \\)\\|\\( re4 + \\)\\|\\( re5 \\))) (cond ((eq type 'org-occur) (org-occur reall)) ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) @@ -11177,10 +11166,8 @@ visibility around point, thus ignoring (setq type 'fuzzy) (if (or (and (org-search-not-self 1 re0 nil t) (setq type 'dedicated)) - (org-search-not-self 1 re1 nil t) (org-search-not-self 1 re2 nil t) (org-search-not-self 1 re2a nil t) -
Re: [O] Patch to implement sorting Org tables by IP address
On Dec 14, 2014, at 12:18 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote: As I said above, you’ve convinced me that ?f ?F is the right solution. Fair enough. Let's settle on that, then. Here is the new patch. It extends org-table-sort-lines to allow a user to specify custom extraction and comparison functions using the ?f ?F sorting type as in org-sort-list. The user can call org-table-sort-lines programmatically specifying a SORTING-TYPE of ?f or ?F and provide custom extraction and comparison functions. If the user calls org-table-sort lines interactively and specifies ?f or ?F, org-do-sort will prompt for a custom extraction function. The comparison will be either string or numeric depending on the type of the first extracted key. 0001-org.el-Implement-user-specified-sorting-functions.patch Description: Binary data signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [O] [bug, patch, ox] INCLUDE and footnotes
Hello, Rasmus ras...@gmx.us writes: Attached is a patch that enables footnotes in INCLUDEd documents when using :lines and friends. It stores the footnotes in a hash-table initialized in `org-export-expand-include-keyword' and updated via `org-export--prepare-file-contents'. The footnotes are then inserted when all include keywords are expanded. Thanks. Some more comments follow. At the moment only footnotes from INCLUDEs with :lines-like arguments will be picket up here. But I think it might be nice to also use this functionality with footnotes when whole documents are included, and not include the footnote section directly from these documents. Though I expect the to be accused of worm-nurturing, do consider this curious example: [...] 2. fix the bug (IMO) that is that #+INCLUDE: /tmp/t00.org #+INCLUDE: /tmp/t01.org Is read as #+INCLUDE: /tmp/t00.org :minlevel N #+INCLUDE: /tmp/t01.org :minlevel N+1 The easiest way I can think of would be to do a pre-scan of the buffer to see if there exists any instances where include is only separated by whitespace in which case they should have the same level. AFAICT, there's no reason to include a rule about whitespace separating anything. Just make sure that any INCLUDE keyword that doesn't have a :minlevel property gets one set to 1+N, where N is the current level (or 0 if at top level). Another option is to delay insertion of included files: expand them completely in different strings, then replace keywords with appropriate strings. IOW, just make sure expansion doesn't happen sequentially. Objects can be extracted via =#+INCLUDE= using file links. It is -possible to include only the contents of the object. See manual for +possible to include only the contents of the object. Further, +footnotes are now supported when using =#+INCLUDE=. See manual for This is not quite true. Footnotes are already supported with INCLUDE keywords. This is the combination of :lines and footnotes that is new. It is more a bugfix than a new feature. + (footnotes (or footnotes (make-hash-table :test 'equal Nitpick: (make-hash-table :test #'equal) +(goto-char (point-min)) +(while (and (search-forward-regexp org-footnote-re nil t)) + (let* ((reference (org-element-context)) + (type (org-element-type reference)) + (label (org-element-property :label reference))) +(when (and label (eq type 'footnote-reference)) + (unless (org-footnote-get-definition label) +(save-excursion + (org-footnote-create-definition label) + ;; We do not need an error here since ox + ;; will complain if a footnote is missing. + (insert (or (gethash label footnotes) ))) Why is the above necessary? Shouldn't you only insert footnotes definitions at the end of the master document (i.e. when INCLUDED is nil)? I think a `maphash' is enough. Also, looking for every footnote reference sounds tedious. You should simply insert every footnote definition collected there, and filter out unnecessary definitions at another level (e.g., before storing it in the hash table). + (when id + (unless (eq major-mode 'org-mode) + (let ((org-inhibit-startup t)) (org-mode))) Is it necessary? + (goto-char (point-min)) + (while (re-search-forward org-footnote-re nil t) + (let* ((reference (org-element-context)) + (type (org-element-type reference)) + (footnote-type (org-element-property :type reference)) + (label (org-element-property :label reference))) + (when (and (eq type 'footnote-reference)) ^^^ Typo. + (goto-char (org-element-property :begin reference)) + (when label + (goto-char (org-element-property :begin reference)) You are already at reference beginning. + (forward-char 4) + (insert (format %d- id)) + (and (not (eq footnote-type 'inline)) + (let ((new-label (org-element-property +:label (org-element-context Why do you need to parse the new label, since you know it already: (concat (format %d- id) label) +(save-restriction + (save-excursion +(widen) `save-restriction' + `save-excursion' + `widen' = `org-with-wide-buffer' +(org-footnote-goto-definition label) +(let ((definition (org-element-context))) + (and include-footnotes Nitpick: (when include-footnotes ... + (puthash new-label +
Re: [O] How do you show the entires in the logbook drawer in the agenda
Eric Abrahamsen e...@ericabrahamsen.net writes: jenia.iv...@gmail.com (jenia.ivlev) writes: Hello. I thought that the entires in the logbook drawer - entered pressing `C-c C-z` in orgmode - would show up in the agenda, pressing `C-c a a`, but they do not. Is possible to somehow list those notes in the agenda? Thanks in advnace for your kind help. Nice timing! If you hang on for just a couple of days, there ought to be a command like this available to you -- we're working it out in another thread. Eric Nice I found some of those threads. Thanks a lot
[O] org-toc.el x 2 = confusion
Did you know that there are currently two org-toc.el in existence? There is the org-mode one of 17.9kb, and 508 lines of code, author being Bastien Guerry. Incidentally, it quotes the home page as being at http://www.cognition.ens.fr/~guerry/u/org-toc.el; but even if you drill back to the server, Bastien is not on that machine! The other one is like this - --8---cut here---start-8--- ;;; org-toc.el --- add table of contents to org-mode files ;; Copyright (C) 2014 Sergei Nosov ;; Author: Sergei Nosov sergei.nosov [at] gmail.com ;; Version: 20141110.650 ;; X-Original-Version: 1.0 ;; Keywords: org-mode org toc table of contents ;; URL: https://github.com/snosov1/org-toc --8---cut here---end---8--- and it is 14.6kb and 285 lines of code. And right at the moment, I have both in my init.org so I'm going to remove the older and smaller version. Can something be done such as Sergei renaming his as, to be completely daft, toc-org.el? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.4.1.0 signature.asc Description: PGP signature