Re: Suggestion: User-contributed use-cases on orgmode.org ?

2023-11-16 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>> In worg-about, it looks like the repo is ~bzg/worg on src.ht, but "worg"
>> doesn't come up in the project search on src.ht (but "org" does).  Is
>> the repo hidden (I don't have an account on src.ht yet -- perhaps
>> sourcehut should be explained a bit in worg-about).
>
> May you please provide more details?

I'll try. 

> Do you refer to ?

Yes.

> FYI, WORG is listed in "Repositories" right at https://sr.ht/~bzg/org/

I see no mention of "~bzg/org" in worg-about.  I think my lack of
experience for many years is showing -- I didn't think to click on the
~bzg/worg link which would've told me about ~bzg/org.  I assumed the
link was just telling me what to put on 'git clone'.  Perhaps that
should be explained a little more in worg-about.

What I did was go to sr.ht to see what it looked like and maybe sign up
for an account.  I followed the "More Projects" link and searched for
"~bzg/worg", but nothing came up.  However, searching for "org" did
bring up "~bzg/org".  Being out of practice, I was confused.

>>> Alternatively, perhaps the key element of "wiki" for some is "web
>>> accessible editing", in which case I wonder if using EmacsWiki would
>>> make sense.
>>
>> Duh! Why did I forget about EmacsWiki?!?  Web accessible editing is a
>> plus to allow organic growth to the wiki -- as long as some rules are
>> followed. Wikis allow easy undoing of page edits (if necessary) and (I
>> think) locking pages to be edited only by a few people (creator/admins).
>> There could be a talk page for suggesting additions to a use-case to
>> make it more flexible which the use-creator creator could test and
>> incoporate into the use-case (or just tag it as interesting).
>
> Currently, we prefer all the discussions, including discussions of WORG
> pages, to happen on this mailing list.

And I'm beginning to warm to WORG's approach.  I used FosWiki a long
time ago which is different.

> One interesting idea could be showing the comment threads right on the
> WORG pages, similar to
> https://isso-comments.de/
> https://staticman.net/
> https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963
> https://amnesiak.org/post/2021/01/30/hugo-blog-with-mastodon-comments-extended/

These each look interesting.

> Or we might consider https://git.sr.ht/~bzg/woof to automatically update
> WORG pages for appropriately marked mailing list threads.

Hmm. That sounds most interesting becuase it command line driven.
Perhaps a new mailing list should be created for this?

-- 
David Masterson



[BUG] JUSTIFYRIGHT does not justify to the right any more in ASCII export [9.7-pre (release_9.6.11-927-g819cd7 @ /home/grfz/src/org-mode/lisp/)]

2023-11-16 Thread Gregor Zattler

Dear org-mode developers,

this:



test-justify-right.org
Description: application/org

gives wrongly:

Table of Contents
─




left or right

with

Package: Org mode version 9.7-pre (release_9.6.11-927-g819cd7 @ 
/home/grfz/src/org-mode/lisp/)
on Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 
1.16.0)
 of 2023-11-02


while correctly this:

Table of Contents
─




   left or right

with
Org mode version 9.6.10 (release_9.6.10 @ 
/home/grfz/src/emacs-master--078cfe807295038fa321c9297e24de5145065622--2023-11-02T00-38+01-00/lisp/org/)
on the very same Emacs.


