Re: opening a 0.5 MB org file is slow
>>> "JJ" == Jeremie Juste writes: > Hello Uwe, > Very well, it seems that we are on the right track. So you might gain > some speed by preventing some minor modes to load at the beginning and > load only when you need them. > Like Ihor Radchenko mentioned in his previous a great way to diagnose > the issu would be the following: > 1. M-x profiler-start cpu > 2. open your file > 3. M-x profiler-report > It will let you see which functions are slowing you down. Thanks! I did it. But I am a bit puzzled about the outcome: + redisplay_internal (C function)1724 82% + command-execute 215 10% + ... 117 5% + timer-event-handler 22 1% global-orglink-mode-check-buffers 1 0% Not sure what to do with stuff on the C level. Uwe smime.p7s Description: S/MIME cryptographic signature
Re: opening a 0.5 MB org file is slow
> + redisplay_internal (C function)1724 82% > Not sure what to do with stuff on the C level. Look inside that branch. Most likely redisplay is calling font-lock staff. You need to check what particular part of fontification is slow. Best, Ihor Uwe Brauer writes: "JJ" == Jeremie Juste writes: > >> Hello Uwe, >> Very well, it seems that we are on the right track. So you might gain >> some speed by preventing some minor modes to load at the beginning and >> load only when you need them. > >> Like Ihor Radchenko mentioned in his previous a great way to diagnose >> the issu would be the following: > >> 1. M-x profiler-start cpu >> 2. open your file >> 3. M-x profiler-report > >> It will let you see which functions are slowing you down. > > Thanks! I did it. But I am a bit puzzled about the outcome: > > + redisplay_internal (C function)1724 82% > + command-execute 215 10% > + ... 117 5% > + timer-event-handler 22 1% > global-orglink-mode-check-buffers 1 0% > > Not sure what to do with stuff on the C level. > > Uwe
Two tables with same data but different sorting
Hello! I have a table that I want to show with two different sorting orders but I don’t want to maintain the data twice. * Table 1 | Manufacturer| Name| Price | |-+-+---| | ACME| super cheep | 25 $ | | Roadrunner Inc. | Kaboom | 27 $ | | ACME| cheep | 30 $ | * Table 2 | Manufacturer| Name| Price | |-+-+---| | ACME| cheep | 30 $ | | ACME| super cheep | 25 $ | | Roadrunner Inc. | Kaboom | 27 $ | Is there a way to do this in org? Right now I copy the table and apply an =C-c ^ a= on the first column. Greetings Axel
Reciprocal links between items
Hi! I wonder whether org-mode has a way to indicate reciprocal A↔B relations between two items. If item A points to item B, then automatically B also points to A. Accordingly, when the relation is removed on A, it is also removed from B. I’m in the process of bringing my notes from Zotero to Org. What I’m after is something like Zotero’s "related" feature. Is there a way to represent that kind of relation in org? Victor
Re: Reciprocal links between items
On 2020-10-01 10:53, "Victor A. Stoichita" writes: > I wonder whether org-mode has a way to indicate reciprocal A↔B > relations between two items. If item A points to item B, then > automatically B also points to A. Accordingly, when the relation > is removed on A, it is also removed from B. > > I’m in the process of bringing my notes from Zotero to Org. > What I’m after is something like Zotero’s "related" feature. > Is there a way to represent that kind of relation in org? You might want to have a look at org-roam, that implements such backlinks. https://github.com/org-roam/org-roam Best, Alan signature.asc Description: PGP signature
Re: recursive checkbox counting
On Thursday, 1 Oct 2020 at 08:44, Alan Schmitt wrote: > I'm trying to recursively count checkboxes, with intermediate counting: I think you can only do this for lists of lists. In your case, you would have the 2020 headline but all subheadings would be list elements with the cookie. You would keep the recursive property in the top headline. But, for the record, I would like to be able to do what you want as well. It just doesn't seem possible currently. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505
Re: recursive checkbox counting
Hello Eric, On 2020-10-01 12:26, Eric S Fraga writes: > On Thursday, 1 Oct 2020 at 08:44, Alan Schmitt wrote: >> I'm trying to recursively count checkboxes, with intermediate counting: > > I think you can only do this for lists of lists. In your case, you > would have the 2020 headline but all subheadings would be list elements > with the cookie. You would keep the recursive property in the top > headline. Thank you for the suggestion, it works indeed. > But, for the record, I would like to be able to do what you want as > well. It just doesn't seem possible currently. I agree. Best, Alan signature.asc Description: PGP signature
Re: Two tables with same data but different sorting
You could do something like this: * Table 1 #+name: table1 | Manufacturer| Name| Price | |-+-+---| | ACME| super cheep | 25 $ | | Roadrunner Inc. | Kaboom | 27 $ | | ACME| cheep | 30 $ | #+RESULTS: resorted | Manufacturer| Name| Price | |-+-+---| | ACME| super cheep | 25 $ | | ACME| cheep | 30 $ | | Roadrunner Inc. | Kaboom | 27 $ | ** Code for resorting #+name: resorted #+BEGIN_SRC emacs-lisp :var data=table1 :colnames t (sort data (lambda (row1 row2) (string< (first row1) (first row2 #+END_SRC John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Oct 1, 2020 at 4:57 AM Axel Kielhorn wrote: > Hello! > > I have a table that I want to show with two different sorting orders but I > don’t want to maintain the data twice. > > > * Table 1 > > | Manufacturer| Name| Price | > |-+-+---| > | ACME| super cheep | 25 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > | ACME| cheep | 30 $ | > > * Table 2 > > | Manufacturer| Name| Price | > |-+-+---| > | ACME| cheep | 30 $ | > | ACME| super cheep | 25 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > > Is there a way to do this in org? > Right now I copy the table and apply an =C-c ^ a= on the first column. > > Greetings > Axel >
Re: Two tables with same data but different sorting
> Am 01.10.2020 um 14:21 schrieb John Kitchin : > > You could do something like this: > > > * Table 1 > > #+name: table1 > | Manufacturer| Name| Price | > |-+-+---| > | ACME| super cheep | 25 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > | ACME| cheep | 30 $ | > > #+RESULTS: resorted > | Manufacturer| Name| Price | > |-+-+---| > | ACME| super cheep | 25 $ | > | ACME| cheep | 30 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > > ** Code for resorting > > #+name: resorted > #+BEGIN_SRC emacs-lisp :var data=table1 :colnames t > (sort data (lambda (row1 row2) (string< (first row1) (first row2 > #+END_SRC > > John > Thanks John, this is really powerful. I changed =first row1= to =elt row1 6= since my real table is more complex. (Again I learned a little bit more about elisp.) Greetings Axel
Re: Links in complete org-todo-keyword-face not highlighted
Thanks Kyle! Worked like a charm! Kind regards, Bob > On Sep 30, 2020, at 5:30 PM, Kyle Meyer wrote: > > Bob Wilson writes: > >> I often put links in TODOs, but it would appear that in org 9.4, >> marking a task complete changes the font of the entire text (link and >> non-link) to be the same color, so the link is no longer highlighted. > [...] >> I tried searching the mailing list to see if this has been discussed >> previously but didn’t see anything. Any help would be appreciated! > > In v9.4, the default of org-fontify-done-headline changed to t, which > results in the org-headline-done face applied. You can set it to nil to > restore the previous behavior.
Re: Shower thought: submit an IETF RFC to register Org as a MIME type
TEC writes: > > Is anyone willing to move forward with this registration? > > In about two months, I am. IETF person here. If you want help or a co-author, I can help if needed. [not a mime expert, but I've been involved with the IETF for ~25 years] -- Wes Hardaker My Pictures: http://capturedonearth.com/ My Thoughts: http://blog.capturedonearth.com/
Re: Shower thought: submit an IETF RFC to register Org as a MIME type
Wes Hardaker writes: IETF person here. If you want help or a co-author, I can help if needed. [not a mime expert, but I've been involved with the IETF for ~25 years] Fantastic! I've never summited an RFC or interacted with the IETF before in my life, so that sounds great to me :) Thanks for volunteering, Timothy.
Re: Two tables with same data but different sorting
Glad it was helpful. You might also try (seventh row1) or (nth 6 row1). I think it is the same thing, but more obvious to read! John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Oct 1, 2020 at 10:37 AM Axel Kielhorn wrote: > > > > Am 01.10.2020 um 14:21 schrieb John Kitchin : > > > > You could do something like this: > > > > > > * Table 1 > > > > #+name: table1 > > | Manufacturer| Name| Price | > > |-+-+---| > > | ACME| super cheep | 25 $ | > > | Roadrunner Inc. | Kaboom | 27 $ | > > | ACME| cheep | 30 $ | > > > > #+RESULTS: resorted > > | Manufacturer| Name| Price | > > |-+-+---| > > | ACME| super cheep | 25 $ | > > | ACME| cheep | 30 $ | > > | Roadrunner Inc. | Kaboom | 27 $ | > > > > ** Code for resorting > > > > #+name: resorted > > #+BEGIN_SRC emacs-lisp :var data=table1 :colnames t > > (sort data (lambda (row1 row2) (string< (first row1) (first row2 > > #+END_SRC > > > > John > > > > Thanks John, this is really powerful. > > I changed =first row1= to =elt row1 6= since my real table is more complex. > > (Again I learned a little bit more about elisp.) > > Greetings > Axel > > >
Re: Reciprocal links between items
Le 01 Oct 2020, Alan Schmitt a écrit : You might want to have a look at org-roam, that implements such backlinks. Thanks Alan! That’s interesting! I watched the introductory video and started reading the org-roam docs. They begin with the rationale of Zettelkasten note taking, which implies one org file per note, and an sqlite database… I think that org-roam can be a great tool, but it takes too big a change for what I need (basically just the ability to insert backlinks). I guess that if I want something simple which avoids using an external database, I could write a function that inserts and deletes the links in both items. Maybe a good way to train my lisp-foo. Kind regards, Victor
Bug: clocktable latex attributes
Hi the Orgmode team, I have a problem with the clocktable which seems to be a bug because it does not accept latex attributes before the BEGIN line:#+latex_header: \usepackage{tabularx}#+ATTR_LATEX: :align Xll :width \textwidth#+BEGIN: clocktable :scope file :maxlevel 2 the only solution I found is the following (put the attribute after the BEGIN :):#+latex_header: \usepackage{tabularx}#+BEGIN: clocktable :scope file :maxlevel 2#+ATTR_LATEX: :align Xll :width \textwidth But every time I update the clocktable (C-c C-c) the latex attribute line disappears. Cordially. Matt
Re: org-tempo insertion incoherence (lack of indentation) or misunderstanding
Hi Bruno, Bruno BEAUFILS writes: > Let us imagine this simple org file : > > #+NAME: first > #+begin_src org > > - an item > - subitem > > #+end_src > > If the cursor is at the last line and I want to insert an org block, > let's say an example, using org-tempo feature, I can type = followed by tabulation. > > In that case I get something like > > #+NAME: second > #+begin_src org > > - an item > - subitem > > #+begin_example > > #+end_example > > #+end_src > > However if I get indentation role (for instance in exports) well I do > not expect that but instead something like: > > #+NAME: third > #+begin_src org > > - an item > - subitem > > #+begin_example > > #+end_example > > #+end_src > > Are my expectations (and thus my use of indentation by org-mode > understandings) wrong or is it a bug? Whether the inserted block is indented depends on ‘org-get-indentation’ and thus the cursor’s position, at least in some cases. In particular, if | is the cursor, run org-get-indentation for these two examples to understand when you get indentation and when not: 1. - a | 2: - a | In 1. you are making a new block outside the list, in 2. it is part of the first item of the list. Both are valid. > In the same spirit if before trying that I type tabulation then = then tabulation again, nothing is inserted, aka org-tempo seems to work > only when cursor is at the beginning of line. > > Am I right? Is it a feature or a bug? You can have any amount of whitespace before expanding something a tempo snippet. You can’t have anything but whitespace before expanding a tempo snippet as a block must be the only thing on the line. (there does appear to be a bug in expanding when there’s something after the snippet: - a I expected that the example block would have been inserted /correctly/ > indented as in my third example above. > > > The only solution I found for getting things right is to type spaces > instead of tabulation to let my cursor go to the right column. > > Let us consider this snippet. > > #+NAME: fourth > #+begin_src org > > - an item > - subitem > H > #+end_src > > If the cursor is in the =H= position, then if I type = tabulation everything seems right and I get the same result as in > <>. > > Any help would appreciated. AFAICT everything is working as expected. Kind regards, Rasmus -- Even a three-legged dog has three good legs to lose
Limitations on Tags ?
Just wondering -- what's the limit in the number of tags for a headline? What if I have a headline with lots of tags or some very long tags? -- David Masterson
Re: recursive checkbox counting
The way I've made this work is with the following property: :COOKIE_DATA: ALL But I suppose I haven't tried if that's fully recursive. HTH, - Tory Alan Schmitt writes: > Hello, > > I'm trying to recursively count checkboxes, with intermediate counting: > > * [0/0] 2020 > :PROPERTIES: > :COOKIE_DATA: checkbox recursive > :END: > ** [1/1] Week 39 > - [X] [[file:2020-09-29.org][§:2020-09-29 (Tuesday)]] > ** [2/2] Week 36 > - [X] [[file:2020-09-08.org][§:2020-09-08 (Tuesday)]] > - [X] [[file:2020-09-07.org][§:2020-09-07 (Monday)]] > > Unfortunately I don't know what property I need to set on the top-level > node to recursively count everything. I would like to see [3/3] there. > Is there a way to do it? > > Thanks, > > Alan
Re: Reciprocal links between items
Hi Victor, Currently Org-ID can only be placed on entries. This uses the properties drawer. When we are talking about entries, what I do is, use Org-ID links to entries to go in one direction, and an agenda search to go in the opposite direction as follows. (define-key org-mode-map (kbd "C-c w") 'alpha-org-what-links-here) (defun alpha-org-what-links-here () "Show all links that point to the current node. Possibly also show the target node itself. I think this gets all archive files in $dorg, including ones with no corresponding .org file. See `alpha-org-all-org-files'. - fixme produce error if no id or fix non-id search - fixme Bug in Org: g in agenda removes entries =maybe fixed - fixme org text search does not work in non-org-mode files or in org files text above the outline tree ka - we might want to search in del and dsh also via grep This makes Org ID links quasi-bidirectional. " (interactive) (let ((org-agenda-files (alpha-org-all-org-files)) org-agenda-skip-comment-trees org-agenda-skip-archived-trees (search-string (or ;; inherits id from ancestors ;; raw id so it will pick up target (alpha-awhen (org-entry-get nil "ID" t) (regexp-quote it)) (concat "{\\(" ;; tries searching a link to id ;; not sure if useful (regexp-quote (org-store-link nil)) "\\|\\<" ;; not sure if useful (regexp-quote (org-get-heading)) "\\>\\)}" (org-search-view nil search-string))) When you say item, do you mean list item, or thing? In either case, Org cannot currently do this. To do that, you can search the mailing list for ID markers and implement them, which pretty much do what you want, or try implementing something with the new link mechanism to include Org-ID. This would allow them as link targets. I think Org-ID is likely to be part of your mix, regardless of what you do to implement this, if you do. One concern I have is that Org-ID is already slow in searching. Making it search for anything of a lower syntactic status than entries might or might not make it slower. Perhaps it would be necessary to tell the search engine what it is looking for. On 10/1/20, Victor A. Stoichita wrote: > > Le 01 Oct 2020, Alan Schmitt > a écrit : >> You might want to have a look at org-roam, that implements such >> backlinks. > > Thanks Alan! That’s interesting! > > I watched the introductory video and started reading the org-roam > docs. They begin with the rationale of Zettelkasten note taking, > which implies one org file per note, and an sqlite database… > I think that org-roam can be a great tool, but it takes too big > a change for what I need (basically just the ability to insert > backlinks). > > I guess that if I want something simple which avoids using an > external database, I could write a function that inserts and > deletes the links in both items. Maybe a good way to train my > lisp-foo. > > Kind regards, > Victor > > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
Re: :auto-sitemap in org-publish-project-alist ??
David Masterson writes: > My org-publish-project-alist kind of looks like this: > > (setq org-publish-project-alist > '(("orgfiles" >:base-directory "~/DSM/MyOrg/" >:base-extension "org" >:publishing-directory "~/Publish/html/" >:publishing-function org-html-publish-to-html >:headline-levels 6 >:section-numbers t >:makeindex t >:auto-sitemap t >:exclude "init.org" >:with-toc nil))) > > > If I publish my files, sitemap.org is made in a buffer and written to a > file, Thereafter, org-publish always says sitemap.org has been changed > on disk and asks about updating it. Since it is a generated file, that > shouldn't be necessary. > > Is there a way to turn that off and just have it overwrite the file? Anyone seeing this? -- David Masterson
Re: Framing images?
On 1/10/2020 5:59 am, Eric S Fraga wrote: On Wednesday, 30 Sep 2020 at 11:21, Mike Gauland wrote: I'd like to have a frame around images in my exported documents. I'm primarily interested in LaTeX export, but html is a secondary concern. There are definitely LaTeX ways of doing this (e.g. using mdframed is the best I've found for general framing of both text and images [1]). But obviously these won't work for HTML export. You might, however, be able to get what you want with a 1 row 1 column table? eric Footnotes: [1] https://www.ctan.org/pkg/mdframed Thanks for the suggestion. In the end, I've found the simplest solution for my purposes is to use graphicsmagick to add a border around the images.
Re: Reciprocal links between items
> I think that org-roam can be a great tool, but it takes too big > a change for what I need (basically just the ability to insert > backlinks). https://github.com/toshism/org-super-links is probably what you want. Best, Ihor "Victor A. Stoichita" writes: > Le 01 Oct 2020, Alan Schmitt > a écrit : >> You might want to have a look at org-roam, that implements such >> backlinks. > > Thanks Alan! That’s interesting! > > I watched the introductory video and started reading the org-roam > docs. They begin with the rationale of Zettelkasten note taking, > which implies one org file per note, and an sqlite database… > I think that org-roam can be a great tool, but it takes too big > a change for what I need (basically just the ability to insert > backlinks). > > I guess that if I want something simple which avoids using an > external database, I could write a function that inserts and > deletes the links in both items. Maybe a good way to train my > lisp-foo. > > Kind regards, > Victor
Re: Two tables with same data but different sorting
> Am 01.10.2020 um 17:47 schrieb John Kitchin : > > Glad it was helpful. You might also try (seventh row1) or (nth 6 row1). I > think it is the same thing, but more obvious to read! I agree that „first second …“ would be easier for an english speaker. Having the ordinal number 1 based but the nth number 0 based is irritating (and sadly there is no „last“ or „penultimate“). Actually I was looking for something like last element or the element before the last element. (nth -1 row1) for the last row would be fine, but I guess that is the Python whispering in my ear. Combined with the right :exports I now get what I want. Thanks again for this additional information. Greetings Axel