Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2020-09-17 Thread Shibu N.V
emacs invoked with "runemacs -Q " and also "emacs -Q" commands. So no
configuration files are loaded. Rendering issue is not specific to any
particular org file. It is general to all org files. The following message
is shown in the message buffer
(Shell command succeeded with no output)
I am attaching a simple org file. The rendering issue is seen in this file
too. In this particular case, the hyperlinks are not rendered. Font-lock /
faces also failed to render.

N.V.Shibu
Assistant Professor
Sri Ramakrishna Institute of Technology
Coimbatore-10.


On Fri, Sep 18, 2020 at 9:27 AM Ihor Radchenko  wrote:

> > Emacs is invoked using runemacs.exe -Q. The org file is loaded in buffer
> > using C-x C-f. But the org file is not rendered in the buffer.
>
> Could you provide the problematic file? Or better the part of file
> causing the issue?
>
> Best,
> Ihor
>
> "Shibu N.V"  writes:
>
> > 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.
> > 
> >
> > Emacs is invoked using runemacs.exe -Q. The org file is loaded in buffer
> > using C-x C-f. But the org file is not rendered in the buffer. The
> > message buffer shows the message "(Shell command succeeded with no
> > output)" and buffer shows Org-mode enabled. To render the file, either
> > the file needs to be reloaded in buffer or M-x org-mode has to be issued
> > .Also tried with latest stable release of org 9.4 Working perfectly in
> > Emacs 26.3 windows binaries
> >
> > Emacs  : GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
> >  of 2020-08-21
> > Package: Org mode version 9.3 (release_9.3 @
> > c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)
> >
> > current state:
> > ==
> > (setq
> >  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> >  org-src-mode-configure-edit-buffer)
> >  org-link-shell-confirm-function 'yes-or-no-p
> >  org-metadown-hook '(org-babel-pop-to-session-maybe)
> >  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> >  org-mode-hook '(#[0 "\300\301\302\303\304$\207"
> >[add-hook change-major-mode-hook org-show-all append local]
> >5]
> > #[0 "\300\301\302\303\304$\207"
> >[add-hook change-major-mode-hook org-babel-show-result-all
> > append local]
> >5]
> > org-babel-result-hide-spec org-babel-hide-all-hashes)
> >  org-archive-hook '(org-attach-archive-delete-maybe)
> >  org-confirm-elisp-link-function 'yes-or-no-p
> >  org-agenda-before-write-hook '(org-agenda-add-entry-text)
> >  org-metaup-hook '(org-babel-load-in-session-maybe)
> >  org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
> > "\n\n(fn ENTRY)"]
> >  org-babel-pre-tangle-hook '(save-buffer)
> >  org-tab-first-hook '(org-babel-hide-result-toggle-maybe
> >   org-babel-header-arg-expand)
> >  org-occur-hook '(org-first-headline-recenter)
> >  org-cycle-hook '(org-cycle-hide-archived-subtrees
> > org-cycle-show-empty-lines
> >   org-optimize-window-after-visibility-change)
> >  org-speed-command-hook '(org-speed-command-activate
> >   org-babel-speed-command-activate)
> >  org-confirm-shell-link-function 'yes-or-no-p
> >  org-link-parameters '(("attachment" :follow org-attach-open-link :export
> > org-attach-export-link :complete
> > org-attach-complete-link)
> >("id" :follow org-id-open)
> >("eww" :follow eww :store org-eww-store-link)
> >("rmail" :follow org-rmail-open :store
> > org-rmail-store-link)
> >("mhe" :follow org-mhe-open :store org-mhe-store-link)
> >("irc" :follow org-irc-visit :store org-irc-store-link
> > :export org-irc-export)
> >("info" :follow org-info-open :export org-info-export
> > :store org-info-store-link)
> >("gnus" :follow org-gnus-open :store org-gnus-store-link)
> >("docview" :follow org-docview-open :export
> > org-docview-export :store org-docview-store-link)
> >("bibtex" :follow org-bibtex-open :store
> > org-bibtex-store-link)
> >("bbdb" :follow org-bbdb-open :export org-bbdb-export
> > :complete org-bbdb-complete-link :store
> > org-bbdb-store-link)
> >("w3m" :store org-w3m-store-link) ("file+sys")
> >("file+emacs") ("shell" :follow org-link--open-shell)
> >("news" :follow
> > #[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5
> >   "\n\n(fn URL)"]
> > )
> >("mailto" :follow
> > #[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"]
> >   5 "\n\n(fn URL)"]
> > )
> >("https" :follow
> > #[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5
> >   "\n\n(fn URL)"]
> > )
> >("http" :follow
> > #[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5
> >   "\n\n(fn URL)"]
> > )
> >("ftp" :follow
> > #[257 "\301\300\302 Q!\207" ["ftp" 

Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2020-09-17 Thread Ihor Radchenko
> Emacs is invoked using runemacs.exe -Q. The org file is loaded in buffer
> using C-x C-f. But the org file is not rendered in the buffer.

Could you provide the problematic file? Or better the part of file
causing the issue?

Best,
Ihor

"Shibu N.V"  writes:

> 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.
> 
>
> Emacs is invoked using runemacs.exe -Q. The org file is loaded in buffer
> using C-x C-f. But the org file is not rendered in the buffer. The
> message buffer shows the message "(Shell command succeeded with no
> output)" and buffer shows Org-mode enabled. To render the file, either
> the file needs to be reloaded in buffer or M-x org-mode has to be issued
> .Also tried with latest stable release of org 9.4 Working perfectly in
> Emacs 26.3 windows binaries
>
> Emacs  : GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
>  of 2020-08-21
> Package: Org mode version 9.3 (release_9.3 @
> c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)
>
> current state:
> ==
> (setq
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
>  org-src-mode-configure-edit-buffer)
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-mode-hook '(#[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-all append local]
>5]
> #[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-babel-show-result-all
> append local]
>5]
> org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-archive-hook '(org-attach-archive-delete-maybe)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
> "\n\n(fn ENTRY)"]
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>   org-babel-header-arg-expand)
>  org-occur-hook '(org-first-headline-recenter)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees
> org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
>  org-speed-command-hook '(org-speed-command-activate
>   org-babel-speed-command-activate)
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-link-parameters '(("attachment" :follow org-attach-open-link :export
> org-attach-export-link :complete
> org-attach-complete-link)
>("id" :follow org-id-open)
>("eww" :follow eww :store org-eww-store-link)
>("rmail" :follow org-rmail-open :store
> org-rmail-store-link)
>("mhe" :follow org-mhe-open :store org-mhe-store-link)
>("irc" :follow org-irc-visit :store org-irc-store-link
> :export org-irc-export)
>("info" :follow org-info-open :export org-info-export
> :store org-info-store-link)
>("gnus" :follow org-gnus-open :store org-gnus-store-link)
>("docview" :follow org-docview-open :export
> org-docview-export :store org-docview-store-link)
>("bibtex" :follow org-bibtex-open :store
> org-bibtex-store-link)
>("bbdb" :follow org-bbdb-open :export org-bbdb-export
> :complete org-bbdb-complete-link :store
> org-bbdb-store-link)
>("w3m" :store org-w3m-store-link) ("file+sys")
>("file+emacs") ("shell" :follow org-link--open-shell)
>("news" :follow
> #[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5
>   "\n\n(fn URL)"]
> )
>("mailto" :follow
> #[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"]
>   5 "\n\n(fn URL)"]
> )
>("https" :follow
> #[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5
>   "\n\n(fn URL)"]
> )
>("http" :follow
> #[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5
>   "\n\n(fn URL)"]
> )
>("ftp" :follow
> #[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5
>   "\n\n(fn URL)"]
> )
>("help" :follow org-link--open-help)
>("file" :complete org-link-complete-file)
>("elisp" :follow org-link--open-elisp)
>("doi" :follow org-link--open-doi))
>  org-link-elisp-confirm-function 'yes-or-no-p
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> N.V.Shibu
> Assistant Professor Senior Grade
> Sri Ramakrishna Institute of Technology
> Coimbatore-10.