Git bisecting found
[69383dfc240a3be08cfb57d4f1d8727bbb0df902] org-ascii--current-justification: 
Use `org-element-lineage-map'

but I'm not sure this makes sense since the org-version
numbers went backwards when doing it.

HTH, Gregor


Re: bash source code block: problem after ssh commands

2023-11-16 Thread Matt
alaincochard alain.coch...@unistra.fr writes:

 > Yes.  (So I think that explains the 'no' above.) 

Thank you for clarifying.

 > Anyway, this gives me the opportunity to come back to the question of
 > whether or not there is a problem with emacs itself (like some people
 > here thought), and if some message should be sent to some emacs list.
 > Again my argument was that the 2 commands copy/yank'ed in an emacs
 > terminal don't work as expected, while they do if the same is done in
 > an X terminal.

Okay, I follow you now.

Yes, I agree with what others have said, it's related to Emacs (probably 
comint-mode).  It happens with M-x shell and *not* with M-x eshell.   It's hard 
to reproduce with M-x term because term-char-mode doesn't allow copy-paste.  
M-x with term-line-mode doesn' t print "bar".

 > I guess it is not important for Org, because workarounds have be
 > proposed, but I think if there is a problem with emacs it should be
 > reported, right?

I think it's worth reporting.  I'm headed to bed and can submit it tomorrow for 
you if you're not comfortable with doing it or don't have the time.

Here are the steps I followed to reproduce with M-x shell:

1. Copy the following two lines:

ssh $USER@localhost "echo foo>foo_file"
echo "bar"

2. Paste them into a shell (tested with xterm or xfce4-terminal) and press 
return
3. After entering the correct password, "bar" is echoed
4. Paste them into the buffer associated with M-x shell
5. After entering the correct password, "bar" is NOT echoed

Here are the steps I followed to reproduce with M-x term:

1. M-x term
2. C-c C-j to switch to term-line-mode
3. Copy the following two lines:

ssh $USER@localhost "echo foo>foo_file"
echo "bar"

4. Paste them into the buffer associated with M-x term
5. After entering the correct password, "bar" is NOT echoed



Re: bash source code block: problem after ssh commands

2023-11-16 Thread Alain . Cochard
Matt writes on Thu 16 Nov 2023 20:03:
 > 
 >   On Thu, 16 Nov 2023 10:30:59 +0100  Ihor Radchenko  wrote --- 
 > 
 >  > Or we can make use of TRAMP as we usually do to access remote
 >  > environment. IMHO, it is more reliable as TRAMP takes care about
 >  > arranging all the Elisp FS interaction to work on remote system.
 >  
 > Agreed.  Also, I wasn't aware TRAMP worked with shell block
 > evaluation.  That's nice.
 > 
 > Sure enough, these both work:
 > 
 > #+begin_src bash :results output :dir /ssh:user@localhost:/home/user 
 > :session *remote*
 > echo foo>foo_file
 > echo "bar"
 > #+end_src
 > 
 > #+begin_src bash :results output :dir /ssh:user@localhost:/home/user
 > echo foo>foo_file
 > echo "bar"
 > #+end_src
 > 
 > Of course, both calls happen on the remote.
 > 
 > I wonder, would this have helped Alain?

No (see below).

 > I'm admittedly a little confused about the original report,  
 > 
 > #+name: original-report
 > #+begin_src bash :results output
 > ssh coch...@fruc.u-strasbg.fr "echo foo>foo_file"
 > echo "bar"
 > #+end_src
 > 
 > Clearly, the ssh line is intended to happen on the remote server.
 > Was the echo "bar" intended to happen locally?

Yes.  (So I think that explains the 'no' above.)  Then I'm confused
about your confusion...

Anyway, this gives me the opportunity to come back to the question of
whether or not there is a problem with emacs itself (like some people
here thought), and if some message should be sent to some emacs list.
Again my argument was that the 2 commands copy/yank'ed in an emacs
terminal don't work as expected, while they do if the same is done in
an X terminal.

I guess it is not important for Org, because workarounds have be
proposed, but I think if there is a problem with emacs it should be
reported, right?

Thank you.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: bash source code block: problem after ssh commands

2023-11-16 Thread Matt


  On Thu, 16 Nov 2023 10:30:59 +0100  Ihor Radchenko  wrote --- 

 > Or we can make use of TRAMP as we usually do to access remote
 > environment. IMHO, it is more reliable as TRAMP takes care about
 > arranging all the Elisp FS interaction to work on remote system.
 
Agreed.  Also, I wasn't aware TRAMP worked with shell block evaluation.  That's 
nice.

Sure enough, these both work:

#+begin_src bash :results output :dir /ssh:user@localhost:/home/user :session 
*remote*
echo foo>foo_file
echo "bar"
#+end_src

#+begin_src bash :results output :dir /ssh:user@localhost:/home/user
echo foo>foo_file
echo "bar"
#+end_src

Of course, both calls happen on the remote.

I wonder, would this have helped Alain?

I'm admittedly a little confused about the original report,  

#+name: original-report
#+begin_src bash :results output
ssh coch...@fruc.u-strasbg.fr "echo foo>foo_file"
echo "bar"
#+end_src

Clearly, the ssh line is intended to happen on the remote server.  Was the echo 
"bar" intended to happen locally?

PS:  I've updated the WORG page for ob-shell with a :dir section 
(https://git.sr.ht/~bzg/worg/commit/0b85a4fcfe2fa5e6c1ac4edd3f664a8cc385fa54)



[BUG] error on org-add-note? [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]

2023-11-16 Thread brizly
hi there, 

i was in a java-project and [alt]-x "org-add-note", when the
warnings apperes an i should file bug, so here i am.

(I was not using this function for a long time, perhaps there is
missing a config for a folder?)

--
Greetings
brizly


Emacs  : GNU Emacs 29.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8)
 of 2023-09-24
Package: Org mode version 9.6.6 (release_9.6.6 @
/usr/share/emacs/29.1/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-directory "/home/brizly/Dokumente/fit/gtd"
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-download-file-format-function 'org-download-file-format-default
 org-log-done 'time
 org-fontify-done-headline nil
 org-twbs-format-drawer-function '(lambda (name contents) contents)
 org-startup-folded t
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-agenda-files '("/home/brizly/Dokumente/fit/gtd")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-
babel-header-arg-expand)
 org-default-notes-file "/home/brizly/Dokumente/fit/gtd/notes.org"
 org-export-async-init-file
"/home/brizly/.emacs.d/layers/+emacs/org/local/org-async-init.el"
 org-publish-timestamp-directory "~/.emacs.d/.cache/.org-timestamps/"
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-
function
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME
CONTENTS WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-
empty-lines
  org-cycle-optimize-window-after-visibility-change
org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-twbs-head "\n\n\n"
 org-modules '(org-habit ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-
gnus ol-info ol-irc ol-mhe ol-rmail ol-eww)
 org-image-actual-width nil
 org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-
major-mode-hook org-fold-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
 #[0 "\301\211\207" [imenu-create-index-function org-
imenu-get-tree] 2] flyspell-mode
 spacemacs/org-setup-evil-surround spacemacs/load-
yasnippet toc-org-enable org-download-enable
 dotspacemacs//prettify-spacemacs-docs spacemacs//evil-
org-mode org-eldoc-load
 spacemacs//init-company-org-mode company-mode)
 org-babel-load-languages '((restclient . t) (sql . t) (python . t)
(java . t) (js . t) (groovy . t) (calc . t)
(latex . t) (plantuml . t) (shell . t)
(http . t))
 org-id-locations-file "~/.emacs.d/.cache/.org-id-locations"
 org-twbs-format-inlinetask-function 'ignore
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _
CONTENTS)"]
 org-download-abbreviate-filename-function 'file-relative-name
 org-latex-format-headline-function 'org-latex-format-headline-default-
function
 org-confirm-shell-link-function 'yes-or-no-p
 org-present-mode-hook '(spacemacs//org-present-start)
 org-present-mode-quit-hook '(spacemacs//org-present-end)
 org-download-annotate-function 'org-download-annotate-default
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-
invisible
 org-plantuml-jar-path "/home/brizly/Downloads/plantuml.jar"
 org-odt-format-headline-function 'org-odt-format-headline-default-
function
 org-link-translation-function 'toc-org-unhrefify
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-tangle-lang-exts '(("latex" . "tex") ("emacs-lisp" . "el")
("elisp" . "el"))
 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-log-buffer-setup-hook '(spacemacs//org-note-mode)
 org-twbs-format-headline-function 'ignore
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-
command-activate)
 org-html-format-inlinetask-function 'org-html-format-inlinetask-
default-function
 org-clock-persist-file "~/.emacs.d/.cache/org-clock-save.el"
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-
default
 org-latex-prefer-user-labels t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
CONTENTS)"]
 org-confirm-babel-evaluate nil
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-
default-function
 org-persist-before-write-hook '(org-element--cache-persist-before-
write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-

org-agenda: setting face to an item by its tag/category/property

2023-11-16 Thread Ilya Chernyshov


Hi.

Is there a custom variable in org-agenda that allows to set a specific
face (or just foreground/background) for items with specific
property/tag/category?



Re: [PATCH] testing: Delete duplicate tests

2023-11-16 Thread Ilya Chernyshov
Ilya Chernyshov  writes:

> Sure, here it is. In the patch, I added a new file
> (testing/lisp/test-deduplicator.el) with a test that checks for
> duplicate forms (not just should, should-not, should-error macros) in
> all test files.

It also makes sense to add a test that searches for completely equal
`ert-deftest' definitions and tests with equal bodies, but different
names, as you already advised on Matrix. Any other thoughts?



