Re: Multiple versions of Org in load-path problem

2022-12-08 Thread Michel Schinz
Just for the record, I also ran into problems when installing Org 9.6
using Emacs' package system on top of an older version that came with
Emacs. If I tried to install it as usual (M-x list-packages, then
install the package from there), I had errors during compilation related
to `org-assert-version`, and then if I restarted Emacs, I would get a
fatal error in an unrelated package.

I managed to solve that problem by:
1. uninstalling Org 9.6 and exiting Emacs,
2. starting Emacs with -q,
3. installing Org 9.6 from there (using M-x list-packages as usual),
4. restarting Emacs.

I'm not sure this is related to your problem, or whether that helps (but
I hope it does)...

Michel.

On Thu, 8 Dec 2022, at 19:24, David Masterson wrote:
> Ihor Radchenko  writes:
>
>> David Masterson  writes:
>>
>>> I went so far as to add the following to early-init.el:
>>>
>>> (if (featurep 'org) (unload-feature 'org))
>>> (add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/org-9.6")
>>> (load-library "org")
>>>
>>> The load-library still fails with the org-assert-version error.
>>
>> Indeed. It is to be expected. M-x package-install should not err here
>> though. In theory.
>
> My testing says that, in early-init.el, Org is not yet a feature, so the
> built-in Org-9.3 is not yet loaded and the first 'if' fails. Adding the
> path for Org-9.6 should put it at the front of the load-path and
> (hopefully) override Org-9.3 if it is in the load-path (I think I
> checked that).  The error in the load-library is, therefore, a problem
> with Org-9.6 installed by package-install. 
>
>> I suggest you to read `org-assert-version'. It aims to catch the
>> situation above and similar.
>
> This is chicken and egg problem.  I can't use 'org-assert-version'
> unless I can get Org to load.
>
>> Note, however, that installation problem is different. Or rather it
>> should be different.
>>
>>> Could it be that, when you package-install Org-9.6, it runs through a
>>> check where (I think) it compiles the package?  I get a lot of warnings
>>> and 34(?) failed files.  Could it be that some of the files are not
>>> built and, so, when I load-library, I'm picking up some of the wrong
>>> files from the built-in Org-9.3?  Do we need to remove all versions of
>>> Org that is not the current version from the load-path at the very
>>> beginning of org.el to ensure no fall-through?  Kind of a hack, but...
>>
>> Maybe. It should not. That's why I raised
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882
>> I'd like to see if Emacs devs have anything to say here.
>
> Good. I'm not used to bug reporting in Emacs, so I raised a question on
> use-package in emacs-de...@gnu.org, but they pointed me at your bug.
> I'll see if I can add anything there.
>
> -- 
> David Masterson



Re: [O] including the | character in a table

2018-07-25 Thread Michel Schinz
Hello,

On Wed, Jul 25, 2018, at 11:22, Alan Schmitt wrote:
> I'm writing a cheat sheet for a programming language, and I'm having
> trouble with operators that use |. For instance:
> 
> | match expr with   | pattern matching |
> | | pattern -> expr | action   |
> 
> How can I escape the |? I tried putting a \ before but it does not work.

I've used macros in the past for such a case. Quite heavyweight, but I didn't 
find anything better. Here is an example (which you could augment if you wanted 
to export to LaTeX too):

#+MACRO: I @@html:@@

| match expr with| pattern matching |
| {{{I}}}pattern -> expr | action   |

Michel.



Re: [O] Bug: incorrect display of tables after alignment [9.1.8 (9.1.8-elpa @ /Users/michelschinz/.emacs.d/elpa/org-20171228/)]

2018-01-02 Thread Michel Schinz
Hello Bastien and Nicolas,

On Tue, Jan 2, 2018, at 12:05, Bastien Guerry wrote:

> Things should be fine now.

Indeed, they seem to be: after upgrading my version of Org from Org's ELPA, the 
problem I reported has disappeared, and M-x org-version reports that it's 
9.1.5, as it should.

(Melleus, the same procedure should fix the problem for you too).

Thank you for the fix,
Michel.



Re: [O] Bug: incorrect display of tables after alignment [9.1.8 (9.1.8-elpa @ /Users/michelschinz/.emacs.d/elpa/org-20171228/)]

2018-01-01 Thread Michel Schinz
Hello,

On Mon, Jan 1, 2018, at 19:37, Nicolas Goaziou wrote:
> There is no such thing as Org version 9.1.8. Latest stable release is
> Org 9.1.5.
> 
> As I cannot reproduce it (I'm not on macOS) on maint (stable branch),
> I suggest to update Org and try again. It may be related to a bug
> recently fixed.

Ok, I will gladly do this, but I just want to point out that Org 9.1.8 is what 
one currently gets from Org's own ELPA. You can check it out by downloading the 
latest archive from https://orgmode.org/elpa/, namely:

https://orgmode.org/elpa/org-20171228.tar

The file org-version.el in that archive contains the following definition:

(defun org-release ()
  "The release version of Org.
Inserted by installing Org mode or when a release is made."
   (let ((org-release "9.1.8"))
 org-release))

Did I make a mistake, or is there a problem with Org ELPA?

Michel.



[O] Bug: incorrect display of tables after alignment [9.1.8 (9.1.8-elpa @ /Users/michelschinz/.emacs.d/elpa/org-20171228/)]

2018-01-01 Thread Michel Schinz
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

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


The latest version(s) of Org have a weird display issue (at least on
macOS) when tables are aligned. To see it, launch Emacs with "-Q" and
then add the directory containing the latest Org to the load-path. Then,
open an empty Org file (e.g. /tmp/foo.org) and paste the following
partial table into it:

|xxx|zzz
|0

Then, with the cursor on the "0" (e.g.), hit C-c C-c to realign the
table. Visually, the result will look like this:

| xxx | zzz |
|   | |

That is, the 0 will have disappeared, and the vertical lines will not be
aligned. Then save the file, kill the buffer, and reload the file. What
now appears is the correct table, i.e.

| xxx | zzz |
|   0 | |

I am able to reproduce this bug both when Emacs is launched as graphical
application, and in the terminal when launched with "-nw".

Michel.

Emacs  : GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
10.9.5 (Build 13F1911))
 of 2017-09-12
Package: Org mode version 9.1.8 (9.1.8-elpa @ 
/Users/michelschinz/.emacs.d/elpa/org-20171228/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-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-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("id" :follow org-id-open)
   ("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)
   ("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") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
(lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow
(lambda (path) (browse-url (concat "mailto:; path
   ("news" :follow
(lambda (path) (browse-url (concat "news:; path
   ("shell" :follow org--open-shell-link))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



[O] Why does v8.2.10 include such an old version of ox-html.el?

2014-12-08 Thread Michel Schinz
Hi,

I recently wanted org to export SVG images as HTML objects instead of
images and, browsing the mailing list, I found a thread dating back
from January 2014 [1] addressing that issue. In that thread, Rick
Frankel says that he applied a patch to ox-html.el for that, and
searching for it in the git repo, I found the commit (e955be90),
dating back from January 16, 2014.

Now what baffles me is that the contents of this patch is *not*
included in version 8.2.10 of org, despite the fact that v8.2.10 was
released 10 month after the commit was made. Even more surprising to
me, the version of org distributed through ELPA (which I thought to be
the bleeding edge, an impression that seems to be vindicated by the
frequency of updates) does *not* contain this commit either...

I did check that this commit wasn't reverted, and it doesn't seem to
be: one can easily find the org-html--svg-image function that was
introduced by it in the HEAD version of ox-html.el.

So my question is: am I doing something wrong? How can I get a version
of org that includes this almost-one-year-old patch, ideally without
having to resort to manual installation?

Thanks,
Michel.

[1] http://thread.gmane.org/gmane.emacs.orgmode/80668