PATCH: (org-remove-occur-highlights) Implements option to remove highlights between points

2020-09-17 Thread Nicholas Savage
I posted earlier about why org-remove-occur-highlights ignored it's options of 
beg and end. I'm fairly sure it was so they could be implemented later. I 
wanted to use this functionality, so I've implemented it. This should not 
change any current behaviour. If beg and end are nil, it will run the same way 
as before. This is called as part of org-sparse-tree, and my changes do not 
affect that. When beg and end are non-nil, it checks which overlays are between 
those two points and deletes them. I've ensured that 'make test' still passes 
and believe I've formatted my changelog entry as required.

If I'm missing something about how this should be working, please let me know.

My copyright paperwork with FSF is currently in progress, but I wanted to put 
this out there to get comments as necessary.

Thanks,
NickFrom 3213a8d50af0a99be43bf1f91c5621a6474548dd Mon Sep 17 00:00:00 2001
From: nick 
Date: Thu, 17 Sep 2020 21:49:43 -0400
Subject: [PATCH] org.el: Implements option to remove highlights between points

* lisp/org.el (org-remove-occur-highlights): Implements BEG and END in
order to allow the option of removing highlights between a range of
points and adjust the shown context.

org-remove-occur-highlights has long had two options, BEG and END,
that were ignored. This change checks first 1) are BEG and END are
nil (as would be expected with the vast majority of current
behaviour)? If yes, there is no change in behaviour. Otherwise, it
removes only the highlights between BEG and END and updates
org-occur-highlights to contain the remaining highlights.
---
 lisp/org.el | 41 -
 1 file changed, 32 insertions(+), 9 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 053635c85..f509b8049 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11106,18 +11106,41 @@ match is found."
 (overlay-put ov 'org-type 'org-occur)
 (push ov org-occur-highlights)))
 