Re: Suggestion: User-contributed use-cases on orgmode.org ?

2023-11-16 Thread Ihor Radchenko
David Masterson  writes:

> In worg-about, it looks like the repo is ~bzg/worg on src.ht, but "worg"
> doesn't come up in the project search on src.ht (but "org" does).  Is
> the repo hidden (I don't have an account on src.ht yet -- perhaps
> sourcehut should be explained a bit in worg-about).

May you please provide more details?
Do you refer to ?
FYI, WORG is listed in "Repositories" right at https://sr.ht/~bzg/org/

>> Alternatively, perhaps the key element of "wiki" for some is "web
>> accessible editing", in which case I wonder if using EmacsWiki would
>> make sense.
>
> Duh! Why did I forget about EmacsWiki?!?  Web accessible editing is a
> plus to allow organic growth to the wiki -- as long as some rules are
> followed. Wikis allow easy undoing of page edits (if necessary) and (I
> think) locking pages to be edited only by a few people (creator/admins).
> There could be a talk page for suggesting additions to a use-case to
> make it more flexible which the use-creator creator could test and
> incoporate into the use-case (or just tag it as interesting).

Currently, we prefer all the discussions, including discussions of WORG
pages, to happen on this mailing list. 

One interesting idea could be showing the comment threads right on the
WORG pages, similar to
https://isso-comments.de/
https://staticman.net/
https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963
https://amnesiak.org/post/2021/01/30/hugo-blog-with-mastodon-comments-extended/

Or we might consider https://git.sr.ht/~bzg/woof to automatically update
WORG pages for appropriately marked mailing list threads.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: bash source code block: problem after ssh commands

2023-11-16 Thread Ihor Radchenko
Matt  writes:

> So, rather than start a comint and then ssh from there, it's possible to let 
> Emacs start the subprocess, manage the ssh connection, and just read that.  
> Emacs makes a buffer from a network stream by calling start-process` using 
> `shell-file-name`.  `org-babel-shell-initialize` closes around 
> `shell-file-name` with whatever shell language is used.  Therefore, we could 
> provide header arguments to pass parameters and the destination to ssh.  

Or we can make use of TRAMP as we usually do to access remote
environment. IMHO, it is more reliable as TRAMP takes care about
arranging all the Elisp FS interaction to work on remote system.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at