Re: [BUG] worg-setup.org is outdated (was: [accessibility] worg obscures text)

2022-06-12 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>>> Patches are welcome! We just need someone with knowledge of html/css to
>>> jump in and create a patch for https://git.sr.ht/~bzg/worg (BTW, also
>>> see shiny new https://sr.ht/~bzg/org/).
>>>
>>
>> Sadly, it isn't that simple. You also have to understand how worg does
>> the publishing and that isn't easy. I just looked at the repository 
>>
>> - The .emacs.el file referenced in the worg-setup.org is not available
>> (404 error)
>
> Sorry. worg-setup.org is outdated. Bastien, could you update it?
>
> The publishing is done using
> https://git.sr.ht/~bzg/worg/tree/master/item/publish.sh
> In the nutshell, it just iterates over .org files and runs html export.
>
>> - The styles directory consists of a number of css files - not clear
>>   which one is used. (I'm guessing the .emacs.el file might tell me such
>>   details).
>
> The default is /worg/style/worg.css
> Alternatives are worg-zenburn.css and worg-classic.css. See the above
> link.
>
>> - You also need to know about org publish and how it works, not just be
>>   familiar wiht html and css. 
>
> Most likely, the problem is in the css files. worg.css has
>
> /* TOC inspired by http://jashkenas.github.com/coffee-script */
> #table-of-contents {
>   z-index: 1;
>

Yes, that does help. 

Unfortunately, I suspect it isn't a simple 'tweak' to the css to fix
this. The setting of z-index is the root cause of the issue. That
approach simply won't work in an accessible manner. Therefore, a whole
change to the presentation style is likely going to be necessary. 

A 'refresh' of the look probably isn't a bad thing. However, getting it
right and consistent is likely non-trivial. Not sure if my css skills
are up to it, but willing to have a look at it anyway. 



Re: [accessibility] worg obscures text

2022-06-12 Thread Max Nikulin

On 13/06/2022 09:16, Tim Cross wrote:

If the .emacs.el was either in the repo or the url referenced in the
worg-setup.org file worked, that would help.


Org web pages are currently generated by SourceHut CI, have a look at 
.build.yml and publish.sh (the latter is actually elisp).


Browser developer tools show the name of CSS file where some rule is 
defined.


I had an idea with "X" labeled button (hidden checkbox for no-JS 
implementation) that collapses toolbar into hamburger. However I have 
enough items in my org-related backlog.






[BUG] worg-setup.org is outdated (was: [accessibility] worg obscures text)

2022-06-12 Thread Ihor Radchenko
Tim Cross  writes:

>> Patches are welcome! We just need someone with knowledge of html/css to
>> jump in and create a patch for https://git.sr.ht/~bzg/worg (BTW, also
>> see shiny new https://sr.ht/~bzg/org/).
>>
>
> Sadly, it isn't that simple. You also have to understand how worg does
> the publishing and that isn't easy. I just looked at the repository 
>
> - The .emacs.el file referenced in the worg-setup.org is not available
> (404 error)

Sorry. worg-setup.org is outdated. Bastien, could you update it?

The publishing is done using
https://git.sr.ht/~bzg/worg/tree/master/item/publish.sh
In the nutshell, it just iterates over .org files and runs html export.

> - The styles directory consists of a number of css files - not clear
>   which one is used. (I'm guessing the .emacs.el file might tell me such
>   details).

The default is /worg/style/worg.css
Alternatives are worg-zenburn.css and worg-classic.css. See the above
link.

> - You also need to know about org publish and how it works, not just be
>   familiar wiht html and css. 

Most likely, the problem is in the css files. worg.css has

/* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents {
z-index: 1;

Hope it helps.

Best,
Ihor



Re: Org Agenda Error

2022-06-12 Thread Michael Powe

hello,

Thank you for the followup. Yes, I should have mentioned that the date 
is correctly updated following the error. Very odd, considering the text 
of the error message.


Thanks.

mp

On 6/12/2022 13:46, Bhavin Gandhi wrote:

Hello Michael

On Sun, 12 Jun 2022 at 21:20, Michael Powe  wrote:

[MP] Error in post-command-hook (org-add-log-note): (error "Can’t expand minibuffer 
to full frame")
[MP] 10 repeater intervals were not enough to shift date past today.  Continue? 
(y or n) y

I have been seeing these with my repeating tasks recently, and took this
bug report as an opportunity to see if I can reproduce it with emacs -Q.

1. emacs -Q
2. Create test.org with following content

* TODO Repeating entry
SCHEDULED: <2022-05-01 Mon ++2d>

3. C-c C-t on the entry, shows the above error. And shifts the scheduled
date correctly.

This happens on the Org mode version bundled with Emacs 28.1
i.e. release_9.5.2-25-gaf6f12.
And with latest main: release_9.5.4-544-gae168d

--
Bhavin Gandhi (bhavin192) | https://geeksocket.in


--
"Do not neglect to do good, and to share what you have." - Hebrews 13:16a
Michael Powe
Naugatuck CT USA
po...@ctpowe.net




Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]

2022-06-12 Thread Tim Cross


Confirm.

I am able to reproduce this issue with 

GNU Emacs 28.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,
cairo version 1.16.0) of 2022-05-29

Org mode version 9.5.4 (9.5.4-gc02c0d @ 
/home/tim/.emacs.husky/straight/build/org/)

I also feel the manual page could be improved as it doesn't actually
mention setting the html-postamble to a string (that is only mentioned
in the variable docstring).

Pierre Balayé  writes:
> I am using html export feature for org files and I want to change the value 
> of html-postamble (see [doc]
> (https://orgmode.org/manual/HTML-preamble-and-postamble.html)).
>
> Here is the `index.org` file:
> ```
> #+title: Home
>
> Welcome
>
> #+options: html-postamble:"TESTSPACE"
> ```
>
> When I export with `M-x org-html-export-as-html` everything is all right and 
> I have the following at the end of the html produced
> buffer:
>
> ```html
> 
> TESTSPACE
> 
> ```
>
> But if I add a space:
> ```
> #+title: Home
>
> Welcome
>
> #+options: html-postamble:"TEST SPACE"
> ```
>
> it raises this error I cannot solve:
> `org-export--parse-option-keyword: End of file during parsing`
>
> Emacs  : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll 
> bars)
>  of 2022-05-10
> Package: Org mode version 9.4.4 (release_9.4.4 @ 
> /usr/local/share/emacs/27.2/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-html-format-inlinetask-function 
> 'org-html-format-inlinetask-default-function
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function 
> org-imenu-get-tree] 2]
> #[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-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
>  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-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
> org-babel-header-arg-expand)
>  org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS 
> WIDTH)"]
>  org-agenda-loop-over-headlines-in-active-region nil
>  org-occur-hook '(org-first-headline-recenter)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
>  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-odt-format-inlinetask-function 
> 'org-odt-format-inlinetask-default-function
>  org-export-before-parsing-hook '(org-attach-expand-links)
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-link-parameters '(("attachment" :follow org-attach-follow :complete
> org-attach-complete-link)
>   ("id" :follow org-id-open)
>   ("eww" :follow org-eww-open :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
> #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6
>  "\n\n(fn URL ARG)"]
> )
>   ("mailto" :follow
> #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6
>  "\n\n(fn URL ARG)"]
> )
>   ("https" :follow
> #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6
>  "\n\n(fn URL ARG)"]
> )
>   ("http" :follow
> #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6
>  "\n\n(fn URL ARG)"]
> )
>   ("ftp" :follow
> #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6

Re: [accessibility] worg obscures text

2022-06-12 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> I agree, that is pretty poor formatting and does not work well and will
>> never work well from an accessibility perspective.  
>
> Patches are welcome! We just need someone with knowledge of html/css to
> jump in and create a patch for https://git.sr.ht/~bzg/worg (BTW, also
> see shiny new https://sr.ht/~bzg/org/).
>

Sadly, it isn't that simple. You also have to understand how worg does
the publishing and that isn't easy. I just looked at the repository 

- The .emacs.el file referenced in the worg-setup.org is not available (404 
error)
- The styles directory consists of a number of css files - not clear
  which one is used. (I'm guessing the .emacs.el file might tell me such
  details). 
- You also need to know about org publish and how it works, not just be
  familiar wiht html and css. 
  
As it stands now, without the .emacs.el file (which I'm assuming
contains the org-publish-project-alist variable), you cannot do much or
work out how the styles are generated/applied, so you cannot fix this. 

If the .emacs.el was either in the repo or the url referenced in the
worg-setup.org file worked, that would help. 



clean up checklist

2022-06-12 Thread Samuel Wales
does there exist already any code to clean up checklists?  e.g. delete
all checked entries.  [or move them to a new entry and doneify that
entry.]  [i know you can sort to end, but demotion can keep them near
top.]

i am just hoping something exists already.  otherwise they are merely
wishlist fr at most.  this is not a major need.



Re: [accessibility] worg obscures text

2022-06-12 Thread Ihor Radchenko
Tim Cross  writes:

> I agree, that is pretty poor formatting and does not work well and will
> never work well from an accessibility perspective.  

Patches are welcome! We just need someone with knowledge of html/css to
jump in and create a patch for https://git.sr.ht/~bzg/worg (BTW, also
see shiny new https://sr.ht/~bzg/org/).

Best,
Ihor



Re: [accessibility] worg obscures text

2022-06-12 Thread Tim Cross


Samuel Wales  writes:

> on this page, i cannot read the rhs of paragraphs near the top because
> the menu and up home elements obscure the text.
> https://orgmode.org/worg/org-faq.html#keeping-local-changes-current-with-Org-mode-development
> .
>
> i use very large fonts.  i have latest esr firefox maximized to the
> large monitor.  an even larger monitor is not an option.
>
> this is probably a minor issue for me as i can probably use ublock to
> completely remove those elements.  of course that would mean not
> having those elements but that is ok if there is a table of contents
> in teh text.  i think there is not though.  also, o that particular
> patge i can scroll, read paragraph, scroll again.  so i am just
> reporting so that the issue is known.  i blieve i mentioned it yers
> ago but idk if it got notated.

I agree, that is pretty poor formatting and does not work well and will
never work well from an accessibility perspective.  




[BUG] demarcate block splits block even when outside of src-block

2022-06-12 Thread dalanicolai
 [9.5.4 (release_9.5.4 @ /usr/local/share/emacs/29.0.50/lisp/org/)]

When trying to create a new src-block via `M-x
org-babel-demarcate-block` immediately after a previous code block (only
empty lines in between), then the command behaves like when splitting a
src-block (inserting an #+end_src first, followed by a #+begin_src).

However, as the point is outside of the source block, according to the
docstring of the command, a new source block should be created.

As a comment, normally when creating a new source block, Emacs prompts
for the source block type. However, currently, when used as mentioned
here, the command automatically sets the type (because it tries to
split). I would say that is convenient behavior, so that effectively
only the order of the inserted lines should get reversed.

In any case, thanks for the amazing work!

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.34, cairo version 1.17.6)
 of 2022-06-12
Package: Org mode version 9.5.4 (release_9.5.4 @
/usr/local/share/emacs/29.0.50/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-export-before-parsing-hook '(org-attach-expand-links)
 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-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-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate
 org-babel-speed-command-activate)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
 org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
  ("id" :follow org-id-open)
  ("eww" :follow org-eww-open :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)
  ("doi" :follow org-link-doi-open :export
org-link-doi-export)
  ("file+sys") ("file+emacs")
  ("shell" :follow org-link--open-shell)
  ("news" :follow
#[514 "\301\300\302Q\"\207"
 ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
  ("mailto" :follow
#[514 "\301\300\302Q\"\207"
 ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
  ("https" :follow
#[514 "\301\300\302Q\"\207"
 ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
  ("http" :follow
#[514 "\301\300\302Q\"\207"
 ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
  ("ftp" :follow
#[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"]
 6 "\n\n(fn URL ARG)"]
)
  ("help" :follow org-link--open-help :store
org-link--store-help)
  ("file" :complete org-link-complete-file)
  ("elisp" :follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 )


Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-12 Thread Juan Manuel Macías
Hi, Rudolph, thanks for your comments,

Rudolf Adamkovič writes:

> Juan, hi!
>
> I do not understand the meaning of ASCII.  How will such comments look
> like?  Will they include at least the file name?  If so, those can
> contain Unicode characters, right?

The main motivation for proposing this new option is that when I choose
the ':comments org' option, all the Org metadata that is close to the
code block in my org file are 'preserved', so comments in the source
file are somewhat awkward to read (as simple comments). My idea is that
with this new option the comments pass as plain text, without property
drawers, keywords, etc.

For example, that a header like this:


* Variables
  :PROPERTIES:
  :foo:  var
  :END:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus.


does not pass to the source file like this:


;; Variables
;;   :PROPERTIES:
;;   :foo:  var
;;   :END:
;; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
;; hendrerit tempor tellus. Donec pretium posuere tellus.


but in this way:


;; Variables
;; ==
;; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
;; hendrerit tempor tellus. Donec pretium posuere tellus.


Best regards,

Juan Manuel



Re: [accessibility] worg obscures text

2022-06-12 Thread Rudolf Adamkovič
Samuel Wales  writes:

> so i am just reporting so that the issue is known.  i blieve i
> mentioned it yers ago but idk if it got notated.

A big +1 from me.  I struggle with this problem too.  The website
obscures its main content with the floating side-buttons, namely

- "Support via Liberapay",
- "UP",
- "HOME", and
- "Table of Contents".

I think, no chrome should ever cover the main text, no matter what font
size or screen size the user has to use.  The Emacs manual does the
right thing, for example.

Rudy
-- 
"Mathematics takes us still further from what is human into the region
of absolute necessity, to which not only the actual world, but every
possible world, must conform."
-- Bertrand Russell, 1902

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-12 Thread Rudolf Adamkovič
Juan Manuel Macías  writes:

> As usual, feedback and suggestions for this patch are greatly
> appreciated.

Juan, hi!

I do not understand the meaning of ASCII.  How will such comments look
like?  Will they include at least the file name?  If so, those can
contain Unicode characters, right?

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: Org Agenda Error

2022-06-12 Thread Bhavin Gandhi
Hello Michael

On Sun, 12 Jun 2022 at 21:20, Michael Powe  wrote:
> [MP] Error in post-command-hook (org-add-log-note): (error "Can’t expand 
> minibuffer to full frame")
> [MP] 10 repeater intervals were not enough to shift date past today.  
> Continue? (y or n) y

I have been seeing these with my repeating tasks recently, and took this
bug report as an opportunity to see if I can reproduce it with emacs -Q.

1. emacs -Q
2. Create test.org with following content

* TODO Repeating entry
SCHEDULED: <2022-05-01 Mon ++2d>

3. C-c C-t on the entry, shows the above error. And shifts the scheduled
   date correctly.

This happens on the Org mode version bundled with Emacs 28.1
i.e. release_9.5.2-25-gaf6f12.
And with latest main: release_9.5.4-544-gae168d

--
Bhavin Gandhi (bhavin192) | https://geeksocket.in



Re: [PATCH] New remote resource download policy

2022-06-12 Thread Daniel Fleischer
Timothy [2022-06-12 Sun 22:43] wrote:

> As was raised in the #+include: URL thread 
> (https://list.orgmode.org/877d5sd7yu@gmail.com), currently Org will
> automatically download files without confirmation in various circumstances. 
>
> This patch introduces two variables to control Org’s attitude towards 
> downloading files, and hooks them into the
> relevant parts of the codebase. 

Hi Timothy, looks very nice! I was also bothered by it, specifically in
the case of #+setupfile. Having a safe URI regexp list is a nice
addition, similar to `org-link-elisp-skip-confirm-regexp'. I'll
definitely give it a try.

-- 

Daniel Fleischer



Org Agenda Error

2022-06-12 Thread Michael Powe

Hello,

Not sure if this qualifies as a bug.

This occurred when discarding an agenda item that was more than 60 days 
overdue. (The repeater is 6 days.) I imagine most people take better 
care of their agenda. ;-)


TODO state changed to DISCARDED
TODO state changed to TODO
[MP] Error in post-command-hook (org-add-log-note): (error "Can’t expand 
minibuffer to full frame")
[MP] 10 repeater intervals were not enough to shift date past today.  
Continue? (y or n) y

Entry repeats: SCHEDULED: <2022-06-16 Thu ++6d>

The two items I initialed travel together. I got this message several times.

* Org mode version 9.5.4 (release_9.5.4-535-ged6f8d.dirty @ 
c:/Users/micha/AppData/Roaming/.emacs.d/org-new/org-mode/lisp/)


* GNU Emacs 29.0.50 (build 2, x86_64-w64-mingw32) of 2022-06-09

Thanks.

mp

--
"Do not neglect to do good, and to share what you have." - Hebrews 13:16a
Michael Powe
Naugatuck CT USA
po...@ctpowe.net


how to edit very long columnview tables

2022-06-12 Thread Uwe Brauer



Hi

For example if I have 

#+TBLFM: @2='(identity remote(pizarro,@>$$#));::@3='(identity
 remote(angulo,@>$$#));VERY VERY LONG

I can use org-edit-special 


But if I have on the other hand 

#+BEGIN: columnview :maxlevel 2  :skip-empty-rows t  :indent nil :hlines
 1  :format "VERY VERY LONG"

Then it seems there is now convenient way to edit this very very long
line.

Anybody knows about such a function?

Thanks

Uwe Brauer 

-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 




Re: from table to properties the inverse columview operation

2022-06-12 Thread Uwe Brauer

> Uwe Brauer  writes:

> I think it might be easier to do in awk than ELisp.  And I am better in
> Elisp than awk, but awk was made for almost exactly this sort of thing.

> Anyway, if some existing (Elisp) function exists for this, I would like
> to know about it as well[0].



It  does

 org-transform-tree-table/toggle 
 URL: https://github.com/jplindstrom/emacs-org-transform-tree-table

It is in melpa I think




-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 


smime.p7s
Description: S/MIME cryptographic signature


[PATCH] New remote resource download policy

2022-06-12 Thread Timothy
Hi All,

As was raised in the `#+include: URL' thread
(), currently Org will
automatically download files without confirmation in various circumstances.

This patch introduces two variables to control Org’s attitude towards
downloading files, and hooks them into the relevant parts of the codebase.

When prompting for downloading, this uses an approach borrowed from file local
variable confirmation.

All the best,
Timothy
>From 4f3437a2386e2ffdf37c99d476fa5ea3481b8d3c Mon Sep 17 00:00:00 2001
From: TEC 
Date: Sun, 12 Jun 2022 22:37:42 +0800
Subject: [PATCH] org: Add setting for remote file download policy

* lisp/org.el (org-download-remote-resources,
org-safe-remote-resources): Two new customisations to configure the
policy for downloading remote resources.
(org--should-fetch-remote-resource-p, org--safe-remote-resource-p,
org--confirm-resource-safe, org-download-remote-resources): Introduce
the new function `org--should-fetch-remote-resource-p' for internal use
determining whether a remote resource should be downloaded according to
the download policy.  This function makes use of two helper functions,
`org--safe-remote-resource-p' and `org--confirm-resource-safe'.
(org-file-contents): Apply `org--safe-remote-resource-p' to file
downloading.

* lisp/org-persist.el (org-persist-write): Apply
`org--safe-remote-resource-p' to url downloading.

* lisp/org-attach.el (org-attach-attach): Apply
`org--safe-remote-resource-p' to url downloading.
---
 lisp/org-attach.el  |   6 ++-
 lisp/org-persist.el |   5 +-
 lisp/org.el | 115 ++--
 3 files changed, 109 insertions(+), 17 deletions(-)

diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 5ee2b84b2..6f21ad716 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -525,7 +525,11 @@ (defun org-attach-attach (file  visit-dir method)
((eq method 'cp) (copy-file file attach-file))
((eq method 'ln) (add-name-to-file file attach-file))
((eq method 'lns) (make-symbolic-link file attach-file))
-   ((eq method 'url) (url-copy-file file attach-file)))
+   ((eq method 'url)
+(if (or (not noninteractive) (org--should-fetch-remote-resource-p file))
+(url-copy-file file attach-file)
+  (error "The remote resource %S is considered unsafe, and will not be downloaded."
+ file
   (run-hook-with-args 'org-attach-after-change-hook attach-dir)
   (org-attach-tag)
   (cond ((eq org-attach-store-link-p 'attached)
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 068f58cec..f49abe8cd 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -655,7 +655,10 @@ (defun org-persist-write:url (c collection)
  (format "%s-%s.%s" persist-file (md5 path) ext
 (unless (file-exists-p (file-name-directory file-copy))
   (make-directory (file-name-directory file-copy) t))
-(url-copy-file path file-copy 'overwrite)
+(if (org--should-fetch-remote-resource-p path)
+(url-copy-file path file-copy 'overwrite)
+  (error "The remote resource %S is considered unsafe, and will not be downloaded."
+ path))
 (format "%s-%s.%s" persist-file (md5 path) ext)
 
 (defun org-persist-write:index (container _)
diff --git a/lisp/org.el b/lisp/org.el
index 8e7aadde5..3a8acaa8f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1352,6 +1352,32 @@ (defcustom org-file-apps
 			(string :tag "Command")
 			(function :tag "Function")
 
+(defcustom org-download-remote-resources 'prompt
+  "The policy applied to requests to obtain remote resources.
+
+This affects keywords like #+setupfile and #+incude on export,
+`org-persist-write:url',and `org-attach-attach' in
+non-interactive Emacs sessions.
+
+This recognises four possible values:
+- t, remote resources should always be downloaded.
+- prompt, you will be prompted to download resources nt considered safe.
+- safe, only resources considered safe will be downloaded.
+- nil, never download remote resources.
+
+A resource is considered safe if it matches one of the patterns
+in `org-safe-remote-resources'."
+  :group 'org
+  :type '(choice (const :tag "Always download remote resources" t)
+ (const :tag "Prompt before downloading an unsafe resource" prompt)
+ (const :tag "Only download resources considered safe" safe)
+ (const :tag "Never download any resources" nil)))
+
+(defcustom org-safe-remote-resources nil
+  "A list of regexp patterns matching safe URIs."
+  :group 'org
+  :type '(list regexp))
+
 (defcustom org-open-non-existing-files nil
   "Non-nil means `org-open-file' opens non-existing files.
 
@@ -4466,21 +4492,25 @@ (defun org-file-contents (file  noerror nocache)
 (cond
  (cache)
  (is-url
-  (with-current-buffer (url-retrieve-synchronously file)
-	(goto-char (point-min))
-	;; Move 

Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]

2022-06-12 Thread Max Nikulin

On 11/06/2022 20:32, Ihor Radchenko wrote:

Ignacio Casso writes:


Then we should decide if we want to use autoload cookies for custom
variables to make this work also with lexical binding. Otherwise, code
like the snippet above would produce an error in Emacs 29, and in Emacs
27 the let binding would be ignored (although at least the custom setter
would work). I have no opinion regarding this last point since I don't
remember what were the disadvantages of using autoload cookies for
custom variables.


AFAIK, autoloading defcustoms is not discussed in the manual. I have no
idea about possible pitfalls as well.


I have impression that it is not encouraged, but Emacs sources have 
enough examples of such autoloading. I posted some links earlier in the 
discussion of this issue, see

Max Nikulin, Fri, 11 Mar 2022 17:07:03 +0700.
https://list.orgmode.org/c58ae4d5-dd66-0d06-a332-cfdf23e18...@gmail.com


LGTM! Unless others have objections, I am inclined to merge the patch
fully.


I see clear intention of improvement, but I have no particular opinion 
if the patch is risky. I worry a bit that some code related to this 
issue has changed in the development branch of Emacs, so I am unsure 
concerning behavior in earlier versions. I do not object committing the 
patch since it can be reverted later if some problem would arise.





Re: [BUG] Info JS does not work [9.5.3 (release_9.5.3-467-g2bd34e @ /Users/salutis/src/org-mode/lisp/)]

2022-06-12 Thread Bastien
Hi Ihor,

Bastien  writes:

> There is such a SourceHut project: https://sr.ht/~bzg/orgmode/

The sr.ht project is now on https://sr.ht/~bzg/org/ and lists all
relevant repositories, including a mirror of the official org-mode
repository at https://git.sr.ht/~bzg/org-mode.

-- 
 Bastien



Re: [PATCH] Support #+include-ing URLs

2022-06-12 Thread Timothy


Hi All,

> This is just a little patchset to treat #+include: URL the same way as
> #+setupfile: URL. All the usual #+include: bells and whistles
> (::*Heading, :lines, etc.) work as normal.

Since it's been a week and nobody has raised any objections to this
functionality (though it has provoked a proposed change to
org-file-contents), I'm going to tentatively merge this and prepare a
patch for org-file-contents to add download settings.

All the best,
Timothy



Re: [BUG] org-copy-subtree in a file with local variables marks buffer as modified [9.5.3 (release_9.5.3-6-gef41f3 @ /home/ignacio/repos/emacs/lisp/org/)]

2022-06-12 Thread Ignacio Casso

> buffer-modified-p is not the only parameter affected by juggling around
> the local variables. There will be undo history,
> buffer-chars-modified-tick, before/after-change-hooks triggered by
> `org-preserve-local-variables', etc.
>
> However, I do not see any obvious way how your proposed change can
> negatively affect all the above. Feel free to propose a patch.

I've written a patch proposal. It deals with buffer-modified-p and undo
history, but not the other two points you mention. I have tested it and
it works, but I had never dealt before with `buffer-undo-list' so maybe
there are some cases that I have not considered and for which this patch
could be problematic. Let me know what you think:

>From 14506bea13bf6278d95825257d90bbc3390ae8f1 Mon Sep 17 00:00:00 2001
From: Ignacio Casso 
Date: Sun, 12 Jun 2022 10:38:53 +0200
Subject: [PATCH] Do not mark buffer as modified with
 org-preserve-local-variables

* lisp/org-macs.el (org-preserve-local-variables): Do not mark buffer
as modified or alter `buffer-undo-list' when body does not actually
modify the buffer.

This commit fixes a bug with `org-copy-subtree', which marked the
buffer as modified and added an entry to the undo list when the visited
file had local variables.
---
 lisp/org-macs.el | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 19e5f42e9..64beeff53 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -163,16 +163,24 @@
 	  (org-with-wide-buffer
 	   (goto-char (point-max))
 	   (let ((case-fold-search t))
-	 (and (re-search-backward "^[ \t]*# +Local Variables:"
+	 (when (re-search-backward "^[ \t]*# +Local Variables:"
   (max (- (point) 3000) 1)
   t)
-		  (delete-and-extract-region (point) (point-max)))
+   (undo-boundary)
+	   (delete-and-extract-region (point) (point-max))
+ (tick-counter (buffer-modified-tick))
+ modified)
  (unwind-protect (progn ,@body)
(when local-variables
+ (setq modified (< tick-counter (buffer-modified-tick)))
 	 (org-with-wide-buffer
 	  (goto-char (point-max))
 	  (unless (bolp) (insert "\n"))
-	  (insert local-variables))
+	  (insert local-variables))
+ (unless modified
+   (set-buffer-modified-p nil)
+   (setq buffer-undo-list
+ (seq-drop-while 'identity buffer-undo-list)))
 
 (defmacro org-no-popups ( body)
   "Suppress popup windows and evaluate BODY."
-- 
2.25.1



Re: org-crypt ?

2022-06-12 Thread David Masterson
Tim Cross  writes:

> David Masterson  writes:
>
>> Tim Cross  writes:
>>
>>> David Masterson  writes:
>>>
 Tim Cross  writes:

> Warning: I have not used org-crypt for many years. These days, I just
> use a .org.gpg extensions and symmetrically encrypt the whole file.
> However, I think I can probably answer some of your questions -

 Hmm, two questions that this brings up:

 1. Do you access your files on (say) iPhone?
 2. Do you store your files in Git (say Github)?

>>>
>>> Well, yes and yes, but I don't tend to need to access encrypted files on
>>> iphone. I do have encrypted files in github. For example, I have a
>>> private repository of files I share across computers (Linux and macOS).
>>> Some of these files are gpg encrypted.
>>
>> Exactly the system I'm looking for! (or almost)
>>
>> I am already using (Emacs, Org, MaGit) on Linux, (BeOrg, Working Copy)
>> on the iPhone, and a Github private repository.  This is complicated to
>> the new user (like me w/ 42yrs [off and on] of Emacs usage), but Git has
>> saved me a number of times on resyncing if I change things on both
>> sides.  But I would like to use more encryption with this.  When it's
>> secure, I'd like to roll it out on my family's iPhones as well.
>>
>
> I suspect the challenge will be in getting gnuPG support on the iphone.
> I've never tried that and don't know if there is a gnuPG version for
> iphone. That would be the first thing I'd try to verify. If you can
> encrypt/decrypt on the iphone, it should be possible to handle the
> rest.

Ah, that's the "almost" that I'm still figuring out.  BeOrg can work
with symmetric encryption and org-crypt (perhaps also epa) which stores
the encrypted stuff as text in the Org file (therefore, fully Git
compatible).  I'll have to look at BeOrg more about asymmetric
encryption as well as full file encryption.

> The one problem you can run into with gpg files and git is that git can
> see those as binary files. The general 'rule of thumb' is that you don't
> put binary files into git. The thinking is that binary files are
> typically generated from some text file and it is the original source
> text which you would put into git. There are also some minor technical
> issues, mainly with large binary files, which make git somewhat
> inefficient.

> The big issue however is that by default, most git forges, like github,
> have a limit on the siace of binary files they will allow in git. That
> size is reasonably large, but there is a limit which I think you have to
> pay to have increased. I've not run into that limit with encrypted
> files, but have with PDFs and other formats I wanted to include in my
> git repo. 

Yeah, saw some discussion on that and shied away...

> Based on your desire to roll something out to your family, I would
> actually recommend a different route. There are some very good open
> source password managers out there. Many of them, for a very small fee
> (i.e. $12pa), will also provide a few Gb of encrypted file storage as
> well.

Been using free versions of KeePass w/ Cloud storage.  Very powerful on
Windows.  Reasonable elsewhere.

The family is relatively easy when I have a stable environment.  That
involves full documentation with key things encrypted. I'm not sure
about having them use BeOrg yet, though.

> What I find good with some of these is that provided you select the
> right one, you have full control over the encryption (so the server the
> provider uses has your data encrypted and only you have the key) and
> they usually have mobile device support. The big benefit is that the
> mobile clients will take care of the encryption/decryption bits.

I wanted to use Keybase (encrypted cloud-based Git) which would've
covered everything, but it seems to have been bought out and died.

-- 
David Masterson