-(defun org-remove-occur-highlights ( _beg _end noremove)
+(defun org-remove-occur-highlights ( beg end noremove)
   "Remove the occur highlights from the buffer.
-BEG and END are ignored.  If NOREMOVE is nil, remove this function
-from the `before-change-functions' in the current buffer."
+When BEG and END are set, removes the overlay and hides the items
+between those two points. It does this by going through each overlay
+and comparing whther or not they are within the two points. If BEG and
+END are not set, erases all overlays and sets related variables to
+nil. If NOREMOVE is nil, remove this function from the
+`before-change-functions' in the current buffer."
   (interactive)
   (unless org-inhibit-highlight-removal
-(mapc #'delete-overlay org-occur-highlights)
-(setq org-occur-highlights nil)
-(setq org-occur-parameters nil)
-(unless noremove
-  (remove-hook 'before-change-functions
-		   'org-remove-occur-highlights 'local
+; if only one of BEG and END are set, set both to nil
+(when (or (and beg (not end)) (and (not beg) end))
+  (setq beg nil end nil))
+(cond
+ ((and (not beg) (not end))
+  (mapc #'delete-overlay org-occur-highlights)
+  (setq org-occur-highlights nil)
+  (setq org-occur-parameters nil)
+  (unless noremove
+	(remove-hook 'before-change-functions
+		 'org-remove-occur-highlights 'local)))
+ ((> end beg)
+  (org-overview)
+  (setq temp-overlays '())
+  (dolist (overlay org-occur-highlights)
+	(let ((overlay-point (overlay-start overlay)))
+
+	  (if (and (> overlay-point beg) (< overlay-point end))
+	  (delete-overlay overlay)
+	(progn
+	  (save-excursion
+		(goto-char overlay-point)
+		(org-show-set-visibility 'ancestors)
+		(add-to-list 'temp-overlays overlay))
+  (setq org-occur-highlights temp-overlays)
 
  Priorities
 
-- 
2.20.1



org-remove-occur-highlight ignores BEG and END

2020-09-17 Thread Nicholas Savage
I've been exploring a bit of the code base for Org Mode and I stumbled upon 
something I wanted to ask the wider community about. I've googled already and 
didn't find anything. `org-remove-occur-highlight' in org.el takes two optional 
parameters (alongside a third) BEG and END, but the documentary states that 
they are ignored. I can see in the code as well that they have no purpose. What 
is the reasoning for this? The only thing I can think of that could explain it 
is if the optional parameters are there as placeholders so in the future if 
they are implemented code that uses `org-remove-occur-highlight' doesn't break 
since it is assuming the parameters are nil.

Am I on the right track here?

If so, I'm going to take a crack at implementing BEG and END, since I want that 
functionality for my own personal todo system that might end up with some 
improvements on Org's end.




Re: How to refer to remote table, in another file, as a source block variable?

2020-09-17 Thread William Denton

Aha!  Thank you!  I'll try to do a patch for the docs so this is clearer there.

Bill

On 14 September 2020, John Kitchin wrote:


I think you are looking for (Assuming your table is in an org file called
test.org):

#+BEGIN_SRC ipython :var data=test.org:test_table
for row in data:
   print(row)
#+END_SRC

#+RESULTS:
:results:
# Out [2]:
# output
['two', 'yes']
['three', 'yes']
['four', 'no']


--
William Denton :: Toronto, Canada   ---   Listening to Art: 
https://listeningtoart.org/
https://www.miskatonic.org/ ---   GHG.EARTH: https://ghg.earth/
Caveat lector.  ---   STAPLR: https://staplr.org/



Re: [PATCH] Enhance org-html--build-meta-info

2020-09-17 Thread TEC


Jens Lechtenboerger  writes:

> Hi Timothy,

Hi Jens! Thanks for responding.

> yes, I agree that org-html--build-meta-info needs work, and the HTML
> backend would benefit from more documentation.  Back then [1], I
> wondered which parts of meta data need to be treated how.  That was
> continued in thread [2].

I haven't really considered changing the output of the function (other
than removing keywords).

Reading the email you've linked to, it looks like a change to
`org-html-encode-plain-text' would be a good idea though.

> As pointed out back then, using org-export-data on the title is
> wrong as it creates nested elements, leading to invalid HTML.
>
> Currently, org-element-interpret-data is applied for author
> information, while description and keywords are treated differently.

> Your patch goes for org-html-encode-plain-text in the new function
> org-html--build-meta-entry, which (if I’m not mistaken) produces
> author and description.  Did you think about using
> org-element-interpret-data instead?  What if that was used?
> I believe this to be an important question as it might affect
> backward compatibility and should be documented.

I was not aware of org-element-interpret-data, and I can't say I can
really tell what it does. If you'd care to elaborate that would be
helpful.

> Does this really work for you?  For the author, first
> org-html--build-meta-entry gets called from the new defcustom.  The
> result is assigned with setq to form, which then is non-nil so that
> org-html--build-meta-entry is applied again, leading to an error
> here.

Ooops, I forgot to remove org-html--build-meta-entry from the defcustom.
(I didn't notice because I overwrite it anyway in my personal config).

> Besides, did you forget keywords or remove them on purpose?

This is a deliberate omission. My impression is that the value of
keywords in HTML documents has evaporated over the past decade, see:
https://yoast.com/meta-keywords/

Let me know if you know otherwise.

> Best wishes
> Jens

Thanks for your feedback!

Timothy.

-

Updated patch:

>From 3a02e4d3bce5f7f0cbdb34c98f4267cea40eec3e Mon Sep 17 00:00:00 2001
From: TEC 
Subject: [PATCH] lisp/ox-html.el: make html meta func nicer

* lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated
structure extracted to new function `org-html--build-meta-entry'.
The opportunity was taken to extract most metadata info to custom
variable `org-html-meta-tags', allowing for easy end-user modification.
---
 lisp/ox-html.el | 111 ++--
 1 file changed, 61 insertions(+), 50 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d2f24f5c6..df7da1a68 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1425,6 +1425,28 @@ not be modified."

  Template :: Styles

+(defcustom org-html-meta-tags
+  '((lambda (_title author _info)
+  (when (org-string-nw-p author)
+   (list "name" "author" author)))
+(lambda (_title _author info)
+  (when (org-string-nw-p (plist-get info :description))
+   (list "name" "description"
+   (plist-get info :description
+("name" "generator" "Org Mode"))
+  "A list of arguments to be passed to `org-html--build-meta-entry'.
+Each argument can either be an list which is applied, or a function which
+generates such a list with signature (TITLE AUTHOR INFO) where TITLE and AUTHOR
+are strings, and INFO a communication plist."
+  :group 'org-export-html
+  :package-version '(Org . "9.5")
+  :type '(repeat
+ (choice
+  (list (string :tag "Meta label")
+(string :tag "label value")
+(string :tag "Content value"))
+  function)))
+
 (defcustom org-html-head-include-default-style t
   "Non-nil means include the default style in exported HTML files.
 The actual style is defined in `org-html-style-default' and
@@ -1835,23 +1857,31 @@ INFO is a plist used as a communication channel."

 ;;; Template

+(defun org-html--build-meta-entry (label identity  content-format 
 content-formatters)
+  "Construct  tag with LABEL=\"IDENTITY\" and content from 
CONTENT-FORMAT and CONTENT-FORMATTER."
+  (concat "\n"))
+
 (defun org-html--build-meta-info (info)
   "Return meta tags for exported document.
 INFO is a plist used as a communication channel."
-  (let* ((protect-string
-  (lambda (str)
-(replace-regexp-in-string
- "\"" "" (org-html-encode-plain-text str
- (title (org-export-data (plist-get info :title) info))
+  (let* ((title (org-html-encode-plain-text (plist-get info :title) info))
  ;; Set title to an invisible character instead of leaving it
  ;; empty, which is invalid.
  (title (if (org-string-nw-p title) title ""))
  (author (and (plist-get info :with-author)
   (let ((auth (plist-get info :author)))
-   ;; Return raw Org syntax.
+ ;; Return raw Org 

Re: [PATCH] Enhance org-html--build-meta-info

2020-09-17 Thread Jens Lechtenboerger
On 2020-09-17, TEC wrote:

> Hi All,
>
> This just replaces the current `org-html--build-meta-info' with a
> cleaner, more extensible (I also added a new variable)
> version. Please give it a look and let me know what you think!

Hi Timothy,

yes, I agree that org-html--build-meta-info needs work, and the HTML
backend would benefit from more documentation.  Back then [1], I
wondered which parts of meta data need to be treated how.  That was
continued in thread [2].

As pointed out back then, using org-export-data on the title is
wrong as it creates nested elements, leading to invalid HTML.

Currently, org-element-interpret-data is applied for author
information, while description and keywords are treated differently.

Your patch goes for org-html-encode-plain-text in the new function
org-html--build-meta-entry, which (if I’m not mistaken) produces
author and description.  Did you think about using
org-element-interpret-data instead?  What if that was used?
I believe this to be an important question as it might affect
backward compatibility and should be documented.

Does this really work for you?  For the author, first
org-html--build-meta-entry gets called from the new defcustom.  The
result is assigned with setq to form, which then is non-nil so that
org-html--build-meta-entry is applied again, leading to an error
here.

Besides, did you forget keywords or remove them on purpose?

Best wishes
Jens

[1] https://lists.gnu.org/archive/html/emacs-orgmode/2019-09/msg00193.html
[2] https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00368.html


smime.p7s
Description: S/MIME cryptographic signature


Re: pcase failure with Emacs 24 (was Emacs version for Org 9.4?)

2020-09-17 Thread Kaushal Modi
> 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.
>
> Thanks for confirming.  Pushed (73c929e3b).
>
>
I just stumbled on this as I was looking into why ox-hugo tests failed on
emacs 24.x (
https://travis-ci.org/github/kaushalmodi/ox-hugo/builds/728059027 ). This
should pass next week now. Thanks for your fix.


Re: variable-pitch-mode misaligns org-mode heading tags

2020-09-17 Thread Jeff Filipovits




Adam Spiers  writes:

Hrm, no this isn't good enough.  For graphical windows we still 
need
to set the display text properties to align all tags when the 
buffer
initially loads.  AFAICS there's currently no code to trigger 
this,
so it would need to be added, and for large files this might 
actually

cause problems with file loading time unless it was done in the
background (a bit like fontification can be done).


A few issues I found:

1. If the headline text exceeds the org-tags-column, the tags are 
moved so there is no space between the headline and the tag. This 
is only aesthetic, since in reality there is still a space 
there. Not sure this needs to be fixed. 

2. If you try to insert a space at the end of the headline, it 
will be gobbled automatically because org-self-insert-command 
calls org–align-tags-here. With this method of aligning tags I 
don’t think org-self-insert-command needs to make this call, 
because the display text property updates automatically on 
redisplay. So the solution may be take that call out, but I don’t 
know if that will break anything. Otherwise, maybe the code 
ensuring there is one space is not really necessary. 

3. Org-indent-mode creates a problem. Not sure why yet, or whether 
it’s org-indent-mode or some setting I have associated with it, 
but tags of child nodes don’t align properly. 




Jeff Filipovits
Spears & Filipovits, LLC
1126 Ponce de Leon Avenue
Atlanta, GA 30306
678.237.9302 (direct)
j...@civil-rights.law

All emails confidential to the fullest extent of the law.



Re: official orgmode parser

2020-09-17 Thread Przemysław Kamiński

On 9/17/20 3:18 AM, Ihor Radchenko wrote:

So basically this is what this thread is about. One needs a working
Emacs instance and work in "push" mode to export any Org data. This
requires dealing with temporary files, as described above, and some
ad-hoc formats to keep whatever data I need to pull from org.



"Pull" mode would be preferred. I could then, say, write a script in
Guile, execute 'emacs -batch' to export org data (I'm ok with that),
then parse the S-expressions to get what I need.


My choice to use "push" mode is just for performance reasons. Nothing
prevents you from writing a function called from emacs --batch that
converts parsed org data into whatever format your Guile script prefers.
That function may be either on Emacs side or on Guile side. Probably,
Emacs has more capabilities when dealing with s-expressions though.

You can even directly push the information from Emacs to API server.
You may find https://github.com/tkf/emacs-request useful for this task.

Finally, you may also consider clock tables to create clock summaries
using existing org-mode functionality. The tables can be named and
accessed using any programming language via babel.

Best,
Ihor


Przemysław Kamiński  writes:


On 9/16/20 2:02 PM, Ihor Radchenko wrote:

However what Ihor presented is interesting. Do you use similar approach
with shellout and 'emacs -batch' to show currently running task or you
'push' data from emacs to show it in the taskbar?


I prefer to avoid querying emacs too often for performance reasons.
Instead, I only update the clocking info when I clock in/out in emacs.
Then, the clocked in time is dynamically updated by independent bash
script.

The scheme is the following:
1. org clock in/out in Emacs trigger writing clocking info into
 ~/.org-clock-in status file
2. bash script periodically monitors the file and calculates the clocked
 in time according to the contents and time from last modification
3. the script updates simple textbox widget using awesome-client
4. the script also warns me (notify-send) when the weighted clocked in
 time is negative (meaning that I should switch to some more
 productive activity)

Best,
Ihor

Przemysław Kamiński  writes:


On 9/16/20 9:56 AM, Ihor Radchenko wrote:

Wow, another awesomewm user here; could you share your code?


Are you interested in something particular about awesome WM integration?

I am using simple textbox widgets to show currently clocked in task and
weighted summary of clocked time. See the attachments.

Best,
Ihor




Marcin Borkowski  writes:


On 2020-09-15, at 11:17, Przemysław Kamiński  wrote:


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 was in the exact same situation - I use Org-mode clocking, and we use
Toggl at our company, so I wrote a simple tool to fire API requests to
Toggl on clock start/cancel/end: https://github.com/mbork/org-toggl
It's a bit more than 200 lines of Elisp, so you might try to look into
it and adapt it to whatever tool your employer is using.


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 :)


Wow, another awesomewm user here; could you share your code?

Best,

--
Marcin Borkowski
http://mbork.pl



I don't have interesting code, just standard awesomevm setup. I run
periodic script to output data computed by orgstat and show it in the
taskbar (uses the shellout_widget).

However what Ihor presented is interesting. Do you use similar approach
with shellout and 'emacs -batch' to show currently running task or you
'push' data from emacs to show it in the taskbar?

P.



So basically this is what this thread is about. One needs a working
Emacs instance and work in "push" mode to export any Org data. This
requires dealing with temporary files, as described above, and some
ad-hoc formats to keep whatever data I need to pull from org.

"Pull" mode would be preferred. I could then, say, write a script in
Guile, execute 'emacs -batch' to export org data (I'm ok with that),
then parse the S-expressions to get what I need.

P.




OK so this is what I got so far
https://gitlab.com/cgenie/org-parse
I stole the simple test.org file from ox-json test suite.
Guile seems to correctly parse that output. At least something 

Re: eldoc recursion error

2020-09-17 Thread James N . V . Cash

Kyle Meyer  writes:
> Thanks for the patch!  For information about the expected commit message
> format, please see .

Ah will do, thanks! I'm still learning how to work with the email &
patch-based workflow.

> Okay, so when eldoc-documentation-functions is defined (Emacs >=28), we
> take the first function and go with it.  That might not be exactly what
> you'd see in the native buffer, depending on whether there are other
> members of eldoc-documentation-functions and how they interact.  (I'm
> being vague, because I don't really know anything about eldoc, but it
> seems like that must be the case.)  Anyway, I'd guess it will be good
> enough in most cases, and it's certainly better than the recursion
> error.

Ah yes, very true. I've attached another patch, which tries to better
preserve how the new eldoc strategy works, by passing through the
callback to the mode-local eldoc function if available, which will be a
closure over the configured documentation strategy with
eldoc-documentation-functions bound to the appropriate mode-local value.

>From 4c2042c9e3820d88cd655cf01d572b9686a40d31 Mon Sep 17 00:00:00 2001
From: "James N. V. Cash" 
Date: Thu, 17 Sep 2020 10:51:13 -0400
Subject: [PATCH] Address org-eldoc-recursion issue

* org-eldoc.el (org-eldoc-get-mode-local-documentation-function,
org-eldoc-documentation-function): Support Emacs 28-style eldoc, where
instead of a single function, the eldoc-documentation-functions hook
has a list of functions, which may optionally take a callback.
---
 contrib/lisp/org-eldoc.el | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index 3b0999340..85e238e64 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -116,8 +116,13 @@
 (when (fboundp mode-func)
   (with-temp-buffer
 (funcall mode-func)
-(setq doc-func (and eldoc-documentation-function
-(symbol-value 'eldoc-documentation-function)))
+	(setq doc-func (if (boundp 'eldoc-documentation-functions)
+			   (lexical-let ((doc-funs (symbol-value 'eldoc-documentation-functions)))
+ (lambda ()
+   (let ((eldoc-documentation-functions doc-funs))
+ (funcall eldoc-documentation-strategy
+			   (and eldoc-documentation-function
+(symbol-value 'eldoc-documentation-function
 (puthash lang doc-func org-eldoc-local-functions-cache))
   doc-func)
   cached-func)))
@@ -127,7 +132,7 @@
 (declare-function php-eldoc-function "php-eldoc" ())
 (declare-function go-eldoc--documentation-function "go-eldoc" ())
 
-(defun org-eldoc-documentation-function ( _ignored)
+(defun org-eldoc-documentation-function ( callback)
   "Return breadcrumbs when on a headline, args for src block header-line,
   calls other documentation functions depending on lang when inside src body."
   (or
@@ -161,7 +166,12 @@
  (string= lang "golang")) (when (require 'go-eldoc nil t)
 (go-eldoc--documentation-function)))
(t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang)))
-(when (functionp doc-fun) (funcall doc-fun
+(when (functionp doc-fun)
+		  (if (functionp callback)
+		  (condition-case nil
+			  (funcall doc-fun callback)
+			(wrong-number-of-arguments (funcall doc-fun)))
+		(funcall doc-fun)
 
 ;;;###autoload
 (defun org-eldoc-load ()
-- 
2.25.1



Re: basic org questions

2020-09-17 Thread General discussions about Org-mode.
Alexander Adolf wrote:

> I use visual-line-mode (which also enables
> word-wrap by default) for Org files. For instance:
>
> (add-hook 'org-mode-hook (lambda ()
>(turn-off-auto-fill)
>(visual-line-mode)
>(flyspell-mode)))
>
> That way lines get wrapped to the buffer's width
> visually, but physically are still single lines.
> Hence, I can add italics. bold, whatever, across
> multiple _visual_ lines, and the formatting is what
> I expect, because in reality it's a single
> _physical_ line only.

Good point, but that would change my by now built-in
finger habits and editing practices, so that'd bite
somewhere else instead, if I did that, like,
instantly :)

Anyway speaking of editing... using `visual-mode'
seems to have solved the visual issues like a charm
but editing sometimes, not often, but still,
gets wierd.

One example is this table, with point at ^. Here, hit
DEL and the vertical line (bar) won't move.
Because DEL isn't `delete-backward-char', but
`org-delete-backward-char'. But that's OK, I can
change that...

  | inlägg | 
[[https://www.facebook.com/raddaeriksbergsskogar/posts][https://www.facebook.com/raddaeriksbergsskogar/posts]]
 |
  | grupp  | 
[[https://www.facebook.com/raddaeriksbergsskogar][https://www.facebook.com/raddaeriksbergsskogar]]
 |

 ^
-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




Re: basic org questions

2020-09-17 Thread Alexander Adolf
Emanuel Berg via "General discussions about Org-mode."
 writes:

> 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.
> [...]

I use visual-line-mode (which also enables word-wrap by default) for Org
files. For instance:

(add-hook 'org-mode-hook (lambda ()
   (turn-off-auto-fill)
   (visual-line-mode)
   (flyspell-mode)))

That way lines get wrapped to the buffer's width visually, but
physically are still single lines. Hence, I can add italics. bold,
whatever, across multiple _visual_ lines, and the formatting is what I
expect, because in reality it's a single _physical_ line only.


Hoping to have helped,

  --alex



Re: [PATCH] Enhance org-html--build-meta-info

2020-09-17 Thread TEC


TEC  writes:

> <#part type=“text/x-patch” 
> filename=“home/tec.emacs.d/.local/straight/repos/org-mode/0001-lisp-ox-html.el-make-html-meta-func-nicer.patch”
> disposition=inline>
> <#/part>

I have no idea what I need to do to get Mu4e to attach files, but I'm
clearly not doing it right. Here's the patch inline:

>From ae830f0be92c0b5ac3a9fb3d967a24d4292a1a4d Mon Sep 17 00:00:00 2001
From: TEC 
Subject: [PATCH] lisp/ox-html.el: make html meta func nicer

* lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated
structure extracted to new function `org-html--build-meta-entry'.
The opportunity was taken to extract most metadata info to custom
variable `org-html-meta-tags', allowing for easy end-user modification.
---
 lisp/ox-html.el | 111 ++--
 1 file changed, 61 insertions(+), 50 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d2f24f5c6..901f1a379 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1425,6 +1425,28 @@ not be modified."

  Template :: Styles

+(defcustom org-html-meta-tags
+  '((lambda (_title author _info)
+  (when (org-string-nw-p author)
+   (org-html--build-meta-entry "name" "author" author)))
+(lambda (_title _author info)
+  (when (org-string-nw-p (plist-get info :description))
+   (org-html--build-meta-entry "name" "description"
+   (plist-get info :description
+("name" "generator" "Org Mode"))
+  "A list of arguments to be passed to `org-html--build-meta-entry'.
+Each argument can either be an list which is applied, or a function which
+generates such a list with signature (TITLE AUTHOR INFO) where TITLE and AUTHOR
+are strings, and INFO a communication plist."
+  :group 'org-export-html
+  :package-version '(Org . "9.5")
+  :type '(repeat
+ (choice
+  (list (string :tag "Meta label")
+(string :tag "label value")
+(string :tag "Content value"))
+  function)))
+
 (defcustom org-html-head-include-default-style t
   "Non-nil means include the default style in exported HTML files.
 The actual style is defined in `org-html-style-default' and
@@ -1835,23 +1857,31 @@ INFO is a plist used as a communication channel."

 ;;; Template

+(defun org-html--build-meta-entry (label identity  content-format 
 content-formatters)
+  "Construct  tag with LABEL=\"IDENTITY\" and content from 
CONTENT-FORMAT and CONTENT-FORMATTER."
+  (concat "\n"))
+
 (defun org-html--build-meta-info (info)
   "Return meta tags for exported document.
 INFO is a plist used as a communication channel."
-  (let* ((protect-string
-  (lambda (str)
-(replace-regexp-in-string
- "\"" "" (org-html-encode-plain-text str
- (title (org-export-data (plist-get info :title) info))
+  (let* ((title (org-export-data (plist-get info :title) info))
  ;; Set title to an invisible character instead of leaving it
  ;; empty, which is invalid.
  (title (if (org-string-nw-p title) title ""))
  (author (and (plist-get info :with-author)
   (let ((auth (plist-get info :author)))
-   ;; Return raw Org syntax.
+ ;; Return raw Org syntax.
 (and auth (org-element-interpret-data auth)
- (description (plist-get info :description))
- (keywords (plist-get info :keywords))
  (charset (or (and org-html-coding-system
(fboundp 'coding-system-get)
(coding-system-get org-html-coding-system
@@ -1863,50 +1893,31 @@ INFO is a plist used as a communication channel."
(concat "\n")))
- (format
-  (if (org-html-html5-p info)
- (org-html-close-tag "meta" "charset=\"%s\"" info)
-   (org-html-close-tag
-"meta" "http-equiv=\"Content-Type\" content=\"text/html;charset=%s\""
-info))
-  charset) "\n"
+
+ (if (org-html-html5-p info)
+(org-html--build-meta-entry "charset" charset)
+   (org-html--build-meta-entry "http-equiv" "Content-Type"
+  (concat "text/html;charset=" charset)))
+
  (let ((viewport-options
-   (cl-remove-if-not (lambda (cell) (org-string-nw-p (cadr cell)))
- (plist-get info :html-viewport
-   (and viewport-options
-   (concat
-(org-html-close-tag
- "meta"
- (format "name=\"viewport\" content=\"%s\""
- (mapconcat
-  (lambda (elm) (format "%s=%s" (car elm) (cadr elm)))
-  viewport-options ", "))
- info)
-"\n")))
+(cl-remove-if-not (lambda (cell) (org-string-nw-p (cadr cell)))
+  (plist-get info :html-viewport
+   (if viewport-options
+   (org-html--build-meta-entry "name" "viewport"
+   

[PATCH] Enhance org-html--build-meta-info

2020-09-17 Thread TEC
Hi All,

This just replaces the current `org-html--build-meta-info' with a
cleaner, more
extensible (I also added a new variable) version. Please give it a look
and let
me know what you think!

Timothy.

<#part type="text/x-patch"
filename="/home/tec/.emacs.d/.local/straight/repos/org-mode/0001-lisp-ox-html.el-make-html-meta-func-nicer.patch"
disposition=inline>
<#/part>


Re: basic org questions

2020-09-17 Thread General discussions about Org-mode.
Stefan Nobis wrote:

>>> #+attr_latex: :center nil :booktabs t
>>> | My | Columns |
>>> |+-|
>>> |  1 |   2 |
>>> |  3 |   4 |
>
>> "PDF file produced with errors."
>
> Sorry that I try to make more general examples that
> are not exactly tailored to your use case.
> As I said in the paragraph above that example, the
> package "booktabs" is needed (it is one of my
> default packages, so in my config it will always be
> added to LaTeX code generated by Org). So either
> add "#+latex_header: \usepackage{booktabs}" or
> remove the ":booktabs t" part.

I _think_ I tried with just :center nil (because
I didn't know what booktabs refered to) and that the
result then was the same...

But anyway, I know have `org-latex-tables-centered'
so it is OK. [1] There is an
`org-latex-tables-booktabs' as well, BTW. Both in
ox-latex.el


[1] https://dataswamp.org/~incal/emacs-init/org-my.el

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




Re: basic org questions

2020-09-17 Thread General discussions about Org-mode.
Stefan Nobis wrote:

>> There are many pieces of software that will allow
>> the user to the violate best typesetting practices
>> easily. LaTeX is not one of them.
>
> Not quite right. I have seen people create really
> ugly source code *and* ugly output with LaTeX with
> ease. You can create garbage with any kind of
> software. :)

And that is a good thing :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




Re: basic org questions

2020-09-17 Thread General discussions about Org-mode.
Stefan Nobis wrote:

>> OK, but the values still ned to be
>> specified, right?
>
> No, just use the package - it sets the relevant
> lengths to change the style of marking paragraphs
> and tries hard to also reset every other length
> that depends on the original values of
> these variables.

You are right, thanks.

> As I said: The lengths parskip and parindent are
> very far-reaching, fundamental variables in LaTeX.
> They are used in many places and globally setting
> them may lead to unexpected side-effects.

Yes, I understood :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




Re: using header data in document

2020-09-17 Thread Eric S Fraga
On Wednesday, 16 Sep 2020 at 19:14, Emanuel Berg via "General discussions about 
Org-mode." wrote:
> Eric S Fraga wrote:
>
>> what does your #+date: line look like? Is it
>> a single time stamp? If it is not, all of the above
>> would return the same thing.
>
> I don't have that line.

So there is no timestamp and the {{{date}}} macro cannot do anything
with no information.  

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-725-g7bc18e



Re: creating png images in emails with org-mode

2020-09-17 Thread Eric S Fraga
On Thursday, 17 Sep 2020 at 00:57, Nick Dokos wrote:
> Apparently, recent versions of ImageMagick (version 7 seems to be one)
> on (perhaps) some distros ship with a
> /etc/ImageMagick-/policy.xml file that imposes restrictions
> on what can be done. Here's an SE question with some information:

Thank you.  Interesting.

For the OP, it might be worth noting that the solution on the
StackExchange page you linked to refers to the generation of PDF files
from the LaTeX snippet; I would imagine that the fix noted will need to
be adjusted for PNG files but cannot verify as I'm still on ImageMagick
version 6 and don't have these issues.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-725-g7bc18e



[r...@gnu.org: Keep Org mode submodules in Emacs, please!]

2020-09-17 Thread Russell Adams


- Forwarded message from Richard Stallman  -

Date: Wed, 16 Sep 2020 01:09:19 -0400
From: Richard Stallman 
Subject: 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. ]]]

[Resending to cater to prissy mailer]

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)



- End forwarded message -


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: basic org questions

2020-09-17 Thread Stefan Nobis
"Thomas S. Dye"  writes:

> There are many pieces of software that will allow the user to the
> violate best typesetting practices easily. LaTeX is not one of them.

Not quite right. I have seen people create really ugly source code
*and* ugly output with LaTeX with ease. You can create garbage with
any kind of software. :)

-- 
Until the next mail...,
Stefan.



Re: basic org questions

2020-09-17 Thread Stefan Nobis
Emanuel Berg via "General discussions about Org-mode."
 writes:

>> #+attr_latex: :center nil :booktabs t
>> | My | Columns |
>> |+-|
>> |  1 |   2 |
>> |  3 |   4 |

> "PDF file produced with errors."

Sorry that I try to make more general examples that are not exactly
tailored to your use case. As I said in the paragraph above that
example, the package "booktabs" is needed (it is one of my default
packages, so in my config it will always be added to LaTeX code
generated by Org). So either add "#+latex_header:
\usepackage{booktabs}" or remove the ":booktabs t" part.

-- 
Until the next mail...,
Stefan.



Re: basic org questions

2020-09-17 Thread Stefan Nobis
Emanuel Berg via "General discussions about Org-mode."
 writes:

> OK, but the values still ned to be specified, right?

No, just use the package - it sets the relevant lengths to change the
style of marking paragraphs and tries hard to also reset every other
length that depends on the original values of these variables.

Here is an example of a quite minimal LaTeX document that should show
the effect:

#+begin_src latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{parskip}
\begin{document}
\Blinddocument
\end{document}
#+end_src

As I said: The lengths parskip and parindent are very far-reaching,
fundamental variables in LaTeX. They are used in many places and
globally setting them may lead to unexpected side-effects.

If you just look at a couple of paragraphs you won't see any problems.
But if you write more complex documents, using packages like listings to
display code, use other environments mixed with paragraphs and lists,
there will occur problems with the spacing.

I don't remember all the details, I just always remember to use either
the package parskip or (in most of my use-cases) the documentclass
option "parskip=full" from the Koma script classes (that I use nearly
exclusively) - when I... consider to use this style of marking
paragraphs. :)

--
Until the next mail...,
Stefan.



Re: basic org questions

2020-09-17 Thread Stefan Nobis
Samuel Wales  writes:

> for my part, i appreciate your using the "wrong" style for your
> email message

A plain text document presented in a monospaced font is quite a
different thing than a (longer) PDF with a plethora of layout and
micro-typographic options.

Do you also appreciate the workarounds to represent complex math
formulas in plain text and do you prefer these workarounds to a nicely
set formula in e.g. a PDF?

So I would say everything depends on the context. In books I very much
prefer the usual style of marking paragraphs by indenting the first
line and no extra space between paragraphs. IMHO much easier to read
(and in case of books with many special elements like formulas also
much less ambiguous).

But in other contexts (even when producing PDFs via LaTeX) other
styles may be preferable. I just add my remarks because I just too
often see the "mail style" marking of paragraphs in longer texts
(reports etc.) where the usual "book style" would be much more
friendly to at least my eyes. Just be aware of the options and try to
find a style that is pleasant to most of your readers. :)

-- 
Until the next mail...,
Stefan.



Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2020-09-17 Thread Shibu N.V
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.


Emacs is invoked using runemacs.exe -Q. The org file is loaded in buffer
using C-x C-f. But the org file is not rendered in the buffer. The
message buffer shows the message "(Shell command succeeded with no
output)" and buffer shows Org-mode enabled. To render the file, either
the file needs to be reloaded in buffer or M-x org-mode has to be issued
.Also tried with latest stable release of org 9.4 Working perfectly in
Emacs 26.3 windows binaries

Emacs  : GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
 of 2020-08-21
Package: Org mode version 9.3 (release_9.3 @
c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append local]
   5]
#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete
org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs") ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("mailto" :follow
#[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"]
  5 "\n\n(fn URL)"]
)
   ("https" :follow
#[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("http" :follow
#[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("ftp" :follow
#[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-link-elisp-confirm-function 'yes-or-no-p

















N.V.Shibu
Assistant Professor Senior Grade
Sri Ramakrishna Institute of Technology
Coimbatore-10.


[PATCH] Adaptive Org faces in headings?

2020-09-17 Thread Ihor Radchenko
The attached patch seems to fix the issue.
Can anyone test?

Best,
Ihor

>From 7a5bfe2f514af1f6af48652155732dbcb9fe22d0 Mon Sep 17 00:00:00 2001
From: Ihor Radchenko 
Date: Thu, 17 Sep 2020 16:14:11 +0800
Subject: [PATCH] Make sure that headline faces take precedence

* lisp/org.el (org-activate-links): Prepend instead of overriding
existing face.
(org-set-font-lock-defaults): Prepend keyword, `org-headline-todo', and
`org-headline-done' faces instead of overriding.
(org-font-lock-add-priority-faces): Prepend priority face instead of
overriding.
(org-font-lock-add-tag-faces): Prepend tag faces instead of
overriding.

Fix bug when org-level-N headline face is overridden while fontifying
smaller elements within headline.  Prepend the element faces instead.
---
 lisp/org.el | 62 ++---
 1 file changed, 35 insertions(+), 27 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index bc74cedc7..69040a540 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5142,30 +5142,31 @@ This includes angle, plain, and bracket links."
 		 (link (org-element-property :raw-link link-object))
 		 (type (org-element-property :type link-object))
 		 (path (org-element-property :path link-object))
+ (face-property (pcase (org-link-get-parameter type :face)
+  ((and (pred functionp) face) (funcall face path))
+  ((and (pred facep) face) face)
+  ((and (pred consp) face) face) ;anonymous
+  (_ 'org-link)))
 		 (properties		;for link's visible part
-		  (list
-		   'face (pcase (org-link-get-parameter type :face)
-			   ((and (pred functionp) face) (funcall face path))
-			   ((and (pred facep) face) face)
-			   ((and (pred consp) face) face) ;anonymous
-			   (_ 'org-link))
-		   'mouse-face (or (org-link-get-parameter type :mouse-face)
-   'highlight)
-		   'keymap (or (org-link-get-parameter type :keymap)
-			   org-mouse-map)
-		   'help-echo (pcase (org-link-get-parameter type :help-echo)
-((and (pred stringp) echo) echo)
-((and (pred functionp) echo) echo)
-(_ (concat "LINK: " link)))
-		   'htmlize-link (pcase (org-link-get-parameter type
-:htmlize-link)
-   ((and (pred functionp) f) (funcall f))
-   (_ `(:uri ,link)))
-		   'font-lock-multiline t)))
+		  (list 'mouse-face (or (org-link-get-parameter type :mouse-face)
+	'highlight)
+			'keymap (or (org-link-get-parameter type :keymap)
+org-mouse-map)
+			'help-echo (pcase (org-link-get-parameter type :help-echo)
+ ((and (pred stringp) echo) echo)
+ ((and (pred functionp) echo) echo)
+ (_ (concat "LINK: " link)))
+			'htmlize-link (pcase (org-link-get-parameter type
+  :htmlize-link)
+	((and (pred functionp) f) (funcall f))
+	(_ `(:uri ,link)))
+			'font-lock-multiline t)))
 	(org-remove-flyspell-overlays-in start end)
 	(org-rear-nonsticky-at end)
 	(if (not (eq 'bracket style))
-		(add-text-properties start end properties)
+		(progn
+  (add-face-text-property start end face-property)
+		  (add-text-properties start end properties))
 	  ;; Handle invisible parts in bracket links.
 	  (remove-text-properties start end '(invisible nil))
 	  (let ((hidden
@@ -5174,6 +5175,7 @@ This includes angle, plain, and bracket links."
 'org-link))
 			 properties)))
 		(add-text-properties start visible-start hidden)
+(add-face-text-property visible-start visible-end face-property)
 		(add-text-properties visible-start visible-end properties)
 		(add-text-properties visible-end end hidden)
 		(org-rear-nonsticky-at visible-start)
@@ -5641,7 +5643,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	   ;; TODO keyword
 	   (list (format org-heading-keyword-regexp-format
 			 org-todo-regexp)
-		 '(2 (org-get-todo-face 2) t))
+		 '(2 (org-get-todo-face 2) prepend))
 	   ;; TODO
 	   (when org-fontify-todo-headline
 	 (list (format org-heading-keyword-regexp-format
@@ -5649,7 +5651,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 			"\\(?:"
 			(mapconcat 'regexp-quote org-not-done-keywords "\\|")
 			"\\)"))
-		   '(2 'org-headline-todo t)))
+		   '(2 'org-headline-todo prepend)))
 	   ;; DONE
 	   (when org-fontify-done-headline
 	 (list (format org-heading-keyword-regexp-format
@@ -5657,7 +5659,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 			"\\(?:"
 			(mapconcat 'regexp-quote org-done-keywords "\\|")
 			"\\)"))
-		   '(2 'org-headline-done t)))
+		   '(2 'org-headline-done prepend)))
 	   ;; Priorities
 	   '(org-font-lock-add-priority-faces)
 	   ;; Tags
@@ -5841,18 +5843,24 @@ If TAG is a number, get the corresponding match group."
 (defun org-font-lock-add-priority-faces (limit)
   "Add the special priority faces."
   (while (re-search-forward org-priority-regexp limit t)
+(add-face-text-property
+ (match-beginning 1)
+ 

Re: strange bug after a fresh install

2020-09-17 Thread Uwe Brauer
>>> "NS" == Nicholas Savage  writes:

> Are you using ob-ipython? Your trace makes it seem like that might be
> loaded maybe in your init files. This issue seems to cover the problem
> you are having, since it says that it's modifying `org-mode-hook'.

> https://github.com/gregsexton/ob-ipython/issues/161

Thanks for the link


> Maybe since you have a clean install you're missing jupyter while you
> weren't before?

Right, I will check


smime.p7s
Description: S/MIME cryptographic signature


Re: strange bug after a fresh install

2020-09-17 Thread Uwe Brauer
>>> "JJ" == Jeremie Juste  writes:

> Hello Uwe,

> if seems that the problem lies with ob-ipython.
> I would suggest to remove ob-ipython to check and then perform a fresh
> install of ob-ipython.

thanks


smime.p7s
Description: S/MIME cryptographic signature


Re: Shower thought: submit an IETF RFC to register Org as a MIME type

2020-09-17 Thread hj-orgmode-1



 I do not have much insight into all the possible outcomes (i.e. I am 
clueless about such outcomes) except one outcome - orgmode MIME type 
gets registered.  I think it would serve well the proliferation and 
popularization of org-mode. I.e. I do not see any negatives, only 
positives. After successful registration, I don't think anyone would 
really complain that their "Lotus Organiser" or organ audio samples do 
not get processed as usual.


 AFAIC, push this.

 H J

On 9/17/20 9:09 AM, TEC wrote:

I'm still hoping for that discussion :P

To the Org community, if you have thoughts on this - please share them
:)

Timothy.

Me earlier:

Bastien  writes:

Let's discuss this with care, and consider all possible outcomes.

This is /exactly/ what I was hoping to prompt with this email.
I think it would be a nice idea (assuming feasibility), but it's
certainly not something to rush.




Re: Shower thought: submit an IETF RFC to register Org as a MIME type

2020-09-17 Thread TEC


I'm still hoping for that discussion :P

To the Org community, if you have thoughts on this - please share them
:)

Timothy.

Me earlier:
> Bastien  writes:
>> Let's discuss this with care, and consider all possible outcomes.
>
> This is /exactly/ what I was hoping to prompt with this email.
> I think it would be a nice idea (assuming feasibility), but it's
> certainly not something to rush.



Re: Getting Org-Crypt to work (doc bug?)

2020-09-17 Thread Bastien
Hi David,

David Masterson  writes:

> I didn't see a reply -- does the above patch work?  Have you applied
> it?

I have not had the time to test the patch yet.

If you are confident the fix is good, please update the format of the
patch, following instructions here:

https://orgmode.org/worg/org-contribute.html#commit-messages

Thanks,

-- 
 Bastien



Re: Getting Org-Crypt to work (doc bug?)

2020-09-17 Thread David Masterson
David Masterson  writes:

> David Masterson  writes:
>
>> Bastien  writes:
>>
>>> Hi David,
>>>
>>> David Masterson  writes:
>>>
 Both things should be mentioned in the Org-Mode Info pages for
 org-crypt.
>>>
>>> Can you please provide a patch for this?
>>>
>>> Thanks,
>>
>> I'm not very good with this yet, but, when I figure it out, I will
>> certainly consider a patch.  Never having done a patch before, could you
>> list the steps for providing a patch?
>
> Nevermind -- here's the patch:
>
> -
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 3eb745b5d..775af7a13 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -19650,8 +19650,9 @@ an Org file that is part of a publishing project.
 :END:
 
 Org Crypt encrypts the text of an entry, but not the headline, or
-properties.  Behind the scene, it uses the Emacs EasyPG library to
-encrypt and decrypt files.
+properties.  Behind the scene, it uses the [[info:epa][Emacs EasyPG Library]] 
to
+encrypt and decrypt files.  Also, pay attention to the installation
+and setup of [[info:gnupg][GnuPG]]
 
 #+vindex: org-crypt-tag-matcher
 Any text below a headline that has a =crypt= tag is automatically
> -

I didn't see a reply -- does the above patch work?  Have you applied it?

-- 
David Masterson