Re: pcase failure with Emacs 24 (was Emacs version for Org 9.4?)
On 2020-09-15, Kyle Meyer wrote: > It is pretty tricky to debug, but the failure starts with 4a27b67fd > (org-element: Fix property drawers parsing, 2020-04-22). As far as I > can see, the pattern introduced there is perfectly valid and should be > compatible with Emacs 24. I'd _guess_ this is a pcase bug in Emacs 24, > particularly the one fixed by 528872c5f8 (bug#18554, 2014-09-27), but I > didn't make an effort to try to understand that commit. > > Interestingly, the error goes away if I just swap the elements in the > pcase (and ...) pattern added by that commit. Dunno, but if that clears > up the failure on your end as well, I don't see any reason to not make > that change. > > > diff --git a/lisp/org-element.el b/lisp/org-element.el > [...] Yes, that fixes the problem over here. Many thanks for debugging this, I’m deeply impressed. Best wishes Jens
Keep Org mode submodules in Emacs, please!
[[[ To any NSA and FBI agents reading my email: please consider]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Redesigning Org mode so that its secondary features are more modular, and integrate better individually into Emacs, would be a big improvement. When the reorganization is finished, please keep all of the code inside Emacs. Each piece should be in Emacs core, or in GNU ELPA, whichever seems more convenient. Those are places we can refer to. Please do not move any of the code to MELPA, because we will not refer to it there. I am not on the emacs-orgmode list. Russell, if you get this directly but it does not come through the list, would you please forward it there? -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)
Re: basic org questions
Emanuel Berg writes: > TEC wrote: > > I know this commands well from my LaTeX projects, > but I'm gonna use LaTeX anyway, what's the use of > using org-mode? You see, strangely enough - if you want to tweak the result of Org exporting to LaTeX, you have to write LaTeX :P Assuming your only use of Org is exporting to LaTeX (needless to say, this leaves a lot of nice functionality on the table), you still get the benefit of a more succinct syntax, and can embed such customisations in the default LaTeX class fairly easily --- see https://tecosaur.github.io/emacs-config/config.html#class-templates Functionally, all I'm doing is #+begin_src emacs-lisp (add-to-list 'org-latex-classes ("my-article" "...preamble...")) (setq org-latex-default-class "my-article") #+end_src > And even for the most basic tasks like configuring > how a paragraph will look? Yea, some export settings have a convenient variable for them, others have to be done by hand. I've always been able to get my desired output though :) > Also, that doesn't work. Put it in the document, new > PDF, looks the same. Oh, if you just pasted the SRC block from my email, that wouldn't. You need to put the commands in a #+latex_header: ... line. Sorry if that wasn't clear. Regards, Timothy.
Re: how to exclude a file from appearing in the refile target cache?
Den Tue, 15 Sep 2020 22:54:28 + skrev Re: how to exclude a file from appearing in the refile target cache?: > Sent from my iPhone > > > On Sep 15, 2020, at 3:37 PM, swedebugia > > wrote: > > > > Hi > > > > I read: > > https://orgmode.org/manual/Refile-and-Copy.html > > > > But its unclear to me how to exclude a file from appearing in the > > refile target cache. > > > > My cache takes 13s to build and its too long for my taste. I have > > archived all old notes now. I want to exclude my archive.org from > > the refile targets. Is there a way to do that? > > > > You can use org-refile-targets to explicitly tell which files to > include when you want to Copy and Refile. I am not near my computer, > otherwise I would have shared an example. Thanks! This should be added in the manual page linked above I think.
Re: eldoc recursion error
I've attached a patch that addresses the recursion issue with Emacs 28 and shows eldoc properly with example python. It presumably should act the same with older versions of Emacs, although I haven't tested. diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el index 3b0999340..ccc23b523 100644 --- a/contrib/lisp/org-eldoc.el +++ b/contrib/lisp/org-eldoc.el @@ -116,9 +116,12 @@ (when (fboundp mode-func) (with-temp-buffer (funcall mode-func) -(setq doc-func (and eldoc-documentation-function -(symbol-value 'eldoc-documentation-function))) -(puthash lang doc-func org-eldoc-local-functions-cache)) + (setq doc-func (if (boundp 'eldoc-documentation-functions) + (car eldoc-documentation-functions) + (and eldoc-documentation-function +(symbol-value 'eldoc-documentation-function + + (puthash lang doc-func org-eldoc-local-functions-cache)) doc-func) cached-func)))
Re: basic org questions
TEC wrote: > #+begin_src latex > \setlength{\parindent}{0pt} > \setlength{\parskip}{\baselineskip} > #+end_src I know this commands well from my LaTeX projects, but I'm gonna use LaTeX anyway, what's the use of using org-mode? Is this the org-mode that people have been praising for like a decade or so? You get to do LaTeX all over? And even for the most basic tasks like configuring how a paragraph will look? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: tags-todo agenda shoud not ignore DONE items
Bastien writes: > Confirming this as an issue, if someone wants to fix it. I've tried taking a shot at addressing this issue via the patch attached. As mentioned in the thread, might potentially cause issues by changing how it matches -- should there be an option? Or is the idea just that if you really do want to exclude done tags, you'd query like "/!DONE"? diff --git a/lisp/org.el b/lisp/org.el index 020cfc873..3db1add8b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11691,7 +11691,7 @@ See also `org-scan-tags'." `(and ,tagsmatcher ,todomatcher) (or tagsmatcher todomatcher t (when org--matcher-tags-todo-only - (setq matcher `(and (member todo org-not-done-keywords) ,matcher))) + (setq matcher `(and (member todo org-todo-keywords-1) ,matcher))) (cons match0 `(lambda (todo tags-list level) ,matcher) (defun org--tags-expand-group (group tag-groups expanded)
Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. Hello, I use theme which draw boxes around priority cookie. Before updating to version 9.4 box was rendered just around square brackets, but since version 9.4 it has additional space at the end. I think it's related to the fact that org-priority face definition used to use separate regex which didn't include space, and now it uses variable org-priority-regexp which does include additional space character. ;; Old (defun org-font-lock-add-priority-faces (limit) "Add the special priority faces." (while (re-search-forward "^\\*+ .*?\\(\\[#\\(.\\)\\]\\)" limit t) (add-text-properties (match-beginning 1) (match-end 1) (list 'face (org-get-priority-face (string-to-char (match-string 2))) 'font-lock-fontified t ;; New (defun org-font-lock-add-priority-faces (limit) "Add the special priority faces." (while (re-search-forward org-priority-regexp limit t) (add-text-properties (match-beginning 1) (match-end 1) (list 'face (org-get-priority-face (string-to-char (match-string 2))) 'font-lock-fontified t (defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]+\\)\\] ?\\)" Removing space before last question mark fixes my problem, but I'm not sure it won't affect something.[org-mode-priority-9.3.8.png][org-mode-priority-9.4.png] Emacs : GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2020-08-11 Package: Org mode version 9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)
Re: basic org questions
TEC wrote: > #+begin_src latex > \setlength{\parindent}{0pt} > \setlength{\parskip}{\baselineskip} > #+end_src Also, that doesn't work. Put it in the document, new PDF, looks the same. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Matt Huszagh wrote: >> Yes, after export to PDF, they are centered. >> they = the whole table items. > > I think this link > (https://orgmode.org/manual/Tables-in-LaTeX-export.html) > is the relevant part of the documentation. Yeah, but in LaTeX being left aligned is not some property of the table, everything is left-aligned, and if you want it otherwise, you put between \begin{center} and \end{center} ... -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Emanuel Berg via General discussions about Org-mode. writes: > Tim Cross wrote: > >> #+latex_class: korma-article > > user-error: Unknown LaTeX class ‘korma-article’ That probably indicates you have not got the necessary Latex packages installed. It was mainly an example of using a different document class style (there are many). Depending on what platform your on, some of these additional classes are in a separate package, often called something like latex-extra or latex-styles-extra or similar. > >> #+latex_header: \setlength{\parindent}{0pt} > > Yes, that's removed the indentation but didn't insert > a blank line... #+latex_header: \parskip 1.5ex might work. Again, this stuff is controlled by the specific latex document class your using. When you need to make 'tweaks' like this, google latex commands and then use things like #+latex_header: to set them. -- Tim Cross
Re: [PATCH] ob-core: Fix handling of multiple noweb refs in same line
Tom Gillespie writes: >This fixes the issue on my system, and looking over the bisected > commit it looks like the ^ was just an oversight. This also resolves > the issue for <> as well, I don't think we need a > separate test case for that since any issue with references breaking > should show up elsewhere (though I guess you never know). Thank you > for tracking this down, and now I know how to add ert tests for things > like this in the future! Best, > Tom > > On Tue, Sep 15, 2020 at 12:21 AM Kyle Meyer wrote: [...] >> Subject: [PATCH] ob-core: Fix handling of multiple noweb refs in same line Thanks for testing on your end. Pushed (469ee6340).
Re: basic org questions
Emanuel Berg via General discussions about Org-mode. writes: > user-error: Unknown LaTeX class ‘korma-article’ This is just because the class has to be defined in =org-latex-classes= (see the doctring for info). By default it contains: - beamer - article - report - book >> #+latex_header: \setlength{\parindent}{0pt} > > Yes, that's removed the indentation but didn't insert > a blank line... This is getting into LaTeX, not Org, but you need to do two things: 1. Remove indent 2. Set parskip to the height of a line i.e. #+begin_src latex \setlength{\parindent}{0pt} \setlength{\parskip}{\baselineskip} #+end_src You can add a number before =\baselineskip= to 'stretch' that length. E.g. for half a line =0.5\baselineskip=. Hope that helps, Timothy.
pcase failure with Emacs 24 (was Emacs version for Org 9.4?)
Jens Lechtenboerger writes: > Hi there, > > if I open an Org file on > “GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of > 2017-09-12 on hullmann, modified by Debian” > I get this error (which I don’t know how to debug): > > Eager macro-expansion failure: (wrong-type-argument listp :pcase--succeed) [...] > In ORG-NEWS, I only found that “Emacs 24.4 or above is suggested.” > Did that change? No, it didn't. It is pretty tricky to debug, but the failure starts with 4a27b67fd (org-element: Fix property drawers parsing, 2020-04-22). As far as I can see, the pattern introduced there is perfectly valid and should be compatible with Emacs 24. I'd _guess_ this is a pcase bug in Emacs 24, particularly the one fixed by 528872c5f8 (bug#18554, 2014-09-27), but I didn't make an effort to try to understand that commit. Interestingly, the error goes away if I just swap the elements in the pcase (and ...) pattern added by that commit. Dunno, but if that clears up the failure on your end as well, I don't see any reason to not make that change. diff --git a/lisp/org-element.el b/lisp/org-element.el index a693cb68d..755de8661 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4324,7 +4324,7 @@ (defsubst org-element--next-mode (mode type parent?) (if parent? (pcase type (`headline 'section) - ((and `section (guard (eq mode 'first-section))) 'top-comment) + ((and (guard (eq mode 'first-section)) `section) 'top-comment) (`inlinetask 'planning) (`plain-list 'item) (`property-drawer 'node-property)
Re: [PATCHES 1, 2, 3/3] Minor customisation features for ox-icalendar and agenda
> 1. Show document title instead of file name in org-agenda; > > This should be useful for any users of org-roam package or anyone who > autogenerate file names and uses document titles instead for navigation. Interesting idea. This may also be useful as an option to `org-refile-use-outline-path'. Currently, its value may be 'file to prepend file names to the outline paths in refile targets. Using document title (i.e. when the variable is set to 'title) in the refile paths may also be handy. Best, Ihor Mikhail Skorzhinskii writes: > Hello forum, > > I'd like to introduce three new features and request to merge the with > current > master: > > 1. Show document title instead of file name in org-agenda; > > This should be useful for any users of org-roam package or anyone who > autogenerate file names and uses document titles instead for navigation. > > 2. Customise summary lines of exported events in ox-icalendar > > I personally export deadlines and scheduled items to the separate files so I > don't need these cookies and they consume precious space of summary line. So > I > prefer them be disabled. This should be possible to do now with only > customisation setting. > > 3. Force creation of an alarm when exporting event in ox-icalendar > > Sometimes I prefer to create icalendar alarms exactly at the event start, but > it's not possible since alarm set to zero means that alarm will be disabled. > Forcing alarm creation will now create alarm no matter the setting. > > I've updated news files and attempted to replicate the style of submissions, > but I admit that I didn't read much beyond CONTRIBUTE file. Please point me > to > the right direction in case of any issues I can fix. > > Kind regards, > Mikhail Skorzhinskii > > From 111e6886564abbf3becb2a94e66f235f502b79d9 Mon Sep 17 00:00:00 2001 > From: Mikhail Skorzhinskii > Date: Sat, 12 Sep 2020 18:52:39 +0200 > Subject: [PATCH 3/3] ox-icalendar.el: introduce setting to force alarms > > This is a new setting for icalendar exports to allow users set alarms > exactly at the event start. With this setting set to non-nil and alarm > set to zero (by global setting or APPT_WARNTIME property) it will create > an alarm at the event start. > > Note, that zero alarm set as APPT_WARNTIME property will override > default warning time. > --- > etc/ORG-NEWS | 10 ++ > lisp/ox-icalendar.el | 24 +--- > 2 files changed, 31 insertions(+), 3 deletions(-) > > diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS > index b912e807d..eb950d934 100644 > --- a/etc/ORG-NEWS > +++ b/etc/ORG-NEWS > @@ -23,6 +23,16 @@ path. > Through these new options for icalendar export, one can customise the > looks of summary lines in exported events. > > +*** New option ~org-icalendar-force-alarm~ > + > +This is a new setting for icalendar exports to allow users set alarms > +exactly at the event start. With this setting set to non-nil and alarm > +set to zero (by global setting or APPT_WARNTIME property) it will > +create an alarm at the event start. > + > +Note, that zero alarm set as =APPT_WARNTIME= property will override > +default warning time. > + > * Version 9.4 > ** Incompatible changes > *** Possibly broken internal file links: please check and fix > diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el > index f110a4b2b..baed925e8 100644 > --- a/lisp/ox-icalendar.el > +++ b/lisp/ox-icalendar.el > @@ -64,6 +64,15 @@ for timed events. If non-zero, alarms are created. >:version "24.1" >:type 'integer) > > +(defcustom org-icalendar-force-alarm nil > + "Non-nil means alarm will be created even if is set to zero. > + > +This overrides default behaviour where zero means no alarm. With > +this set to non-nil and alarm set to zero, alarm will be created > +and will fire at the event start." > + :group 'org-export-icalendar > + :type 'bool) > + > (defcustom org-icalendar-combined-name "OrgMode" >"Calendar name for the combined iCalendar representing all agenda files." >:group 'org-export-icalendar > @@ -797,8 +806,11 @@ Return VALARM component as a string, or nil if it isn't > allowed." >(let ((alarm-time >(let ((warntime > (org-element-property :APPT_WARNTIME entry))) > -(if warntime (string-to-number warntime) 0 > -(and (or (> alarm-time 0) (> org-icalendar-alarm-time 0)) > +(if warntime (string-to-number warntime) nil > +(and (or (and alarm-time > + (> alarm-time 0)) > + (> org-icalendar-alarm-time 0) > + org-icalendar-force-alarm) >(org-element-property :hour-start timestamp) >(format "BEGIN:VALARM > ACTION:DISPLAY > @@ -806,7 +818,13 @@ DESCRIPTION:%s > TRIGGER:-P0DT0H%dM0S > END:VALARM\n" >summary > - (if (zerop alarm-time) org-icalendar-alarm-time alarm-time) > + (if org-icalendar-force-alarm > + (if alarm-time > +
Re: basic org questions
Tim Cross wrote: > #+latex_class: korma-article user-error: Unknown LaTeX class ‘korma-article’ > #+latex_header: \setlength{\parindent}{0pt} Yes, that's removed the indentation but didn't insert a blank line... -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Matt Huszagh wrote: >> Yeah, but in LaTeX being left aligned is not some >> property of the table, everything is left-aligned, >> and if you want it otherwise, you put between >> \begin{center} and \end{center} ... > > That page also describes how to set float > parameters, which the table can be within. If you mean this, The table environments by default are not floats in LaTeX. To make them floating objects use ‘:float’ with one of the following options: ‘sideways’, ‘multicolumn’, ‘t’, and ‘nil’. then none of this produced a left-aligned table. #+ATTR_LATEX: :float sideways | 1 | 2 | | 3 | 4 | #+ATTR_LATEX: :float multicolumn | 1 | 2 | | 3 | 4 | #+ATTR_LATEX: :float t | 1 | 2 | | 3 | 4 | #+ATTR_LATEX: :float nil | 1 | 2 | | 3 | 4 | > What is the latex your export is generating? I use `org-latex-export-to-pdf', other than that I don't know what LaTeX it is. > What does your input org file look like, and what > sort of configuration parameters have you set? Not a lot :) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
#+include from same file when exporting
Hello, dear list! My comment for today is that I have something like this: this-file.org .. * Fancy header 1 #+NAME: blk1 #+begin_src python import numpy as np #+end_src ** Fancy subheader 2 Res 1 #+include: "this-file.org::blk1" Res 2 #+include: "this-file.org::blk1" src python Res 3 #+include: "./this-file.org::blk1" src python .. end When I export /Fancy subheader 2/ as text, I get this-file.txt .. ━━━ FANCY SUBHEADER 2 ━━━ Table of Contents ─ Res 1 ┌ │ import numpy as np └ Res 2 ┌ │ * Fancy header 1 │ │ #+NAME: blk1 │ #+begin_src python │ import numpy as np │ #+end_src │ │ ** Fancy subheader 2 │ │ Res 1 │ #+include: "this-file.org::blk1" │ │ Res 2 │ #+include: "this-file.org::blk1" src python │ │ Res 3 │ #+include: "./this-file.org::blk1" src python └ Res 3 ┌ │ * Fancy header 1 │ │ #+NAME: blk1 │ #+begin_src python │ import numpy as np │ #+end_src │ │ ** Fancy subheader 2 │ │ Res 1 │ #+include: "this-file.org::blk1" │ │ Res 2 │ #+include: "this-file.org::blk1" src python │ │ Res 3 │ #+include: "./this-file.org::blk1" src python └ .. end I think that all of them should just export the python block, right? Also, I think that it would be very useful to have something like this: another-file.org .. * Fancy header 1 #+NAME: blk1 #+begin_src python :exports none print(2) #+end_src #+RESULTS: : 2 ** Fancy subheader 2 Res 1 #+include: "this-file.org::blk1" src python :exports both .. end Which would allow to have the =#+include= override the =:exports= directive from the original block and get the results from the block. Right now, I can do yaf.org .. * Fancy header 1 #+NAME: blk1 #+begin_src python print(2) #+end_src ** Fancy subheader 2 Res 1 #+begin_src python :noweb yes :exports both <> #+end_src #+RESULTS: : 2 .. end to get the same result, but I thought that this could be a nice feature to add. GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.17.3) of 2020-09-08 Org mode version 9.3.7 (release_9.3.7-25-g4f22fd @ /home/edgar/.emacs.d/org-mode/lisp/) - This free account was provided by VFEmail.net - report spam to ab...@vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!
Re: official orgmode parser
Przemysław Kamiński writes: > > So, I keep clock times for work in org mode, this is very handy. > However, my customers require that I use their service to provide the > times. They do offer API. So basically I'm using elisp to parse org, > make API calls, and at the same time generate CSV reports with a Python > interop with org babel (because my elisp is just too bad to do that). If > I had access to some org parser, I'd pick a language that would be more > comfortable for me to get the job done. I guess it can all be done in > elisp, however this is just a tool for me alone and I have limited time > resources on hacking things for myself :) > I would probably use org's org-export-table command to export the clock table as a CSV and then just use a simple script to read in that CSV and do the API calls. > Another one is generating total hours report for day/week/month to put > into my awesomewm toolbar. I ended up using orgstat > https://github.com/volhovM/orgstat > however the author is creating his own DSL in YAML and I guess things > were much better off if it all stayed in some Scheme :) > Sounds like you have a solution. I would probably just setup a hook to generate the updated table and export it when the file is saved and then have something consume that exported file to update the taskbar. -- Tim Cross
Re: basic org questions
Emanuel Berg via General discussions about Org-mode. writes: > 1) How do I make a region italic? > > This does not fontify and does not show up as > italic type: > > /En gång i tiden var även Spanien täckt av skog. > En gammal berättelse menar att man i norra Spanien > kunde hoppa upp på en apas rygg och ta sig ner till > södra Spanien utan att klättra av en enda gång. Apan, > underförstått, kunde hoppa från gren till gren genom > hela halvön. Flyger man över Spanien idag ser man att > det har gått åt ett och annat träd sen dess./ > > /This/ works tho. > > 2) How do I have tables not appear centered > by default, but left-aligned? > > 3) How do I have a new paragraph, as indicated by > > p1 > > p2 > > appear w/o indentation, but with a blank line between > p1 and p2 (yes, exactly as stated, really). > It is important to understand the org mode architecture in order to understand how/where to try and change/fix things to get specific results. It is also very important to be clear about this architecture when asking questions so that you can include the most relevant information. Org has a multi-layered architecture. At the top is the org buffer where you put your org text. This text supports markup and other text with special meaning which the Emacs editor will display in specific ways using colours, fonts, overlays etc. When you export an org file, the contents of the org file is extracted and markup, options, 'special' text etc is mapped to the equivalent 'concept' in the back end format. Sometimes, this translation might involve multiple steps (e.g. for PDF the org text is translated into Latex, which is then translated into pdf). Understanding this is critical as all back ends are not the same and sometimes, the changes you need to make need to be performed at the back end rather than within the org file itself. For example, sometimes, a quick and easy change can be achieved by manually editing the *.tex file generated when doing a PDF export and other times, it may be necessary to define a whole new document class in order to achieve the result you want (for example, I defined a new entry for org-latex-classes called 'work' which added additional Latex classes and macro definitions needed to support the format documents had to have for my employer). All this means that you need to be explicit when asking a question whether what you want is for the org buffer/file, the exported file and what the exported format is. As with many questions involving technology, you are often better off explaining what your specific outcome is rather than on how to do something as the latter is often asking how to do something to implement what you think is the right solution when in fact a completely different solution might be easier. As an example, with your question about how to make a paragraph italic. Do you want the text to appear italic in the org buffer or do you want the PDF text which results from the export to be italic? Is it actually critical that it is italic or do you just want to make sure that text is rendered in such a way as to make it emphasised or stand out in the final exported output? If it is the latter, I would actually take a completely different approach. Rather than trying to mark the whole paragraph as italic, I would create a quoted block using #+begin_quote/#+end_quote. Each back end will interpret this quoted block in its own way and render it accordingly. Another approach would be to use embedded latex in your document and render the paragraph as a latex block using \begin{em} \end{em} or \begin{it} \end{it} The disadvantage of this approach is that your being very back end specific in your org-file, so exporting to other formats may not work well. With respect to your question regarding table placement in your PDF, have a look at the manual section on exporting and in particular, Latex export options. There are a number of options you can add to your table definition which will affect how the table is rendered or where it is placed within the document. Note that Latex is a VERY powerful document formatting system and it is VERY opinionated. Unlike MS Word and other word processing systems, with Latex derived formatting, your almost always better off leaving Latex to decide how to do things. With Latex, you select a document style and run with that. Tables are notoriously complex to get right and while you can achieve what you want, you will likely need to read up on Latex and how it processes tables and you may need to add or tweak the latex packages included by Org when it generates the output in order to get the precise result you are after. In your current case, you will likely be able to achieve your desired result just using the ':float' or ':placement' commands (see the org manual section on latex export). With respect to your final question on paragraph indent for first line - this is the default style for Latex documents. Different Latex document styles
Re: how to exclude a file from appearing in the refile target cache?
Sent from my iPhone > On Sep 15, 2020, at 3:37 PM, swedebugia wrote: > > Hi > > I read: > https://orgmode.org/manual/Refile-and-Copy.html > > But its unclear to me how to exclude a file from appearing in the > refile target cache. > > My cache takes 13s to build and its too long for my taste. I have > archived all old notes now. I want to exclude my archive.org from the > refile targets. Is there a way to do that? > You can use org-refile-targets to explicitly tell which files to include when you want to Copy and Refile. I am not near my computer, otherwise I would have shared an example. > Cheers > swedebugia >
Re: basic org questions
Emanuel Berg writes: > Yeah, but in LaTeX being left aligned is not some > property of the table, everything is left-aligned, > and if you want it otherwise, you put between > \begin{center} and \end{center} ... That page also describes how to set float parameters, which the table can be within. What is the latex your export is generating? What does your input org file look like, and what sort of configuration parameters have you set? Matt
Re: using header data in document
Corwin Brust wrote: > | Org comes with following pre-defined macros: > | > | ‘{{{keyword(NAME)}}}’ > | ‘{{{title}}}’ > | ‘{{{author}}}’ > | ‘{{{email}}}’ Thanks, great! > So you can use use, e.g. {{{author}}} in various > places to get at data from the header: > > | Org recognizes macro references in following Org markup areas: > | paragraphs, headlines, verse blocks, tables cells and lists. > | Org also recognizes macro references in keywords, such as > | ‘CAPTION’, ‘TITLE’, ‘AUTHOR’, ‘DATE’, and for some back-end > | specific export options. Hm, date? Maybe that can be used to do a line like the LaTeX's Last modified: \today or how would one do that? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Emanuel Berg via "General discussions about Org-mode." writes: > Yes, after export to PDF, they are centered. they = > the whole table items. I think this link (https://orgmode.org/manual/Tables-in-LaTeX-export.html) is the relevant part of the documentation. I haven't used this though, so I can't help you further. In general, it would be much easier to help you if you specify these things in the original question. The fact that you're asking about LaTeX export processed to PDF is critical information. Also, please consult the documentation before asking questions. There are gaps, but generally it's well-written and a lot of people have put a lot of time into it. Matt
Re: using header data in document
Greetings! On Tue, Sep 15, 2020 at 4:05 PM Emanuel Berg via General discussions about Org-mode. wrote: > > How can I use header data in the document? MACRO seems to be the current means to expose these. https://orgmode.org/manual/Macro-Replacement.html | Org comes with following pre-defined macros: | | ‘{{{keyword(NAME)}}}’ | ‘{{{title}}}’ | ‘{{{author}}}’ | ‘{{{email}}}’ So you can use use, e.g. {{{author}}} in various places to get at data from the header: | Org recognizes macro references in following Org markup areas: | paragraphs, headlines, verse blocks, tables cells and lists. | Org also recognizes macro references in keywords, such as | ‘CAPTION’, ‘TITLE’, ‘AUTHOR’, ‘DATE’, and for some back-end | specific export options. Regards, Corwin > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal
Re: basic org questions
if it is in the buffer, asopposed to export, to align body text, including stuff like planning lines, take a look at org-adapt-indentation. i prefer everything left-aligned as opposed to moving around with the header indentation level, so i set this. if it's export, check backends for vars. ascii has one. if centering really means centering then idk. On 9/15/20, Emanuel Berg via General discussions about Org-mode. wrote: > Matt Huszagh wrote: > >> Were you referring to the tables being centered >> after export (I see from another part of this chain >> that that's what you were referring to in the 3rd >> question) when you wanted them left-aligned? >> If that is the case, it would really help if you >> specify that in your original question. >> Appearance in an org-mode buffer and appearance in >> the PDF, HTML, etc. after export are very different >> things with very different configuration. > > Yes, after export to PDF, they are centered. they = > the whole table items. > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
using header data in document
How can I use header data in the document? E.g., #+AUTHOR: Emanuel Berg [...] \author I wrote this! # only that doesn't work -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Matt Huszagh wrote: > Were you referring to the tables being centered > after export (I see from another part of this chain > that that's what you were referring to in the 3rd > question) when you wanted them left-aligned? > If that is the case, it would really help if you > specify that in your original question. > Appearance in an org-mode buffer and appearance in > the PDF, HTML, etc. after export are very different > things with very different configuration. Yes, after export to PDF, they are centered. they = the whole table items. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Emanuel Berg via "General discussions about Org-mode." writes: > Heh...? What's strange with that? > > Anyway that's what I mean. I guess I'm just not sure what you mean. I was under the impression that tables were always left-aligned and table alignment in the manual refers to column alignment (https://orgmode.org/manual/Column-Width-and-Alignment.html). But it's certainly possible there's an org-mode feature I'm not aware of. Were you referring to the tables being centered after export (I see from another part of this chain that that's what you were referring to in the 3rd question) when you wanted them left-aligned? If that is the case, it would really help if you specify that in your original question. Appearance in an org-mode buffer and appearance in the PDF, HTML, etc. after export are very different things with very different configuration. Matt
how to exclude a file from appearing in the refile target cache?
Hi I read: https://orgmode.org/manual/Refile-and-Copy.html But its unclear to me how to exclude a file from appearing in the refile target cache. My cache takes 13s to build and its too long for my taste. I have archived all old notes now. I want to exclude my archive.org from the refile targets. Is there a way to do that? Cheers swedebugia
Re: "text mode" org mode
Stefan Nobis wrote: >>> (setq org-link-descriptive nil) >> >> I don't have org-link-descriptive, it seems... > > No problem, the old name is =org-descriptive-links= > (this name has been deprecated in Org 9.3, but it > is still working in 9.4). Thanks, I wonder tho if all this (setq org-descriptive-links nil) (setq org-hide-emphasis-markers nil) (setq org-startup-folded'showeverything) is implied, with `visual-mode'? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Matt Huszagh wrote: > If you mean the table itself, that would be > very strange. Heh...? What's strange with that? Anyway that's what I mean. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
tomas wrote: > The variable `org-emphasis-regexp-components' is > documented, so one might hope that the method is > magic, but somewhat official. Indeed, that works: (setq org-emphasis-regexp-components (append (butlast org-emphasis-regexp-components) '(7)) ) :) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Re: basic org questions Russell Adams wrote: >> 1) How do I make a region italic? [...] > > https://emacs.stackexchange.com/questions/18101/org-mode-multi-line-emphasis-and-bold OK, thanks, not the same good looking syntax tho but good enough for government work, I suppose. >> 2) How do I have tables not appear centered by >> default, but left-aligned? > > https://orgmode.org/manual/Column-Width-and-Alignment.html Tried all of the three options suggested #+STARTUP: align #+STARTUP: noalign #+STARTUP: shrink but the table still appears centered? OK, no I see, I mean the actual table should appear to the left! The table itself looks good. >> 3) How do I have a new paragraph, as indicated by >> p1 >> p2 >> appear w/o indentation, but with a blank line >> between p1 and p2 (yes, exactly as stated, >> really). > > In what? Are you exporting? Yes, I use `org-latex-export-to-pdf' to get a PDF. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: basic org questions
Hi Emanuel, Emanuel Berg via General discussions about Org-mode. writes: > 1) How do I make a region italic? > > This does not fontify and does not show up as > italic type: > > /En gång i tiden var även Spanien täckt av skog. > En gammal berättelse menar att man i norra Spanien > kunde hoppa upp på en apas rygg och ta sig ner till > södra Spanien utan att klättra av en enda gång. Apan, > underförstått, kunde hoppa från gren till gren genom > hela halvön. Flyger man över Spanien idag ser man att > det har gått åt ett och annat träd sen dess./ > > /This/ works tho. You could try using something like visual-line-mode, olivetti-mode, writeroom-mode to obviate the need for inserting newlines. I've attached a screenshot. Hope this helps, Aleks > > 2) How do I have tables not appear centered > by default, but left-aligned? > > 3) How do I have a new paragraph, as indicated by > > p1 > > p2 > > appear w/o indentation, but with a blank line between > p1 and p2 (yes, exactly as stated, really). > > TIA! :)
Re: official orgmode parser
There's also org-ql (https://github.com/alphapapa/org-ql), which also provides a query-based API against Org structures. --Diego On Tue, Sep 15, 2020 at 2:59 PM wrote: > On Tue, Sep 15, 2020 at 01:15:56PM +0200, Przemysław Kamiński wrote: > > [...] > > > There's the org-json (or ox-json) package but for some reason I > > wasn't able to run it successfully. I guess export to S-exps would > > be best here. But yes I'll check that out. > > If that's your route, perhaps the "Org element API" [1] might be > helpful. Especially `org-element-parse-buffer' gives you a Lisp > data structure which is supposed to be a parse of your Org buffer. > > From there to S-expression can be trivial (e.g. `print' or `pp'), > depending on what you want to do. > > Walking the structure should be nice in Lisp, too. > > The topic of (non-Emacs) parsing of Org comes up regularly, and > there is a good (but AFAIK not-quite-complete) Org syntax spec > in Worg [2], but there are a couple of difficulties to be mastered > before such a thing can become really enjoyable and useful. > > The loose specification of Org's format (arguably its second > or third strongest asset, the first two being its incredible > community and Emacs itself) is something which makes this > problem "interesting". People have invented lots of usages > which might be broken should Org change to a strict formal > spec. You don't want to break those people. > > But yes, perhaps some day someone nails it. Perhaps it's you :) > > Cheers > > [1] https://orgmode.org/worg/dev/org-element-api.html > [2] https://orgmode.org/worg/dev/org-syntax.html > > - t >
Bug: 9.4 Regression in handling of empty #+TAGS: [9.4 (9.4-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20200914/)]
Previously, placing an empty #+TAGS: in a file would override org-file-tags for the file. In 9.4, an empty #+TAGS: is ignored and org-file-tags is used. The relevant code in org.el: (setq org-current-tag-alist (org--tag-add-to-alist org-tag-persistent-alist (let ((tags (mapconcat #'identity (cdr (assoc "TAGS" alist)) "\n"))) (if (org-string-nw-p tags) (org-tag-string-to-alist tags) org-tag-alist This regression is undesirable because I have a set of common org-file-tags for most files, but one particular file where automatically detecting the existing tags in the file works better (the default behavior when org-current-tag-alist is empty). Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3) of 2020-08-28 Package: Org mode version 9.4 (9.4-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20200914/)
Re: variable-pitch-mode misaligns org-mode heading tags
Following the call for help to fix bugs, and with building guilt, I’ve taken a stab at fixing aligning tags when using a variable-pitch font. I haven’t tested this much because I do not know if it is misguided, but it seems to work. Seems the only way to do it is to use the ‘display text property and expand a single space between the headline and tags. Here is a drop-in replacement of org--align-tags-here which ensures there is one space between the tags and headline, and then expands that space by setting a text property. I’ve removed the point-preserving code because it does not seem to be needed using this method. This would also allow removing org-fix-tags-on-the-fly from org-self-insert-command since there is only a single space between the headline and the tags and it is adjusted automatically. If this looks promising I can throw some more time at it. If not, I will happily abandon it. (defun org--align-tags-here (to-col) "Align tags on the current headline to TO-COL. Assume point is on a headline. Preserve point when aligning tags." (save-excursion (when (org-match-line org-tag-line-re) (let* ((tags-start (match-beginning 1)) (blank-start (progn (goto-char tags-start) (skip-chars-backward " \t") (point ;; If there is more than one space between the headline and tags, ;; delete the extra spaces. Might be better to ;; make the delete region one space smaller rather than inserting ;; a new space? (when (> tags-start (1+ blank-start)) (delete-region blank-start tags-start) (goto-char blank-start) (insert " ")) ;; Don't set the text property unless it is needed. ;; Not sure this check is efficient. Probably not necessary. (unless (equal (get-text-property blank-start 'display) `(space . (:align-to ,to-col))) (put-text-property blank-start (1+ blank-start) 'display `(space . (:align-to ,to-col Bastien writes: Hi Eric, Eric S Fraga writes: Also support for org-indent-mode: having the text align nicely with the heading (as it does with monospace typefaces) would be more visually pleasing. But I have a feeling that the calculations required for this and the above may be significant and arguably not worth it? Indeed. Org, especially with respect to (large) tables, is already quite slow unfortunately. Fortunately, the reasons why tables might be slow are distinct from the reasons why org-indent might be slow. But yes, space-based alignment is a welcome improvement as long as it does not make Org slower. -- Jeff Filipovits Spears & Filipovits, LLC 1126 Ponce de Leon Avenue Atlanta, GA 30306 678.237.9302 (direct) jrfilipov...@gmail.com All emails confidential to the fullest extent of the law.
Re: basic org questions
Emanuel Berg via "General discussions about Org-mode." writes: > 2) How do I have tables not appear centered > by default, but left-aligned? Do you mean the alignment of columns, or the table itself? You can control column alignment with ``, ``, ``, e.g., | title | description |other desc | |--+--+---| | | || |some title| some description.|right desc | | some other title | some longer description. | longer right desc | If you mean the table itself, that would be very strange. I'm not too sure about your other questions. Matt
Re: [PATCH] Omit file description when :file-desc has nil value
> Kyle Meyer writes: > >> I also don't find the current behavior particularly intuitive. (I'm >> also not really a babel user, so my opinion probably shouldn't count for >> much.) If we were adding it today, I think what you describe would be >> better, but, as you mention, breakage also now also weighs against >> making a change here. >> >> In any case, I'd suggest raising the discussion on the list after the >> 9.4 release. Hello, just following up on this since 9.4 has been released. Thoughts? Matt
Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]
- Mail original - > De: "Thomas Stenhaug" > À: "Frederic Santos" > Cc: "Kyle Meyer" , "Colin Baxter" , > "emacs-orgmode" > Envoyé: Mardi 15 Septembre 2020 15:43:29 > Objet: Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 > (9.3.7-55-gba2405-elpa @ > /home/fsantos/.emacs.d/elpa/org-20200907/)] > Ah, in that case > >(push '("\\.pdf\\''" . emacs)) > > might be what you're looking for. Very nice, many thanks Thomas ! ;) This works fine for me. For reference, I've also posted your solution on StackExchange. Cheers, Frédéric
Re: "text mode" org mode
Emanuel Berg via "General discussions about Org-mode." writes: > Stefan Nobis wrote: >> (setq org-link-descriptive nil) > I don't have org-link-descriptive, it seems... No problem, the old name is =org-descriptive-links= (this name has been deprecated in Org 9.3, but it is still working in 9.4). -- Until the next mail..., Stefan.
Re: basic org questions
On Tue, Sep 15, 2020 at 05:29:05PM +0200, Emanuel Berg via General discussions about Org-mode. wrote: > 1) How do I make a region italic? > > This does not fontify and does not show up as > italic type: > > /En gång i tiden var även Spanien täckt av skog. > En gammal berättelse menar att man i norra Spanien > kunde hoppa upp på en apas rygg och ta sig ner till > södra Spanien utan att klättra av en enda gång. Apan, > underförstått, kunde hoppa från gren till gren genom > hela halvön. Flyger man över Spanien idag ser man att > det har gått åt ett och annat träd sen dess./ > > /This/ works tho. This is not /really/ documented, so handle with some care. In a nutshell, org's emphasis was born to handle short spans of text. To not slow the fontifier too much, the matching is limited to at most (i believe) two lines. But, given a bit of deep magic [1], you can increase that limit. The variable `org-emphasis-regexp-components' is documented, so one might hope that the method is magic, but somewhat official. I use that for /normal/ texts: they tend to want longer emphasised spans... Cheers [1] https://emacs.stackexchange.com/questions/18101/org-mode-multi-line-emphasis-and-bold - t signature.asc Description: Digital signature
Re: basic org questions
On Tue, Sep 15, 2020 at 05:29:05PM +0200, Emanuel Berg via General discussions about Org-mode. wrote: > 1) How do I make a region italic? > > This does not fontify and does not show up as > italic type: > > /En gång i tiden var även Spanien täckt av skog. > En gammal berättelse menar att man i norra Spanien > kunde hoppa upp på en apas rygg och ta sig ner till > södra Spanien utan att klättra av en enda gång. Apan, > underförstått, kunde hoppa från gren till gren genom > hela halvön. Flyger man över Spanien idag ser man att > det har gått åt ett och annat träd sen dess./ > > /This/ works tho. https://emacs.stackexchange.com/questions/18101/org-mode-multi-line-emphasis-and-bold > 2) How do I have tables not appear centered > by default, but left-aligned? https://orgmode.org/manual/Column-Width-and-Alignment.html Note that numbers are right aligned by default, and others are left. > 3) How do I have a new paragraph, as indicated by > > p1 > > p2 > > appear w/o indentation, but with a blank line between > p1 and p2 (yes, exactly as stated, really). In what? Are you exporting? Also consider IRC. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
basic org questions
1) How do I make a region italic? This does not fontify and does not show up as italic type: /En gång i tiden var även Spanien täckt av skog. En gammal berättelse menar att man i norra Spanien kunde hoppa upp på en apas rygg och ta sig ner till södra Spanien utan att klättra av en enda gång. Apan, underförstått, kunde hoppa från gren till gren genom hela halvön. Flyger man över Spanien idag ser man att det har gått åt ett och annat träd sen dess./ /This/ works tho. 2) How do I have tables not appear centered by default, but left-aligned? 3) How do I have a new paragraph, as indicated by p1 p2 appear w/o indentation, but with a blank line between p1 and p2 (yes, exactly as stated, really). TIA! :) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
Stefan Nobis wrote: > (setq org-link-descriptive nil) I don't have org-link-descriptive, it seems... Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/) GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu) of 2019-09-23, modified by Debian -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
On Tue, Sep 15, 2020 at 03:33:57PM +0200, Emanuel Berg via General discussions about Org-mode. wrote: > Russell Adams wrote: > > > I believe you can set your #+STARTUP on your file > > to "showall". > > Can I prevent hyperlinks from folding back and forth? > > I mean, with [[][]] ? Cf. the variable `org-link-descriptive' and its associated toggle function `org-toggle-link-display' (also reachable via the menu Org -> Links -> Descriptive ...) There is an unproven conjecture by some mathematician from the seventeenth century that Org contains everything. He wrote that he had a proof, but that the margin of the book he just had at hand was too narrow to write it down. Therefore: buy only books with large margins, kids. ;-) Cheers - t signature.asc Description: Digital signature
Re: "text mode" org mode
Gustavo Barros wrote: > That's probably not something most Org users would > do, but I think you'd get close to what you want > with: > > (add-hook 'org-mode-hook 'visible-mode) Yeah, that seems to have done it? Great! Thanks a lot! ;;; -*- lexical-binding: t -*- ;;; ;;; this file: ;;; http://user.it.uu.se/~embe8573/emacs-init/org-my.el ;;; https://dataswamp.org/~incal/emacs-init/org-my.el (require 'mode-line) (require 'org) (require 'super) (defun org-mode-set-keys () (let ((the-map org-mode-map)) (disable-super-global-keys the-map) (define-key the-map "\C-c\C-c" #'org-latex-export-to-pdf) )) ;; (setq org-mode-hook nil) (defun org-mode-hook-f () (auto-fill-mode -1) (enable-line-mode) (org-mode-set-keys) (visible-mode) ) (add-hook 'org-mode-hook #'org-mode-hook-f) -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
Hi Emmanuel, Nearly everything in org-mode is configurable, so I think what you want is definitely doable. In addition to using `visible-mode` as suggested by Gustavo (this is maybe the easiest), you can also configure Org to show the emphasis markup characters: (setq org-hide-emphasis-markers nil) And to show the full markup of links: (setq org-link-descriptive nil) --Diego On Tue, Sep 15, 2020 at 3:35 PM Emanuel Berg via General discussions about Org-mode. wrote: > Russell Adams wrote: > > > I believe you can set your #+STARTUP on your file > > to "showall". > > Can I prevent hyperlinks from folding back and forth? > > I mean, with [[][]] ? > > Hm, maybe this will just go on and on if there is no > option to do it for real. The font-lock idea was > perhaps not so bad...? > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > >
Re: "text mode" org mode
Emanuel Berg via "General discussions about Org-mode." writes: > Can I tell Org mode to don't change editing back and > forth, also don't collapse items in and out, i.e. > virtually text mode I did not test it to every detail, but the following two settings may be a good starting point: #+begin_src elisp (setq org-startup-folded 'showeverything) (setq org-link-descriptive nil) #+end_src Also have a look at all the ~org-toggle-*~ commands like ~org-toggle-link-display~ and ~org-toggle-pretty-entities~ (the source of these commands should reveal the associated variable that can be set globally to the desired start value). -- Until the next mail..., Stefan.
Re: "text mode" org mode
On Tue, Sep 15, 2020 at 03:16:56PM +0200, Emanuel Berg via General discussions about Org-mode. wrote: > what I was looking for was a way to > typeset that had a less involved syntax > than LaTeX, to be able to create simple > PDFs, somewhere between plain text and > LaTeX. I asked on gmane.emacs.orgmode , > if they cannot solve it I'll just > `require' org, apply the org-mode's > font-lock to a text-mode buffer, and use > `org-latex-export-to-pdf' Markdown, Asciidoc and Pandoc? There are many modern solutions to exporting from text to pretty formats. Org just happens to have many more features. If Org's core features (ie: outlining) are in your way, perhaps one of those tools is more suitable? Emacs has modes to fontify those formats too. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: Re Org 9.4 is out. Can you help? // breaking apart Org Mode
On Tue, Sep 15, 2020 at 09:00:39AM -0400, Nicholas Savage wrote: > I'm new to the development scene (contributed my first patch to > Emacs last week or so) and a new developer in general who has been > looking to get involved. I saw Bastien's post on Hacker News > yesterday and thought that if Org Mode is looking for contributors > it would be a good place for me, since I use Org Mode frequently. I > have a rudimentary understanding of elisp, but I'm looking to > improve by actually contributing. Nicholas, I'm in much the same position. I've offered to help and trying to participate. My elisp is ok, but I have little practical experience. >From the code standpoint my concern for several years has been that Org is so powerful, too powerful, that every edge case asks attention to be added into core. There are so many things Org has been expanded to do that were outside of the original scope. That growth can't be sustained with volunteer time forever. Rather than a huge refactoring or pushing code back into other Emacs modes, my thought was that Org should be trimmed into the "core" of Org functions and that other things should be implemented as modules available in MELPA outside of the official Org core. That way the limited maintainer time can be focused on the core of Org and maintaining strong interfaces for components made and maintained by others. I understand that there may be some effort already underway to push items into external packages. Perhaps this is a better place to start than a huge refactoring effort? Also note that I feel like the constant deluge of additions prohibits refactoring and code improvement in the core. That's my outside perspective though. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: "text mode" org mode
Hi Emanuel, On Tue, 15 Sep 2020 at 14:27, Emanuel Berg via "General discussions about Org-mode." wrote: > Can I tell Org mode to don't change editing back and > forth, also don't collapse items in and out, i.e. > virtually text mode, only I still want the font lock > and to be able to use the mode to set keys, the > functions to compile into a PDF, and so forth. > > TIA That's probably not something most Org users would do, but I think you'd get close to what you want with: (add-hook 'org-mode-hook 'visible-mode) HTH. Best, Gustavo.
Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]
Frédéric Santos writes: Le 2020-09-15 à 11:15:48 CEST, Thomas Stenhaug a écrit : I recently had the same problem, on Arch Linux with Emacs 27.1. If you run xdg-open from an eshell, the problem should be the same. It should also go away if you replace "xdg-open" with "setsid xdg-open". I ended up doing (push '("\\.pdf\\'" . "evince %s") org-file-apps) to solve it for my case. Hi Thomas (and others), Thanks for your answer! This does work... in some way. In the sense that it manages to open evince to read the PDF outside of Emacs; but this does not restore (of course) the "normal" behavior of =C-c C-e l o= to display the PDF in a dedicated Emacs buffer. I'm also on Arch/Manjaro, this might play a role... But it's not a big deal anyway (and I've actually written a simple workaround in Elisp to display and revert the associated PDF in its side window). Ah, in that case (push '("\\.pdf\\''" . emacs)) might be what you're looking for. Best regards, Thomas
Re: "text mode" org mode
Russell Adams wrote: > I believe you can set your #+STARTUP on your file > to "showall". Can I prevent hyperlinks from folding back and forth? I mean, with [[][]] ? Hm, maybe this will just go on and on if there is no option to do it for real. The font-lock idea was perhaps not so bad...? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
> Can I tell Org mode to don't change editing back > and forth, also don't collapse items in and out, > i.e. virtually text mode, only I still want the > font lock and to be able to use the mode to set > keys, the functions to compile into a PDF, and > so forth. Here is part of an IRC conversation that perhaps clarifies what I mean... (the last sentence should not be seen as a threat BTW :)) incal: that "Outliner" feature (i.e. collpasing and replacing things) is more or less the core of org-mode. emacs being emacs I bet you can disable it. but it would be completely braindead. in the true sense of the word. you would lobotmoize emacs. well, one can easily think of outliner features for HTML, CSS, LaTeX, even source code for every programming language, and I never used it for anything else so I guess I have always been braindead :) I get what you mean, I don't use code folding like this anywhere else. it's just annoying with code. but org-mode is really about organzing information in a tree and collapsing parts of it and maybe moving things around. so if you don't need it, org-mode might be the wrong tool there. then again emacs can be adapt for everyone ofc what I was looking for was a way to typeset that had a less involved syntax than LaTeX, to be able to create simple PDFs, somewhere between plain text and LaTeX. I asked on gmane.emacs.orgmode , if they cannot solve it I'll just `require' org, apply the org-mode's font-lock to a text-mode buffer, and use `org-latex-export-to-pdf' -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
Russell Adams wrote: > I believe you can set your #+STARTUP on your file to "showall". That's a good, uhm, start! Thanks. > This will make the whole file open. I don't know if > you could disable tab folding a drawer > later though. Well, I can rebind that key... -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: "text mode" org mode
On Tue, Sep 15, 2020 at 02:27:17PM +0200, Emanuel Berg via General discussions about Org-mode. wrote: > Can I tell Org mode to don't change editing back and > forth, also don't collapse items in and out, i.e. > virtually text mode, only I still want the font lock > and to be able to use the mode to set keys, the > functions to compile into a PDF, and so forth. I believe you can set your #+STARTUP on your file to "showall". https://orgmode.org/manual/In_002dbuffer-Settings.html This will make the whole file open. I don't know if you could disable tab folding a drawer later though. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: Re Org 9.4 is out. Can you help? // breaking apart Org Mode
Hi there, I'm new to the development scene (contributed my first patch to Emacs last week or so) and a new developer in general who has been looking to get involved. I saw Bastien's post on Hacker News yesterday and thought that if Org Mode is looking for contributors it would be a good place for me, since I use Org Mode frequently. I have a rudimentary understanding of elisp, but I'm looking to improve by actually contributing. I'm just wondering about some of these ideas, mostly from an administrative point of view. I think they're fantastic ideas, such as moving code from Org Mode back up to Outline mode. I'm just looking to wrap my head around how this is supposed to work (I already understand submitting patches and can read the READMEs, so don't worry about that). If I am looking to do that though, would I be submitting a patch both to Emacs and one to Org Mode? At what point are Org Mode commits merged into Emacs? I guess my concern is that these changes could be breaking for users of Org Mode if they're not also using the most recent master of Emacs as well. Nick On Tue, Sep 15, 2020, at 06:05, William Rankin via General discussions about Org-mode. wrote: > Hello, > > At the request of Bastien I'm sending on these ideas regarding the > future of Org Mode development. I'm also copying emacs-devel since they > might be interested too. > > Org Mode and Emacs would benefit greatly from the codebase being broken > apart, not unlike how an antitrust suit breaks apart a big company for > the good of society! > > It is my view that many parts of Org code could be implemented as minor > modes or independent libraries. This would encourage cleaner, more > modular and more easy to understand code. It would provide an > exponential benefit for other elisp programs. And by splitting up the > codebase you allow contributors more a sense of ownership and emotional > investment in the things to which they provide their time/effort. > > A few suggestions... > > * outline > > Org Mode builds on top of outline, but those improvements are isolated > to Org, e.g. Org has wonderful outline cycling, but if someone wants > outline cycling in another major mode they need to implement this again > (likely just duplicating Org's existing code). Ideally all of this could > be ported back to outline itself. This would slim down the Org codebase > while benefiting all other outline-based major modes. > > * orgtbl-mode > > This is a good attempt at implementing some of Org's functionality as a > minor mode. Ideally orgtbl could be ported back to table and enough > flexibility added to make it compatible with Markdown Mode tables > (currently implemented with its own table stuff). > > * source blocks > > Org's source block functionality could be spun off into its own library. > In theory it could work just like outline (where a major mode defines > its own heading regexp). A major mode would define its own source block > delimiter regexpes. > > Ideally any major mode writing for a plain text markup format would > just: > (require 'source-blocks) > then have all the same functionality of Org source blocks. Any > improvements would then benefit everyone. > > * org-toggle-time-stamp-overlays / org-toggle-link-display > > This functionality, although small within Org, could be very nice as > their own minor modes. Displaying dates/times with custom format is easy > enough... URLs a bit harder. > > I went so far as to try this with varying degrees of success: > https://github.com/rnkn/prettify-date-time-mode > https://github.com/rnkn/prettify-url-mode > > * org-link > > I see a lot of interest for that Zettelkasten method, with many > different implementations. What's stopping Org's cross-linking being > implemented as its own global minor mode, independent of .org files? > > * electric-pair-mode > > Org currently uses org-emphasize for its emphasis pairs, but could it > just use electric-pair-mode? Would this prompt some improvements to > electric-pair-mode? This would benefit everyone. > > > I don't mean to suggest that the above ideas are things I'm particularly > hanging out for, I'm just trying to sketch an ideas of beneficial ways > Org could be broken apart. > > Finally, I'm pretty sure breaking apart Org will mean it will be much > easier to maintain -- it will be far easier to find one or two people > passionate about maintaining perhaps a source-blocks library than the > entirety of Org. If Org's development takes this more modular direction, > where libraries are designed to work independently of the rest of the > code, then it won't need an elite few people who understand the whole > codebase. > > I hope some of these ideas were either valuable or provide valuable > discussion. > > -- > William Rankin > https://bydasein.com > > ~ The single best thing you can do for the world is to delete your > social media accounts. > >
Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]
> Thomas Stenhaug writes: > I recently had the same problem, on Arch Linux with Emacs 27.1. If > you run xdg-open from an eshell, the problem should be the same. > It should also go away if you replace "xdg-open" with "setsid > xdg-open". > I ended up doing > (push '("\\.pdf\\'" . "evince %s") org-file-apps) > to solve it for my case. It would have been preferable to change > how the default app is being resolved from "xdg-open" to "setsid > xdg-open", but I haven't been able to. I firgot to add that I found it necessary to get rid of the default org-file-apps for pdf files, which I think is (was?) docview. So I use: #+begin_src elsp (add-hook 'org-mode-hook (lambda () (delete '("\\.pdf\\'" . default) org-file-apps) (add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s" #+end_src I don't like evince, sorry. Best wishes, Colin.
Re: official orgmode parser
On Tue, Sep 15, 2020 at 01:15:56PM +0200, Przemysław Kamiński wrote: [...] > There's the org-json (or ox-json) package but for some reason I > wasn't able to run it successfully. I guess export to S-exps would > be best here. But yes I'll check that out. If that's your route, perhaps the "Org element API" [1] might be helpful. Especially `org-element-parse-buffer' gives you a Lisp data structure which is supposed to be a parse of your Org buffer. From there to S-expression can be trivial (e.g. `print' or `pp'), depending on what you want to do. Walking the structure should be nice in Lisp, too. The topic of (non-Emacs) parsing of Org comes up regularly, and there is a good (but AFAIK not-quite-complete) Org syntax spec in Worg [2], but there are a couple of difficulties to be mastered before such a thing can become really enjoyable and useful. The loose specification of Org's format (arguably its second or third strongest asset, the first two being its incredible community and Emacs itself) is something which makes this problem "interesting". People have invented lots of usages which might be broken should Org change to a strict formal spec. You don't want to break those people. But yes, perhaps some day someone nails it. Perhaps it's you :) Cheers [1] https://orgmode.org/worg/dev/org-element-api.html [2] https://orgmode.org/worg/dev/org-syntax.html - t signature.asc Description: Digital signature
Re: All the best
edgar wrote: > I just want to send a small note to wish you the best > during these times of need. Let us remember that it is > community which allows us to keep going as a species. > Please, take care of yourselves and those who surround > you, and let us do our best to overcome the > circumstances with a smile :D Do a lot of Elisp, I heard its good for your spirit. You stay away from #emacs, you know with all the other people being there. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
"text mode" org mode
Can I tell Org mode to don't change editing back and forth, also don't collapse items in and out, i.e. virtually text mode, only I still want the font lock and to be able to use the mode to set keys, the functions to compile into a PDF, and so forth. TIA -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
Re: [PATCH] Bug: Fontification: Heading following a comment
Hello, Sebastien Miquel writes: > (rx bol (group (zero-or-more blank) "#" > (group (group (or (seq "+" (one-or-more (any > "a-zA-Z")) (optional ":")) > - space > + blank This looks wrong, but so does the current regexp. It should not be `space' nor `blank', but [ \t] per Org syntax. Regards, -- Nicolas Goaziou
Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]
Le 2020-09-15 à 11:15:48 CEST, Thomas Stenhaug a écrit : > I recently had the same problem, on Arch Linux with Emacs 27.1. If you > run xdg-open from an eshell, the problem should be the same. It should > also go away if you replace "xdg-open" with "setsid xdg-open". > > I ended up doing > > (push '("\\.pdf\\'" . "evince %s") org-file-apps) > > to solve it for my case. Hi Thomas (and others), Thanks for your answer! This does work... in some way. In the sense that it manages to open evince to read the PDF outside of Emacs; but this does not restore (of course) the "normal" behavior of =C-c C-e l o= to display the PDF in a dedicated Emacs buffer. I'm also on Arch/Manjaro, this might play a role... But it's not a big deal anyway (and I've actually written a simple workaround in Elisp to display and revert the associated PDF in its side window). Cheers, Frédéric
Re: official orgmode parser
On 9/15/20 11:55 AM, Russell Adams wrote: On Tue, Sep 15, 2020 at 11:17:57AM +0200, Przemysław Kamiński wrote: Org mode IS an elsip application. This is the main goal. The reason it works so well is because elisp is largely a DSL that focuses on text manipulation and is therefore ideally suited for a text based organiser. So, I keep clock times for work in org mode, this is very handy. However, my customers require that I use their service to provide the times. They do offer API. So basically I'm using elisp to parse org, make API calls, and at the same time generate CSV reports with a Python interop with org babel (because my elisp is just too bad to do that). Please consider this is a very specialized use case. If I had access to some org parser, I'd pick a language that would be more comfortable for me to get the job done. I guess it can all be done in elisp, however this is just a tool for me alone and I have limited time resources on hacking things for myself :) Maintainer time is limited too. Maintaining a parser library outside of Emacs would be difficult for the reasons already given. I'd encourage you to pick up some more Elisp, which I am also trying to do. Anyways, my parser needs aren't that sophisticated: just parse the file, return headings with clock drawers. I tried the common lisp library but got frustrated after fiddling with it for couple of hours. If it's that small you could always do that in Python with regexps for your usage if you're more comfortable in Python. Org's plain text format means you can read it with anything. I suspect grep might even pull headlines and clocks successfully. I haven't looked at the elisp parser much, but I do wonder if someone couldn't write an exporter that exports a programmatic version of your org file data (ie: to xml). Then other tools could ingest those xml files. That'd certainly be a contrib module and not in the core, but might be worth your while to explore the idea if you really want to work with Org data outside of Emacs. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 There's the org-json (or ox-json) package but for some reason I wasn't able to run it successfully. I guess export to S-exps would be best here. But yes I'll check that out. Przemek
Re: Emacs version for Org 9.4?
On 2020-09-15, Jeremie Juste wrote: > Hello Jens, > > I'm afraid I cannot test your issue. I don't have the ability to switch > emacs version yet. > > What I can tell you is that org-9.4 is working fine on GNU Emacs 27.1, > and on Emacs 28.0.50. Hello Jeremie, thanks for your reply. Yes, I’m aware that newer versions of Emacs work. I’m interested in the officially supported “lowest” version of Emacs. (When trying Org mode 9.4, I got a test failure with org-re-reveal, for which I still promise compatibility with Emacs 24: https://gitlab.com/oer/org-re-reveal/-/pipelines/190002022) Best wishes Jens
Re Org 9.4 is out. Can you help? // breaking apart Org Mode
Hello, At the request of Bastien I'm sending on these ideas regarding the future of Org Mode development. I'm also copying emacs-devel since they might be interested too. Org Mode and Emacs would benefit greatly from the codebase being broken apart, not unlike how an antitrust suit breaks apart a big company for the good of society! It is my view that many parts of Org code could be implemented as minor modes or independent libraries. This would encourage cleaner, more modular and more easy to understand code. It would provide an exponential benefit for other elisp programs. And by splitting up the codebase you allow contributors more a sense of ownership and emotional investment in the things to which they provide their time/effort. A few suggestions... * outline Org Mode builds on top of outline, but those improvements are isolated to Org, e.g. Org has wonderful outline cycling, but if someone wants outline cycling in another major mode they need to implement this again (likely just duplicating Org's existing code). Ideally all of this could be ported back to outline itself. This would slim down the Org codebase while benefiting all other outline-based major modes. * orgtbl-mode This is a good attempt at implementing some of Org's functionality as a minor mode. Ideally orgtbl could be ported back to table and enough flexibility added to make it compatible with Markdown Mode tables (currently implemented with its own table stuff). * source blocks Org's source block functionality could be spun off into its own library. In theory it could work just like outline (where a major mode defines its own heading regexp). A major mode would define its own source block delimiter regexpes. Ideally any major mode writing for a plain text markup format would just: (require 'source-blocks) then have all the same functionality of Org source blocks. Any improvements would then benefit everyone. * org-toggle-time-stamp-overlays / org-toggle-link-display This functionality, although small within Org, could be very nice as their own minor modes. Displaying dates/times with custom format is easy enough... URLs a bit harder. I went so far as to try this with varying degrees of success: https://github.com/rnkn/prettify-date-time-mode https://github.com/rnkn/prettify-url-mode * org-link I see a lot of interest for that Zettelkasten method, with many different implementations. What's stopping Org's cross-linking being implemented as its own global minor mode, independent of .org files? * electric-pair-mode Org currently uses org-emphasize for its emphasis pairs, but could it just use electric-pair-mode? Would this prompt some improvements to electric-pair-mode? This would benefit everyone. I don't mean to suggest that the above ideas are things I'm particularly hanging out for, I'm just trying to sketch an ideas of beneficial ways Org could be broken apart. Finally, I'm pretty sure breaking apart Org will mean it will be much easier to maintain -- it will be far easier to find one or two people passionate about maintaining perhaps a source-blocks library than the entirety of Org. If Org's development takes this more modular direction, where libraries are designed to work independently of the rest of the code, then it won't need an elite few people who understand the whole codebase. I hope some of these ideas were either valuable or provide valuable discussion. -- William Rankin https://bydasein.com ~ The single best thing you can do for the world is to delete your social media accounts.
Re: [PATCH] Bug: Fontification: Heading following a comment
Hi, The simple patch attached should fix this bug. >From 27dd7e7cbde6650932342d302000914d72179327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Tue, 15 Sep 2020 08:08:14 +0200 Subject: [PATCH] org.el (org-fontify-meta-lines-and-blocks-1): Fix meta lines regexp * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Fix meta lines regexp TINYCHANGE --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 020cfc873..038b4a7e0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5221,7 +5221,7 @@ by a #." (when (re-search-forward (rx bol (group (zero-or-more blank) "#" (group (group (or (seq "+" (one-or-more (any "a-zA-Z")) (optional ":")) - space + blank eol)) (optional (group "_" (group (one-or-more (any "a-zA-Z")) (zero-or-more blank) -- 2.28.0
Re: official orgmode parser
On Tue, Sep 15, 2020 at 11:17:57AM +0200, Przemysław Kamiński wrote: > > Org mode IS an elsip application. This is the main goal. The reason it > > works so well is because elisp is largely a DSL that focuses on text > > manipulation and is therefore ideally suited for a text based organiser. > > So, I keep clock times for work in org mode, this is very handy. > However, my customers require that I use their service to provide the > times. They do offer API. So basically I'm using elisp to parse org, > make API calls, and at the same time generate CSV reports with a Python > interop with org babel (because my elisp is just too bad to do > that). Please consider this is a very specialized use case. > If I had access to some org parser, I'd pick a language that would > be more comfortable for me to get the job done. I guess it can all > be done in elisp, however this is just a tool for me alone and I > have limited time resources on hacking things for myself :) Maintainer time is limited too. Maintaining a parser library outside of Emacs would be difficult for the reasons already given. I'd encourage you to pick up some more Elisp, which I am also trying to do. > Anyways, my parser needs aren't that sophisticated: just parse the file, > return headings with clock drawers. I tried the common lisp library but > got frustrated after fiddling with it for couple of hours. If it's that small you could always do that in Python with regexps for your usage if you're more comfortable in Python. Org's plain text format means you can read it with anything. I suspect grep might even pull headlines and clocks successfully. I haven't looked at the elisp parser much, but I do wonder if someone couldn't write an exporter that exports a programmatic version of your org file data (ie: to xml). Then other tools could ingest those xml files. That'd certainly be a contrib module and not in the core, but might be worth your while to explore the idea if you really want to work with Org data outside of Emacs. -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: Emacs version for Org 9.4?
Hello Jens, I'm afraid I cannot test your issue. I don't have the ability to switch emacs version yet. What I can tell you is that org-9.4 is working fine on GNU Emacs 27.1, and on Emacs 28.0.50. Does anyone have problem on the official Debian 10 repo emacs 1:26.1+1-3.2+deb10u1? Hope this helps, Jeremie - Org mode version 9.4 (release_9.4-9-g41a3c3 @ /home/djj/src/org-mode/lisp/) - GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-09-01 Jens Lechtenboerger writes: > Hi there, > > if I open an Org file on > “GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of > 2017-09-12 on hullmann, modified by Debian” > I get this error (which I don’t know how to debug): > > Eager macro-expansion failure: (wrong-type-argument listp :pcase--succeed) > > Recipe: > touch empty.org > curl -L https://orgmode.org/elpa/org-plus-contrib-20200914.tar > org.tar > mkdir org && tar xf org.tar -C org --strip-components 1 > rm -f org.tar > emacs -Q -L org > C-x C-f empty.org > > In ORG-NEWS, I only found that “Emacs 24.4 or above is suggested.” > Did that change? > > Best wishes > Jens
Re: official orgmode parser
On 9/15/20 11:03 AM, Tim Cross wrote: Przemysław Kamiński writes: Hello, I oftentimes find myself needing to parse org files with some external tools (to generate reports for customers or sum up clock times for given month, etc). Looking through the list https://orgmode.org/worg/org-tools/ and having tested some of these, I must say they are lacking. The Haskell ones seem to be done best, but then the compile overhead of Haskell and difficulty in embedding this into other languages is a drawback. I think it might benefit the community when such an official parser would exist (and maybe could be hooked into org mode directly). I was thinking picking some scheme like chicken or guile, which could be later easily embedded into C or whatever. Then use that parser in org mode itself. This way some important part of org mode would be outside of the small world of elisp. This is just an idea, what do you think? :) The problem with this idea is maintenance. It is also partly why external tools are not terribly reliable/good. Org mode is constantly being enhanced and improved. It is very hard for external tools to keep pace with org-mode development, so they soon get out of date or stop working correctly. Org mode IS an elsip application. This is the main goal. The reason it works so well is because elisp is largely a DSL that focuses on text manipulation and is therefore ideally suited for a text based organiser. This means if you want to implement parsing of org files in any other language, there is a lot of fundamental functionality which willl need to be implemented that is not necessary when using elisp as it is already built-in. Not only that, it is also 'battle hardened' and well tested. The other problem would be in selecting another language which behaves consistently across all the platforms Emacs and org-mode is supported on. As org-mode is a stnadard part of Emacs, it also needs to be implemented in something which is also available on all the platforms emacs is on without needing the user to install additional software. The other issue is that you would need another skill in order to maintain/extend org-mode. In addition to elisp, you will also need to know whatever the parser implementation language is. A third negative is that if the parser was in a different language to elisp, the interface between the rest of org mode (in elisp) and the parser would become an issue. At the moment, there are far fewer barriers as it is all elisp. However, if part of the system is in another language, you are now restricted to whatever defined interface exists. This would likely also have performance issues and overheads associated with translating from one format to another etc. So, in short, the chances of org mode using a parser written in something other than elisp is pretty close to 0. This leaves you with 2 options - 1. Implement another external tool which can parse org-files. As metnioned above, this is a non-trivial task and will likely be difficult to maintain. Probably not the best first choice. 2. Provide some details about your workflow where you believe you need to use external tools to process the org-files. It is very likely there are alternative approaches to give you the result you want, but without the need to do external parsing of org-files. There isn't sufficient details in the examples you mention to provide any specific details. However, I have used org-mode for reporting, invoicing, time tracking, documentation, issue/request tracking, project planning and project management and never needed to parse my org files with an external tool. I have exported the data in different formats which have then been processed by other tools and I have tweaked my setup to support various enterprise/corporate standards or requirements (logos, corporate colours, report formats, etc). Sometimes these tweaks are trivial and others require more extensive effort. Often, others have had to do something the same or similar and have working examples etc. So my recommendation is post some messages to this list with details on what you need to try and do and see what others can suggest. I would keep each post to a single item rather than one long post with multiple requests. From watching this list, I've often see someone post a "How can I ..." question only to get the answer "Oh, that is already built-in, just do .". Org is a large application with lots of sophisticated power that isn't always obvious from just reading the manual. So, I keep clock times for work in org mode, this is very handy. However, my customers require that I use their service to provide the times. They do offer API. So basically I'm using elisp to parse org, make API calls, and at the same time generate CSV reports with a Python interop with org babel (because my elisp is just too bad to do that). If I had access to some org parser, I'd pick a language that would be more comfortable for me to get the job
Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]
Kyle Meyer writes: > Colin Baxter writes: > >>> Frederic Santos writes: >> >> > Hi everyone, After upgrading to Emacs 27, I noticed that, for any >> > org document, =C-c C-e l o= now behaves on my computer as =C-c C-e >> > l p=; i.e., the pdf is correctly produced, but is not displayed >> > anymore on side window. >> >> > Several users (using various operating systems) confirmed the bug >> > on StackExchange: >> > >> https://emacs.stackexchange.com/questions/60379/c-c-c-e-l-o-does-not-open-the-pdf-anymore >> >> > Is there any simple workaround to solve that? >> >> Does not happen to me. I'm on emacs-27.1 and org-mode from git (version >> 9.3.8 (release_9.3.8-777-g9c31cb). Perhaps try updating your org-mode. > > Thanks for checking. And I can't trigger the issue with Emacs 27 and > the commit reported in the subject (ba2405) on a GNU/Linux system. > > This goes through org-open-file, so it depends on the OS and system > configuration. Frederic, I'd recommend trying to tweak org-file-apps to > see if you can land on something that displays the PDF again. > > And I think Nick's suggestion/question in the SE comment thread is a > good one: > > It's probably not an emacs issue at all: what happens when you run > usr/bin/xdg-open /home/fs/Documents/essai.pdf from the command line? I recently had the same problem, on Arch Linux with Emacs 27.1. If you run xdg-open from an eshell, the problem should be the same. It should also go away if you replace "xdg-open" with "setsid xdg-open". I ended up doing (push '("\\.pdf\\'" . "evince %s") org-file-apps) to solve it for my case. It would have been preferable to change how the default app is being resolved from "xdg-open" to "setsid xdg-open", but I haven't been able to. Thomas
Re: Getting Org-Crypt to work (doc bug?)
> On Mon, 14 Sep 2020 15:17:02 +0100, Colin Baxter said: >writes: >> On Mon, Sep 14, 2020 at 12:18:50PM +0100, Colin Baxter wrote: >>> [...] I set the variable `epa-pinentry-mode' to loopback as in >>> >>> #+begin_src elisp (setq epa-pinentry-mode 'loopback) #+end_src >>> >>> This seems to work. >> Oh, thanks -- this answers the question I only half-posed :) >> BTW: the variable documentation says to use `epg-pinentry-mode' >> for Emacs versions >= 27.1 Colin> I remember I had this epa/epg issue a while ago, I think with Colin> emacs-26.3. Putting the variable as `epa-pinentry-mode' worked for me, but Colin> `epg-pinentry-mode' didn't. I've not looked at it since. It still works Colin> for me with emacs-27.1 and I thought it best to leave it alone. :-) epa-pinentry-mode is a variable defined in `epg-config.el'. Its value is nil This variable is an alias for `epg-pinentry-mode'. This variable is obsolete since 27.1; use `epg-pinentry-mode' instead. That means you should be good for at least another two emacs releases or so (5 years, 8? who knows). Robert
Re: official orgmode parser
Przemysław Kamiński writes: > Hello, > > I oftentimes find myself needing to parse org files with some external > tools (to generate reports for customers or sum up clock times for given > month, etc). Looking through the list > > https://orgmode.org/worg/org-tools/ > > and having tested some of these, I must say they are lacking. The > Haskell ones seem to be done best, but then the compile overhead of > Haskell and difficulty in embedding this into other languages is a drawback. > > I think it might benefit the community when such an official parser > would exist (and maybe could be hooked into org mode directly). > > I was thinking picking some scheme like chicken or guile, which could be > later easily embedded into C or whatever. Then use that parser in org > mode itself. This way some important part of org mode would be outside > of the small world of elisp. > > This is just an idea, what do you think? :) > The problem with this idea is maintenance. It is also partly why external tools are not terribly reliable/good. Org mode is constantly being enhanced and improved. It is very hard for external tools to keep pace with org-mode development, so they soon get out of date or stop working correctly. Org mode IS an elsip application. This is the main goal. The reason it works so well is because elisp is largely a DSL that focuses on text manipulation and is therefore ideally suited for a text based organiser. This means if you want to implement parsing of org files in any other language, there is a lot of fundamental functionality which willl need to be implemented that is not necessary when using elisp as it is already built-in. Not only that, it is also 'battle hardened' and well tested. The other problem would be in selecting another language which behaves consistently across all the platforms Emacs and org-mode is supported on. As org-mode is a stnadard part of Emacs, it also needs to be implemented in something which is also available on all the platforms emacs is on without needing the user to install additional software. The other issue is that you would need another skill in order to maintain/extend org-mode. In addition to elisp, you will also need to know whatever the parser implementation language is. A third negative is that if the parser was in a different language to elisp, the interface between the rest of org mode (in elisp) and the parser would become an issue. At the moment, there are far fewer barriers as it is all elisp. However, if part of the system is in another language, you are now restricted to whatever defined interface exists. This would likely also have performance issues and overheads associated with translating from one format to another etc. So, in short, the chances of org mode using a parser written in something other than elisp is pretty close to 0. This leaves you with 2 options - 1. Implement another external tool which can parse org-files. As metnioned above, this is a non-trivial task and will likely be difficult to maintain. Probably not the best first choice. 2. Provide some details about your workflow where you believe you need to use external tools to process the org-files. It is very likely there are alternative approaches to give you the result you want, but without the need to do external parsing of org-files. There isn't sufficient details in the examples you mention to provide any specific details. However, I have used org-mode for reporting, invoicing, time tracking, documentation, issue/request tracking, project planning and project management and never needed to parse my org files with an external tool. I have exported the data in different formats which have then been processed by other tools and I have tweaked my setup to support various enterprise/corporate standards or requirements (logos, corporate colours, report formats, etc). Sometimes these tweaks are trivial and others require more extensive effort. Often, others have had to do something the same or similar and have working examples etc. So my recommendation is post some messages to this list with details on what you need to try and do and see what others can suggest. I would keep each post to a single item rather than one long post with multiple requests. From watching this list, I've often see someone post a "How can I ..." question only to get the answer "Oh, that is already built-in, just do .". Org is a large application with lots of sophisticated power that isn't always obvious from just reading the manual.
[PATCHES 1, 2, 3/3] Minor customisation features for ox-icalendar and agenda
Hello forum, I'd like to introduce three new features and request to merge the with current master: 1. Show document title instead of file name in org-agenda; This should be useful for any users of org-roam package or anyone who autogenerate file names and uses document titles instead for navigation. 2. Customise summary lines of exported events in ox-icalendar I personally export deadlines and scheduled items to the separate files so I don't need these cookies and they consume precious space of summary line. So I prefer them be disabled. This should be possible to do now with only customisation setting. 3. Force creation of an alarm when exporting event in ox-icalendar Sometimes I prefer to create icalendar alarms exactly at the event start, but it's not possible since alarm set to zero means that alarm will be disabled. Forcing alarm creation will now create alarm no matter the setting. I've updated news files and attempted to replicate the style of submissions, but I admit that I didn't read much beyond CONTRIBUTE file. Please point me to the right direction in case of any issues I can fix. Kind regards, Mikhail Skorzhinskii >From 111e6886564abbf3becb2a94e66f235f502b79d9 Mon Sep 17 00:00:00 2001 From: Mikhail Skorzhinskii Date: Sat, 12 Sep 2020 18:52:39 +0200 Subject: [PATCH 3/3] ox-icalendar.el: introduce setting to force alarms This is a new setting for icalendar exports to allow users set alarms exactly at the event start. With this setting set to non-nil and alarm set to zero (by global setting or APPT_WARNTIME property) it will create an alarm at the event start. Note, that zero alarm set as APPT_WARNTIME property will override default warning time. --- etc/ORG-NEWS | 10 ++ lisp/ox-icalendar.el | 24 +--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b912e807d..eb950d934 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -23,6 +23,16 @@ path. Through these new options for icalendar export, one can customise the looks of summary lines in exported events. +*** New option ~org-icalendar-force-alarm~ + +This is a new setting for icalendar exports to allow users set alarms +exactly at the event start. With this setting set to non-nil and alarm +set to zero (by global setting or APPT_WARNTIME property) it will +create an alarm at the event start. + +Note, that zero alarm set as =APPT_WARNTIME= property will override +default warning time. + * Version 9.4 ** Incompatible changes *** Possibly broken internal file links: please check and fix diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index f110a4b2b..baed925e8 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -64,6 +64,15 @@ for timed events. If non-zero, alarms are created. :version "24.1" :type 'integer) +(defcustom org-icalendar-force-alarm nil + "Non-nil means alarm will be created even if is set to zero. + +This overrides default behaviour where zero means no alarm. With +this set to non-nil and alarm set to zero, alarm will be created +and will fire at the event start." + :group 'org-export-icalendar + :type 'bool) + (defcustom org-icalendar-combined-name "OrgMode" "Calendar name for the combined iCalendar representing all agenda files." :group 'org-export-icalendar @@ -797,8 +806,11 @@ Return VALARM component as a string, or nil if it isn't allowed." (let ((alarm-time (let ((warntime (org-element-property :APPT_WARNTIME entry))) - (if warntime (string-to-number warntime) 0 -(and (or (> alarm-time 0) (> org-icalendar-alarm-time 0)) + (if warntime (string-to-number warntime) nil +(and (or (and alarm-time + (> alarm-time 0)) + (> org-icalendar-alarm-time 0) + org-icalendar-force-alarm) (org-element-property :hour-start timestamp) (format "BEGIN:VALARM ACTION:DISPLAY @@ -806,7 +818,13 @@ DESCRIPTION:%s TRIGGER:-P0DT0H%dM0S END:VALARM\n" summary - (if (zerop alarm-time) org-icalendar-alarm-time alarm-time) + (if org-icalendar-force-alarm + (if alarm-time + alarm-time + org-icalendar-alarm-time) + (if (zerop alarm-time) + org-icalendar-alarm-time + alarm-time)) Template -- 2.28.0 >From 1c30be14e2e7a6774d499388ec207b1950963746 Mon Sep 17 00:00:00 2001 From: Mikhail Skorzhinskii Date: Sat, 12 Sep 2020 18:27:23 +0200 Subject: [PATCH 2/3] ox-icalendar.el: allow to customise deadline and scheduled items summary In some of export schemes these cookies at the start of each event can be a distraction rather then storage of useful information. --- etc/ORG-NEWS | 5 + lisp/ox-icalendar.el | 10 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 32f64d84e..b912e807d 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -18,6 +18,11 @@ When set to 'title, will show document title in outline path in echo area instead of file
Re: official orgmode parser
Hi, I'm currently toying with the idea of trying a tree-sitter parser for Org. The very static nature of a shared object parser (knowing TODO keywords are pretty dynamic for example) is a challenge I'm not sure to overcome ; to be honest even without that I can't say I'll manage to do it. Having a tree-sitter parser would be really great in my opinion, at least it's a clearer way to "freeze" the syntax with some tests describing the syntax tree with S-expressions. And tree-sitter seems to be the popular sought after solution to slowness in parsing (and incremental parsing of org files would help with big files in my opinion) On Tue, Sep 15, 2020, at 09:58, Przemysław Kamiński wrote: > Hello, > > I oftentimes find myself needing to parse org files with some external > tools (to generate reports for customers or sum up clock times for given > month, etc). Looking through the list > > https://orgmode.org/worg/org-tools/ > > and having tested some of these, I must say they are lacking. The > Haskell ones seem to be done best, but then the compile overhead of > Haskell and difficulty in embedding this into other languages is a drawback. > > I think it might benefit the community when such an official parser > would exist (and maybe could be hooked into org mode directly). > > I was thinking picking some scheme like chicken or guile, which could be > later easily embedded into C or whatever. Then use that parser in org > mode itself. This way some important part of org mode would be outside > of the small world of elisp. > > This is just an idea, what do you think? :) > > Best, > Przemek > > Gerry Agbobada
Emacs version for Org 9.4?
Hi there, if I open an Org file on “GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-12 on hullmann, modified by Debian” I get this error (which I don’t know how to debug): Eager macro-expansion failure: (wrong-type-argument listp :pcase--succeed) Recipe: touch empty.org curl -L https://orgmode.org/elpa/org-plus-contrib-20200914.tar > org.tar mkdir org && tar xf org.tar -C org --strip-components 1 rm -f org.tar emacs -Q -L org C-x C-f empty.org In ORG-NEWS, I only found that “Emacs 24.4 or above is suggested.” Did that change? Best wishes Jens
official orgmode parser
Hello, I oftentimes find myself needing to parse org files with some external tools (to generate reports for customers or sum up clock times for given month, etc). Looking through the list https://orgmode.org/worg/org-tools/ and having tested some of these, I must say they are lacking. The Haskell ones seem to be done best, but then the compile overhead of Haskell and difficulty in embedding this into other languages is a drawback. I think it might benefit the community when such an official parser would exist (and maybe could be hooked into org mode directly). I was thinking picking some scheme like chicken or guile, which could be later easily embedded into C or whatever. Then use that parser in org mode itself. This way some important part of org mode would be outside of the small world of elisp. This is just an idea, what do you think? :) Best, Przemek