Re: [O] org-agenda-skip-function does not find inherited tags
I think the function org-get-tags-at should also be helpful here.
[O] Flattening references in ODT export
Hi, Is there a way to have "figure" references in ODT exports be simply a flat list? Meaning -- I would like "Example 1," "Example 2," etc. (or "Figure," doesn't really matter). With "num:nil," "Listing 1," "Listing 2," "Listing 3," but there is also a figure, which becomes "Figure 1." So there's a listing and a figure with the same index number. Hm. I am pretty sure this will not satisfy the journal's style requirements. It seems there is some customizability here[1], but which predicate should I use in place of org-odt--enumerable-image-p for listings? I'm willing to avoid SRC blocks if that will help. Also, it may not help to wrap all of these entities in FIGURE blocks, because I found (the hard way) ODT export fails if an image is inside a figure block. Thanks, hjh [1] http://orgmode.org/manual/Labels-and-captions-in-ODT-export.html#Labels-and-captions-in-ODT-export
Re: [O] Release 9.1
On Wed, Sep 6, 2017 at 5:07 AM, Rasmus wrote: > > Bastien writes: > > > Org-mode 9.1 is out! > > > > http://orgmode.org/Changes.html > > Great news! > > Thank you Nicolas, Kyle, Marco, Bastien, Kaushal, Achim and other code- > and mailing list contributors. Thank you generous and kind people.
Re: [O] [Bug] org-search-view "bad keyword argument"
Hello, Matt Lundin writes: > Hi everyone, > > Commit 22e916fb369629606d919a0e4f33ec2954c87e04 results in the following > error when calling org-search-view: > > cl--delete-duplicates: Bad keyword argument (lambda (a b) (and > (file-exists-p a) (file-exists-p b) (file-equal-p a b))) Fixed. Thank you. Regards, -- Nicolas Goaziou
[O] [Bug] org-search-view "bad keyword argument"
Hi everyone, Commit 22e916fb369629606d919a0e4f33ec2954c87e04 results in the following error when calling org-search-view: cl--delete-duplicates: Bad keyword argument (lambda (a b) (and (file-exists-p a) (file-exists-p b) (file-equal-p a b))) Best, Matt
Re: [O] Table aligning and editing in 9.2
William Denton writes: > Previously one could edit the contents of a cell in a shrunken column > without doing anything special: move the point in, move to a position, > then hit any key (space, delete, a letter), and the change is made. > If a character is deleted then the => at the end comes closer; if > added it moves away. C-c C-c or TAB realigns everything. Everything > is directly editable: the text can be operated on without any > barriers. No barrier? Try editing directly the text under "=>". > But now the cell contents are locked until either a) C-C ` opens up an > edit buffer (which was useful before for editing a long piece of text > that got shrunk, but is a lot of work when you have something short > like "Foo" in a <10> column and want to make it "Bar") or, as you > point out, b) something is typed in the shrunk column. Or c), simply expand the columns with C-c TAB, and edit the field to your heart's content. > But when something is typed in a shrunk column, the column expands and > the point is now at the start of the cell. To edit anything in the > cell, you need to hit "a" or SPC or something just to get in there, > then you need to delete it, then move to where you want to make > a change, then edit. See above. > And then C-c C-c or TAB doesn't realign things, you need to hit C-c > TAB. Either you spotted a bug, or I don't understand. C-c C-c (or TAB) still re-align things. But it doesn't narrow them again anymore. These are two different commands. > So the workflow is different, and in each piece it's more awkward. You have to admit that the above is, by itself, quite a feat. So, is there anything wrong with the following workflow: expand the column (C-c TAB), edit field, shrink it again (C-c TAB) ? Regards,
Re: [O] Buffer timeline omissions with org-class
I am running version 8.2.10. Well, maybe I should upgrade and just not worry about this. On Fri, 8 Sep 2017 at 12:22 Nicolas Goaziou wrote: > Hello, > > Ross Laird writes: > > > I'm using org-class to schedule my classes, and the entries are > structured as follows: > > > > %%(org-class 2017 9 4 2017 12 04 2 ) 04:00pm-06:50pm Class: CRWR 1240, > Cedar 1060 > > %%(org-class 2017 9 5 2017 12 04 2 ) 10:00am-12:50pm Class: CRWR 2900 > > %%(org-class 2017 9 5 2017 12 04 1 41 46) 4:00pm-6:50pm Class: CRWR 4130 > > > > In the main agenda view, the entries display correctly: > > > > Week-agenda (W37): > > Monday 11 September 2017 W37 > > kpu:16:00-18:50 Class: CRWR 4130 > > Tuesday12 September 2017 > > kpu:10:00-12:50 Class: CRWR 2900 > > kpu:16:00-18:50 Class: CRWR 1240, Cedar 1060 > > ... > > > > However, when I show the timeline for the buffer for these entries, > > they do not display correctly: > > > > Timeline of file /home/ross/org/kpu.org > > -- > > Monday 11 September 2017 W37 > > 4:00pm-6:50pm Class: CRWR 4130 > :CLASS: > > > > [... 4 empty days omitted] > > ... > > > > These omissions do not follow any obvious pattern. There should be 3 > > class entries each week (as in the agenda view), but in the timeline > > view there are a total of three entries for the entire semester: CRWR > > 4130 is shown twice (on September 11 and 25), and CRWR 2900 and 1240 > > are shown only once in the entire semester (both on November 21). > > > > Because of this strange pattern, I'm not even sure where to start in > > figuring this out. Feedback most welcome. > > FWIW, Timeline doesn't exist anymore in current Org. > > Regards, > > -- > Nicolas Goaziou > -- Ross A. Laird www.rosslaird.com @rosslaird
[O] [PATCH] org-columns-summary-types entries can take COLLECT function
Hello! I've taken a stab at adding support for allowing org-columns-summary-types entries to contain an optional COLLECT function that can be used to conditionally collect a property. Please see the included patch. I added a NEWS entry, but wasn't sure whether a manual entry is required. I added a couple simple tests, which pass, but the test immediately above the two I added fails when this patch is applied; I haven't been able to figure out why. Any help appreciated. Comments / feedback welcome :-) >From 749c90afad4908cda5a4d2d6c93f2049860e2c4d Mon Sep 17 00:00:00 2001 From: Stig Brautaset Date: Thu, 7 Sep 2017 17:57:44 +0100 Subject: [PATCH] org-colview: Allow custom COLLECT functions for derived properties In addition to (LABEL . SUMMARIZE), org-columns-summary-types now accepts (LABEL SUMMARIZE COLLECT) entries. The new COLLECT function is called with one argument, the property being summarized. --- etc/ORG-NEWS | 47 + lisp/org-colview.el | 32 + testing/lisp/test-org-colview.el | 50 3 files changed, 125 insertions(+), 4 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e6ad838a6..b555cf971 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -54,6 +54,53 @@ its previous state. Editing the column automatically expands the whole column to its full size. +*** =org-columns-summary-types= entries can take an optional COLLECT function + +You can use this to make collection of a property from an entry +conditional on another entry. E.g. given this configuration: + +#+BEGIN_SRC emacs-lisp + (defun custom/org-collect-confirmed (property) +"Return `PROPERTY' for `CONFIRMED' entries" +(let ((prop (org-entry-get nil property)) + (confirmed (org-entry-get nil "CONFIRMED"))) + (if (and prop (string= "[X]" confirmed)) + prop + "0"))) + + (setq org-columns-summary-types + '(("X+" org-columns--summary-sum + custom/org-collect-confirmed))) +#+END_SRC + +You can have a file =bananas.org= containing: + +#+BEGIN_SRC org + ,#+columns: %ITEM %CONFIRMED %Bananas{+} %Bananas(Confirmed Bananas){X+} + + ,* All shipments + ,** Shipment 1 + :PROPERTIES: + :CONFIRMED: [X] + :Bananas: 4 + :END: + + ,** Shipment 2 + :PROPERTIES: + :CONFIRMED: [ ] + :BANANAS: 7 + :END: +#+END_SRC + +... and when going to the top of that file and entering column view +you should expect to see something like: + +| ITEM| CONFIRMED | Bananas | Confirmed Bananas | +|-+---+-+---| +| All shipments | | 11 | 4 | +| Shipment 1 | [X] | 4 | 4 | +| Shipment 2 | [ ] | 7 | 7 | + #+BEGIN_EXAMPLE ,#+STARTUP: shrink #+END_EXAMPLE diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 679cb5ab8..5ab5bf939 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -67,7 +67,8 @@ or nil if the normal value should be used." (defcustom org-columns-summary-types nil "Alist between operators and summarize functions. -Each association follows the pattern (LABEL . SUMMARIZE) where +Each association follows the pattern (LABEL . SUMMARIZE), +or (LABEL SUMMARISE COLLECT) where LABEL is a string used in #+COLUMNS definition describing the summary type. It can contain any character but \"}\". It is @@ -78,6 +79,12 @@ Each association follows the pattern (LABEL . SUMMARIZE) where The second one is a format string or nil. It has to return a string summarizing the list of values. + COLLECT is a function called with one argument, a property + name. It is called in the context of a headline and must return + the collected property, or the empty string. You can use this + to only collect a property if a related conditional properties + is set, e.g. to return VACATION_DAYS only if CONFIRMED is true. + Note that the return value can become one value for an higher order summary, so the function is expected to handle its own output. @@ -299,13 +306,29 @@ integers greater than 0." (push ov org-columns-overlays) ov)) -(defun org-columns--summarize (operator) - "Return summary function associated to string OPERATOR." +(defun org-columns--summary-type (operator) + "Return summary type function(s) associated to string OPERATOR." (if (not operator) nil (cdr (or (assoc operator org-columns-summary-types) (assoc operator org-columns-summary-types-default) (error "Unknown %S operator" operator) +(defun org-columns--summarize (operator) + "Return summary function associated to string OPERATOR." + (let ((type (org-columns--summary-type operator))) +(if (functionp type) + type + ;; got summary AND collect functions + (car type + +(defun org-columns--collect (operator) + "Return collect function associated to string OPERATOR." +
Re: [O] Buffer timeline omissions with org-class
Hello, Ross Laird writes: > I'm using org-class to schedule my classes, and the entries are structured as > follows: > > %%(org-class 2017 9 4 2017 12 04 2 ) 04:00pm-06:50pm Class: CRWR 1240, Cedar > 1060 > %%(org-class 2017 9 5 2017 12 04 2 ) 10:00am-12:50pm Class: CRWR 2900 > %%(org-class 2017 9 5 2017 12 04 1 41 46) 4:00pm-6:50pm Class: CRWR 4130 > > In the main agenda view, the entries display correctly: > > Week-agenda (W37): > Monday 11 September 2017 W37 > kpu:16:00-18:50 Class: CRWR 4130 > Tuesday12 September 2017 > kpu:10:00-12:50 Class: CRWR 2900 > kpu:16:00-18:50 Class: CRWR 1240, Cedar 1060 > ... > > However, when I show the timeline for the buffer for these entries, > they do not display correctly: > > Timeline of file /home/ross/org/kpu.org > -- > Monday 11 September 2017 W37 > 4:00pm-6:50pm Class: CRWR 4130 >:CLASS: > > [... 4 empty days omitted] > ... > > These omissions do not follow any obvious pattern. There should be 3 > class entries each week (as in the agenda view), but in the timeline > view there are a total of three entries for the entire semester: CRWR > 4130 is shown twice (on September 11 and 25), and CRWR 2900 and 1240 > are shown only once in the entire semester (both on November 21). > > Because of this strange pattern, I'm not even sure where to start in > figuring this out. Feedback most welcome. FWIW, Timeline doesn't exist anymore in current Org. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Detect state changes correctly if todo state names contain German umlauts
Hello, em...@edgar-kalkowski.de writes: > as I am from Germany I use an umlaut in one of my org todo state names. I > noticed that state changes concerning that state are not picked up by the > org agenda view. This is due to umlauts missing from a regular expression > that is used to detect lines with state changes in them in the logbook > drawer. > > To remedy this issue I propose to apply the appended patch. Thank you! I applied something slightly different, though. Does it solve your issue? Regards, -- Nicolas Goaziou
Re: [O] function for inserting a block
Eric Abrahamsen writes: [...] > Here's another stab at it. Is "example" the only block that should be > verbatim? Will using `newline-and-indent' instead of inserting literal > newlines solve the indentation problem? > > > (defun org-insert-structure-template (type) > "Insert a block structure of the type #+BEGIN_FOO/#+END_FOO. > Prompts for a block type, and inserts the block. With an active > region, wrap the region in the block. With no active region, wrap the > current element." > (interactive "sBlock type: ") > (unless (use-region-p) > (org-mark-element)) > (let ((s (copy-marker (min (point) (mark > (e (copy-marker (max (point) (mark) > (when (string-equal (downcase type) "example") > (org-escape-code-in-region s e)) > (goto-char s) > (beginning-of-line) > (insert (format "#+BEGIN_%s" type)) > (newline-and-indent) > (goto-char e) > (unless (bolp) > (end-of-line) > (newline-and-indent)) > (insert (format "#+END_%s" type)) > (newline-and-indent) > (set-marker s nil) > (set-marker e nil))) And here's an actual patch, with docs. >From 0ffb541d10ff4516a869a8c521683e8a6b0a0577 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Fri, 8 Sep 2017 11:48:45 -0700 Subject: [PATCH] New function org-insert-structure-template * lisp/org.el (org-insert-structure-template): Wraps the region or current element in a #+BEGIN_FOO/#+END_FOO block. * doc/org.texi: Document. * etc/ORG-NEWS: Note in news. --- doc/org.texi | 21 +++-- etc/ORG-NEWS | 5 - lisp/org.el | 26 ++ 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index f40f458e3..094e9b48b 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -15212,12 +15212,14 @@ A @samp{src} block conforms to this structure: #+END_SRC @end example -Org mode's templates system (@pxref{Easy templates}) speeds up creating -@samp{src} code blocks with just three keystrokes. Do not be put-off by -having to remember the source block syntax. Org also works with other -completion systems in Emacs, some of which predate Org and have custom -domain-specific languages for defining templates. Regular use of templates -reduces errors, increases accuracy, and maintains consistency. +Do not be put off by having to remember the source block syntax. Org mode +offers two ways of speeding up the creation of @samp{src} code blocks: a +templates system that can create a new block with just three keystrokes, and +a command for wrapping existing text in a block (@pxref{Easy templates}). +Org also works with other completion systems in Emacs, some of which predate +Org and have custom domain-specific languages for defining templates. +Regular use of templates reduces errors, increases accuracy, and maintains +consistency. @cindex source code, inline An inline code block conforms to this structure: @@ -17388,6 +17390,13 @@ Org comes with these pre-defined easy templates: More templates can added by customizing the variable @code{org-structure-template-alist}, whose docstring has additional details. +@findex org-insert-structure-template +Easy templates are ideal when writing new content, but sometimes it is +necessary to mark up existing content. For these cases, Org provides the +function @code{org-insert-structure-template}, which prompts for a block +type, and wraps either the active region or the current Org element in that +block. This command is not bound to a key by default. + @node Speed keys @section Speed keys @cindex speed keys diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e6ad838a6..3b98a7713 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -38,7 +38,6 @@ Archiving headers through ~org-archive-subtree~ and #+END_SRC Will update the status cookie in the top level header. - *** Disable =org-agenda-overriding-header= by setting to empty string The ~org-agenda-overriding-header~ inserted into agenda views can now @@ -57,7 +56,11 @@ size. #+BEGIN_EXAMPLE ,#+STARTUP: shrink #+END_EXAMPLE +** New functions +*** ~org-insert-structure-template~ +This function can be used to wrap existing text or Org elements in +a #+BEGIN_FOO/#+END_FOO block. Not bound to a key by default. * Version 9.1 ** Incompatible changes diff --git a/lisp/org.el b/lisp/org.el index 8fd01ffb2..2c234de48 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12215,6 +12215,32 @@ expands them." (insert rpl) (when (re-search-backward "\\?" start t) (delete-char 1 +(defun org-insert-structure-template (type) + "Insert a block structure of the type #+BEGIN_FOO/#+END_FOO. +Prompts for a block type, and inserts the block. With an active +region, wrap the region in the block." + (interactive "sBlock type: ") + (unless (use-region-p) +(org-mark-element)) + (let ((s (copy-marker (min (point) (mark + (e (copy-marker (max (point) (mark) +(when (string-equal (downcase type) "example") + (o
Re: [O] ox-html export bug
2017-09-08 19:40 GMT+02:00 kadal : > On 09/08/2017 10:32 AM, Nicolas Goaziou wrote: > >> kadal writes: >> >> Seems like the second one should export to either "" >>> or "". >>> >> >> Is it valid HTML? >> >> Regards, >> >> This SO thread has confusing answers: https://stackoverflow.com/ques > tions/192048/can-an-html-element-have-multiple-ids#192066 > > Looks like the second option will work. Not valid according to : https://www.w3.org/TR/html5/syntax.html#attributes-0 "There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other." > That said, the first option is better because if I'm setting a CUSTOM_ID, > that's what should be used for internal links... > > I agree with that. Ideally, if you set a CUSTOM_ID, then it should replace the default org generated id. Regards, Fabrice
[O] Buffer timeline omissions with org-class
I'm using org-class to schedule my classes, and the entries are structured as follows: %%(org-class 2017 9 4 2017 12 04 2 ) 04:00pm-06:50pm Class: CRWR 1240, Cedar 1060 %%(org-class 2017 9 5 2017 12 04 2 ) 10:00am-12:50pm Class: CRWR 2900 %%(org-class 2017 9 5 2017 12 04 1 41 46) 4:00pm-6:50pm Class: CRWR 4130 In the main agenda view, the entries display correctly: Week-agenda (W37): Monday 11 September 2017 W37 kpu:16:00-18:50 Class: CRWR 4130 Tuesday12 September 2017 kpu:10:00-12:50 Class: CRWR 2900 kpu:16:00-18:50 Class: CRWR 1240, Cedar 1060 ... However, when I show the timeline for the buffer for these entries, they do not display correctly: Timeline of file /home/ross/org/kpu.org -- Monday 11 September 2017 W37 4:00pm-6:50pm Class: CRWR 4130 :CLASS: [... 4 empty days omitted] ... These omissions do not follow any obvious pattern. There should be 3 class entries each week (as in the agenda view), but in the timeline view there are a total of three entries for the entire semester: CRWR 4130 is shown twice (on September 11 and 25), and CRWR 2900 and 1240 are shown only once in the entire semester (both on November 21). Because of this strange pattern, I'm not even sure where to start in figuring this out. Feedback most welcome. Cheers, Ross
Re: [O] ox-html export bug
On 09/08/2017 10:32 AM, Nicolas Goaziou wrote: kadal writes: Seems like the second one should export to either "" or "". Is it valid HTML? Regards, This SO thread has confusing answers: https://stackoverflow.com/questions/192048/can-an-html-element-have-multiple-ids#192066 Looks like the second option will work. That said, the first option is better because if I'm setting a CUSTOM_ID, that's what should be used for internal links... Deepak
Re: [O] ox-html export bug
Fair point. Would it be sufficient to give these type of links a class, say "org-internal-links". Then you should be able to explicitly turn off the content for these links. .org-internal-links::after {content:"";} I don't know, looks like a bug to me. I haven't put much thought into it, but I wonder if it would be possible to ignore EXTRA-IDS and only use PREFERRED-ID (see `org-html-headline'), i.e., use (or (org-element-property :CUSTOM_ID headline) (org-export-get-reference headline info)) It could be a problem when publishing to HTML, but I'm not sure at this point. Going back to the original report: -- 1 heading 1 2 heading 2 --- The first headline with no CUSTOM_ID exports to "" The second headline with a CUSTOM_ID exports to "id="orge4e91c4">" Seems like the second one should export to either "" or "". Not sure why the empty link is being inserted or needs to be there at all. Deepak
Re: [O] ox-html export bug
kadal writes: > Seems like the second one should export to either "" > or "". Is it valid HTML? Regards,
[O] [PATCH] Detect state changes correctly if todo state names contain German umlauts
Hello fellow org-moders, as I am from Germany I use an umlaut in one of my org todo state names. I noticed that state changes concerning that state are not picked up by the org agenda view. This is due to umlauts missing from a regular expression that is used to detect lines with state changes in them in the logbook drawer. To remedy this issue I propose to apply the appended patch. Best regards, Edgar PS: Since I am not subscribed to the org mode mailing list please include my mail address in any reply to this message.>From 6a6e75f9d42b028fd39c79896b9e13f532c4a4ed Mon Sep 17 00:00:00 2001 From: Edgar Kalkowski Date: Fri, 8 Sep 2017 15:47:49 +0200 Subject: [PATCH] org-agenda.el: Detect state changes correctly if the todo state contains umlauts * lisp/org/org-agenda.el (org-agenda-get-progress): Add typical German umlauts to the regexp detecting state changes. TINYCHANGE --- lisp/org/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 6ef333a..709e1ef 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -5780,7 +5780,7 @@ please use `org-class' instead." (list (if (memq 'closed items) (concat "\\<" org-closed-string)) (if (memq 'clock items) (concat "\\<" org-clock-string)) - (if (memq 'state items) "- State \"\\([a-zA-Z0-9]+\\)\".*?" + (if (memq 'state items) "- State \"\\([a-zA-ZäöüÃÃÃÃ0-9]+\\)\".*?" (parts-re (if parts (mapconcat 'identity parts "\\|") (error "`org-agenda-log-mode-items' is empty"))) (regexp (concat -- 2.14.1
Re: [O] ics calendar?
Matt Price writes: > I've been using Kaushal's fantastic ox-hugo to build my course websites (see > http://2017.hackinghistory.ca/ for one more or less finished example; > slightly out of date and not-yet documented source files are on Github at > https://github.com/titaniumbones/Hacking-History/tree/2017). It's a great > system and I love it. > > I've just noticed that Hugo supports .ics formats and thought it would be > useful to have a calendar for the class. I've never done .ics exports in org > -- I don't use the core calendar/agenda features very effectively -- and am > not sure > what the best way to do this would be. So I'm really just asking whether > other people do ics exports and if so, how you structure the org source files > and so forth. In addition to what others have said, I'll note that the export process "flattens" all entries with dates, so the structure of the org file itself matters less. Apologies if you already knew that... Eric
Re: [O] Table aligning and editing in 9.2
On 7 September 2017, Nicolas Goaziou wrote: What workflow are you missing? Note that typing in a shrunk column expands it. Previously one could edit the contents of a cell in a shrunken column without doing anything special: move the point in, move to a position, then hit any key (space, delete, a letter), and the change is made. If a character is deleted then the => at the end comes closer; if added it moves away. C-c C-c or TAB realigns everything. Everything is directly editable: the text can be operated on without any barriers. But now the cell contents are locked until either a) C-C ` opens up an edit buffer (which was useful before for editing a long piece of text that got shrunk, but is a lot of work when you have something short like "Foo" in a <10> column and want to make it "Bar") or, as you point out, b) something is typed in the shrunk column. But when something is typed in a shrunk column, the column expands and the point is now at the start of the cell. To edit anything in the cell, you need to hit "a" or SPC or something just to get in there, then you need to delete it, then move to where you want to make a change, then edit. And then C-c C-c or TAB doesn't realign things, you need to hit C-c TAB. So the workflow is different, and in each piece it's more awkward. Everything works---and I appreciate that the code and implementation is much cleaner now---but it seems like some of the magic that makes Org tables so wonderful is now gone. :( Bill -- William Denton :: Toronto, Canada --- Listening to Art: https://listeningtoart.org/ https://www.miskatonic.org/ --- GHG.EARTH: http://ghg.earth/ Caveat lector. --- STAPLR: http://staplr.org/
Re: [O] org-agenda-current-time-string partly fontified with emphasis
Hello, Samuel Wales writes: >> You may be able to tweak fontification to ignore this special case. See >> `org-font-lock-set-keywords-hook' to install a special rule for. > > are there examples of the usage of this? There is one in "contrib/lisp/org-wikinodes.el". >> It will work as long as you don't export the document. For that case, >> you could write a filter turning multiple "=" into "\equal". > > is there a filter that will change instances /before/ they get > converted by a backend? There are two of them: `org-export-before-processing-hook' and `org-export-before-parsing-hook'. > i don't want to use hyphens, and org's separator is page-wide. It depends on the export back-end. You can control the width of the separator in "latex" and "ascii" back-ends. Regards, -- Nicolas Goaziou
Re: [O] duplicated test names... are these bugs?
Hello, Stig Brautaset writes: > > Running tests on master for me, with make test, results in a single test > failure in `ob-shell/bash-uses-assoc-arrays'. While looking into that I > found that there are _two_ definitions of that in the test-ob-shell.el > file. This strikes me as unlikely to be ideal, and I decided to look a > bit further and it turns out this is not unique. Running the following > command from the top-level org-mode directory > > : $ ag --nogroup --nonumbers ert-deftest | sort | uniq -d > > Results in > > : testing/lisp/test-ob-lilypond.el:(ert-deftest ob-lilypond/ly-gen-html () > : testing/lisp/test-ob-shell.el:(ert-deftest ob-shell/bash-uses-assoc-arrays > () > : testing/lisp/test-ob-shell.el:(ert-deftest > ob-shell/generic-uses-no-assoc-arrays () > : testing/lisp/test-ob.el:(ert-deftest > test-ob/commented-last-block-line-with-var () > : testing/lisp/test-ob.el:(ert-deftest > test-ob/org-babel-remove-result--results-default () > : testing/lisp/test-ob.el:(ert-deftest > test-ob/org-babel-remove-result--results-list () > : testing/lisp/test-ob.el:(ert-deftest > test-ob/org-babel-remove-result--results-pp () > : testing/lisp/test-org-table.el:(ert-deftest test-org-table/align () > > I'm not super familiar with ert, but I _assume_ that this will lead to > only the last definition of the test with the duplicate names being run > by 'make test'? Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] add additional tag (using %^G) to existing tag in org capture
Xebar Saram writes: > the issues is that it dosent seem to add an additional tag to the already > defined tag list in the capture (:@work: ) but instead add another :TAG: field > apart from the already existing tag field. so the final result looks like > this: > > ** TODO TEST :@work: :TAG: > > while i expect the %^G capture to add to the existing tag entry so it looks > like this > > ** TODO TEST :@work:TAG: Hey Z, I understand now. Yes, that happens because org-capture-fill-template inserts the tag text manually, like this: #+BEGIN_SRC elisp (let* ((org-last-tags-completion-table (org-global-tags-completion-table (cond ((equal key "G") (org-agenda-files)) (file (list file)) (t nil (org-add-colon-after-tag-completion t) (ins (mapconcat #'identity (org-split-string (completing-read (if prompt (concat prompt ": ") "Tags: ") 'org-tags-completion-function nil nil nil 'org-tags-history) "[^[:alnum:]_@#%]+") ":"))) (when (org-string-nw-p ins) (unless (eq (char-before) ?:) (insert ":")) (insert ins) (unless (eq (char-after) ?:) (insert ":")) (and (org-at-heading-p) (let ((org-ignore-region t)) (org-set-tags nil 'align) #+END_SRC It would be simple to have it use org-set-tags-to instead of inserting them manually. I guess that would be correct in the vast majority of cases, however IIUC it would be a change in functionality, as the %^G could be put anywhere in the template and insert tags there (which seems like a strange thing to do, but you never know). On the other hand, it seems like what you're asking for would be the more expected functionality, in which case this would be a bug fix. So maybe the maintainers would accept a patch for that, or maybe not... :)
Re: [O] Bug: markdown export errors on headers [9.0.9 (9.0.9-82-gb862c2-elpaplus @ /home/fommil/.emacs.d/elpa/org-plus-contrib-20170814/)]
"Loris Bennett" writes: >> I and others have asked a few times why the packages are structured in >> this way, but nobody seems able to provide the rationale. Personally, I >> think we should just have an org package and an org-contrib package >> which depends on the org package. >> >> Tim >> > > So is there a specific reason why there is no 'org-contrib' package > without 'org'? Yes, that would seem to make more sense.
Re: [O] ox-html export bug
Hello, Rasmus writes: > kadal writes: > >> The problem is that if you have CSS that decorates links by adding >> content after a link, that (empty) link gets decorated too. > > Fair point. Would it be sufficient to give these type of links a class, > say "org-internal-links". Then you should be able to explicitly turn off > the content for these links. > > .org-internal-links::after {content:"";} I haven't put much thought into it, but I wonder if it would be possible to ignore EXTRA-IDS and only use PREFERRED-ID (see `org-html-headline'), i.e., use (or (org-element-property :CUSTOM_ID headline) (org-export-get-reference headline info)) It could be a problem when publishing to HTML, but I'm not sure at this point. Regards, -- Nicolas Goaziou
Re: [O] ics calendar?
Matt Price writes: > I've just noticed that Hugo supports .ics formats and thought it would be > useful to have a calendar for the class. I've never done .ics exports in > org -- I don't use the core calendar/agenda features very effectively -- > and am not sure what the best way to do this would be. So I'm really just > asking whether other people do ics exports and if so, how you structure the > org source files and so forth. 1. Create the headline, "* Hacking History 2017 class {{{n}}}", maybe in a new file, classes.org. 2. Give it a date with "C-c .". AFAIK you have to manually put the cursor on the new line. 3. M-x org-clone-subtree-with-time-shift and give (1- total-number-of-classes) plus a time shift, typically +1w- 4. Export to ICS, maybe as part of your publishing routine if ox-hugo uses ox-publish. You should be able to create something like this, * Hacking History 2017 class {{{n}}} <2017-09-08 Fri 10:00-12:00> * Hacking History 2017 class {{{n}}} <2017-09-15 Fri 10:00-12:00> * Hacking History 2017 class {{{n}}} <2017-09-22 Fri 10:00-12:00> I use org-caldav to synchronize with owncloud for what it is worth. Hope it helps, Rasmus -- The right to be left alone is a human right
Re: [O] ox-html export bug
kadal writes: > The problem is that if you have CSS that decorates links by adding > content after a link, that (empty) link gets decorated too. Fair point. Would it be sufficient to give these type of links a class, say "org-internal-links". Then you should be able to explicitly turn off the content for these links. .org-internal-links::after {content:"";} > Is it possible to remove it? You could use a filter to remove empty links just after headings. See ‘org-export-filter-headline-functions’ and ‘org-export-derived-backend-p’. Rasmus -- Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio