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

2022-06-10 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> With this new value, comments are passed to the source file as plain
> text, without the org metadata (keywords, property drawers, etc.).
>
> As usual, feedback and suggestions for this patch are greatly appreciated.
>
> Best regards and happy weekend,

Thanks for the patch!
Wouldn't it be better to supply a customization for
org-babel-process-comment-text instead?

I do not feel that per-src-block control on the comment type makes much
sense here.

Best,
Ihor



Re: Proposal: 'executable' org-capture-templaes

2022-06-10 Thread Ihor Radchenko
Max Nikulin  writes:

>> so are we talking about menus then?  is there truly a need to make
>> /menu state/ persistent or yakshaveable?
>
> As soon as capture template is chosen, content is landed to the target 
> file and may be autosaved. I do not expect problems here.
>
> However if two org-protocol handlers are launched without specified 
> template then behavior of Org becomes confusing. I meant this case. 
> Currently reading key from minibuffer serves as a kind of 
> synchronization tool.
>
> Imagine what would happen if Emacs decided to show several capture menus 
> with keymap non-blocking interface in different virtual desktops. 
> Capture data should be saved somewhere till the user would discover 
> initially hidden menu.

Note that there is not much happening when capture menu is called. Only
the link is stored into link ting. Otherwise, no capture data is
altered. All the fragile staff is happening after selecting capture
template.

Best,
Ihor



Re: [PATCH v2] Bug: Indenting empty description list item leaves point at beginning of line [9.4.4]

2022-06-10 Thread Bodertz
After some quick testing, your patch seems to work as expected.  Thanks!



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> Ihor> Oops. It was not caught by tests. Fixed on main now. You can pull 
> the
> Ihor> latest main. The error should disappear.
>
> Working fine now, thanks. Doc patch attached (I have copyright
> assignment on file for Emacs).

Thanks!
Applied onto main via a8b32247d.
I amended the commit message adding quotes around function names (`symbol').

Best,
Ihor



Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-10 Thread Ihor Radchenko
Ryan Scott  writes:

> I believe I have addressed your feedback, Ihor.
> Attached is the latest version of the patch.
>
>- Merged latest master
>- :post is now handled correctly (verified with example of :post usage
>in the example at https://orgmode.org/manual/Results-of-Evaluation.html)
>- Added "(with quotes)" to help make the NEWS entry clearer
>- Changed the attach directory detection to use a string prefix check
>
> Let me know what you think.

Thanks for the updated patch!

> +  ((or '(:dir . attach) '(:dir . "'attach"))
> +   (unless (org-id-get)
> + (if (or noninteractive (y-or-n-p (format "Create ID for entry 
> \"%s\"?"
> +  (org-get-heading t t t 
> t
> + (org-id-get-create)
> +   (error "Can't attach to entry \"%s\". Entry has no ID"
> +  (org-get-heading t t t t
> +   (setq params (append
> + `((:dir . ,(org-attach-dir nil t))
> +   (:mkdirp . "yes"))
> + (assq-delete-all :dir (assq-delete-all :mkdir 
> params)

Note that entry does not need :ID: property to have an attachment dir.
There is also :DIR: property.

Also, it would be useful to add a test. See test-ob-core/dir-mkdirp in
testing/lisp/test-ob.el

Best,
Ihor



Re: org-crypt ?

2022-06-10 Thread Tim Cross


David Masterson  writes:

> I think I've gotten org-crypt working, but I think some things are not
> making sense (it might be just me):
>
> 1. I've set org-crypt-key to nil (symmetric encryption).
> 2. Can I use a different encryption key for each encrypted paragraph?
> 3. Does org-encrypt only ask for the key the first time?
> 4. Does org-decrypt only ask for the key the first time?
> 5. How do they know where to get the password when they don't ask?
> 6. Shouldn't org-crypt docs in org manual have examples?
> Does this make sense -- I think I'm messing something up.


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 -

> 2. Can I use a different encryption key for each encrypted paragraph?

According to the manual -


 
No, not with symmetric encryption. I think this can only work with
asymmetric encryption. 

If your using symmetric encryption, you typically just have one key for
all the data within the file. From the gnuPG perspective, this is just
encrypted text. It does not 'know' about different paragraphs. To have
different encryption with each paragraph, you would need to specify
different keys and there is no mechanism to do that with symmetric
encryption only asymmetric.

What is your use case where you need multiple symmetric encryption keys
in one file?

> 3. Does org-encrypt only ask for the key the first time?
> 4. Does org-decrypt only ask for the key the first time?

Well that can depend on your environment and how it is configured. These
days, most Linux desktops and macOS have a form of GPG Agent and/or
keyring (I'd assume similar wiht Windows, but don't use that platform).
Typically, these agents/keyrings are configured to cache passphrases for
a period of time. Sometimes, you can tell the keyring keys it has access
to without the passphrase provided your login key has been 'opened'. So
for example, the passwords for my imap accounts are in a gpg file and
I've told my keyring agent to always allow access to those keys (this
was an option in the passphrase dialogue box). 

I also think epa has support for caching of passphrases. Therefore, it
could be that Emacs is caching the key for you and it will keep it in a
session cache for a period of time or until the session is closed. 

One way to sort out where the caching is occurring might be to try
decrypting outside of Emacs just using gnupg. If it asks for the key but
does not ask when doing it within Emacs, then it is probably Emacs doing
the caching. 

> 5. How do they know where to get the password when they don't ask?

See above re: caching, keyrings and gpg agents.

> 6. Shouldn't org-crypt docs in org manual have examples?

Probably, though I don't know what else you would put in there which
isn't already there. Feel free to supply a PR or patch once you have
worked it out. However, as noted in the commentary section, org-crypt.el
is really a very light-weight wrapper around functions in epg.el, so
likely the first place to start when looking for documentation and
examples is the epa/epg/easyPG manual



Re: org-crypt ?

2022-06-10 Thread Ihor Radchenko
David Masterson  writes:

> I think I've gotten org-crypt working, but I think some things are not
> making sense (it might be just me):
>
> 1. I've set org-crypt-key to nil (symmetric encryption).
> 2. Can I use a different encryption key for each encrypted paragraph?

Yes. For each individual encrypted headline contents. Just enter
different passwords when queried to encrypt.

> 3. Does org-encrypt only ask for the key the first time?

No. Strictly speaking it may depend on you GnuPG config. Not by default.

> 4. Does org-decrypt only ask for the key the first time?

Depends on your GnuPG config. AFAIK, GnuPG will not cache keys by default.

> 5. How do they know where to get the password when they don't ask?

>From gpg-agent.

> 6. Shouldn't org-crypt docs in org manual have examples?

We can mention org-encrypt-entry/entries and org-decrypt-entry/entries.
Would it help?

Best,
Ihor



Re: idea for capture anywhere in x

2022-06-10 Thread Ihor Radchenko
Samuel Wales  writes:

> 2.
>
> in this thread i thought it would also be great to select text with
> mouse /in any running application in x/, then have selection be saved
> to an org entry.  this might be possible with the above possible
> solution, minus the url issue.

FYI, you can bind org-capture command in your WM and use %k in your
capture templates:

org-capture-templates is a variable defined in org-capture.el.
...
The template defines the text to be inserted.  Often this is an
Org mode entry (so the first line should start with a star) that
will be filed as a child of the target headline.  It can also be
freely formatted text.  Furthermore, the following %-escapes will
be replaced with content and expanded:
...
  %x  Content of the X clipboard.

Best,
Ihor



org-html-htmlize-generate-css not including org htmlize synthetic faces

2022-06-10 Thread Steve Downey
It's been a very long time since I generated a css stylesheet, so I can't
easily bisect this issue.

org-html-htmlize-generate-css used to generate a stylesheet that included
styles for faces that only existed as part of export, such as
.org-comment {
/* font-lock-comment-face */
color: #7F9F7F;
}

or

.org-variable-name {
/* font-lock-variable-name-face */
color: #DFAF8F;
}

But now it seems it's just generating definitions for faces that org itself
defines, rather than basically everything, just prefixed with "org-",
the htmlize-css-name-prefix.

Has anyone else seen this?


Re: [PATCH] Fix behavior of lambda default header arg vars

2022-06-10 Thread Ihor Radchenko
Matt Huszagh  writes:

>> It would help if closure part and multi-variable part were split into
>> separate paragraphs.
>
> The closure part and muliple header argument part are already in
> separate paragraphs. The multiple header argument part, however, is
> incorporated into an introductory paragraph that very briefly describes
> the value syntax of org-babel-default-header-args and the types of alist
> values it supports. I did this because that introductory information is
> short and simple and so I felt it acceptable to incorporate the multiple
> header argument information. I don't feel this places a significant
> intellectual burden on the reader to follow, but I'm happy to insert a
> newline before "Some header arguments..." if you'd prefer.

Yes, please. And also move the multiple header arg parts below the
closure example.

>> Are you saying that _only some_ backends support multiple vars? Are
>> there backends that do not support?
>
> I think you're confused about "(e.g., :var for some language backends)":
>
> It's been a while since I created this patch and I don't remember
> exactly why I wrote it this way. I think it was based on the belief that
> not all language backends support variable passing in header arguments,
> though I honestly couldn't tell you at the moment whether this is
> true. In that vein, a semantically equivalent way to write this would be
> "(e.g., :var for language backends that support it)". Maybe all language
> backends support variable header arguments, in which case "(e.g., :var)"
> could be used here instead. In any case, the "some language backends"
> part of the phrase is not a qualification of "multiple", but of
> "variables". Nor is it correct to read it this way, as the statement is
> grammatically clear and correct. An equivalent statement would be:
>
> """
> Some header arguments can be provided multiple times for a source
> block. An example of such a header argument is :var.
> """

This looks slightly better. Though after reading your reply and
reviewing the docstring, I realize that my confusion partially came from
the fact that your patch is about closures, while the docstring change
is not.

Could you split that patch in two parts: one for the docstring change
and one for the :var parameter handling?

>> Also, the example is not helpful here.
>
> The example *is* helpful. It provides explicit direction for how to
> handle the non-obvious case of header arguments that can be passed
> multiple times, which isn't described much in the documentation.

Agree. See my above explanation about the source of confusion.

Best,
Ihor



Re: org-capture firefox extension broken [silently]

2022-06-10 Thread Max Nikulin

On 11/06/2022 08:43, Samuel Wales wrote:

On 6/10/22, Max Nikulin wrote:

- Have you tried to check that org-protocol still works on your system?
xdg-open 'org-protocol:/org-capture?url=something'


i ran this from emacs shell mode bash cli as user.  it brought firefox
to fg, opened a new tab, and the tab has a search page in my default
search engine that says "org-protocol:/org-capture?url=something" in
the search box.  is that correct?


First of all, I recommend to run such command in a terminal application 
instead of Emacs. I do not remember which of Emacs shell modes executes 
commands asynchronously (eshell?), so xdg-open fails e.g. for Gnome or 
KDE. Having fluxbox you should be affected in less degree. Another point 
is that when shell running emacsclient is associated with a terminal 
then emacs might try to create a frame inside this terminal. I am unsure 
concerning your preferences for capture windows, but it is better to 
factor out Emacs as shell here.


Actually you have found the source of the problem. A handler for 
org-protocol is not configured in your environment, so xdg-open falls 
back to a browser and firefox falls back to search engine. It is not a 
problem of the browser add-on.



Prevented navigation to 
“org-protocol://capture?template=p=https%3A%2F%2Fplanet.emacslife.com%2F=Planet%20Emacslife=This%20month”
 due to an unknown protocol.


"unknown protocol" confirms the conclusion.

Check that the ~/.config/mimeapps.list (or maybe 
~/.local/share/applications/mimeapps.list) file contains the following 
sections and entries therein (unsure exact name of your desktop file)


[Added Associations]
x-scheme-handler/org-protocol=org-protocol.desktop;
[Default Applications]
x-scheme-handler/org-protocol=org-protocol.desktop;

Or ~/.local/share/applications/mimeinfo.cache has
[MIME Cache]
x-scheme-handler/org-protocol=org-protocol.desktop;

I just have realized that for kde-open5 it is enough to have 
mimeinfo.cache entry. Gnome without "Default Application" entry shows 
its own application selection dialogue. When there is no handlers like 
kde-open5 specific to desktop environment, xdg-open may scan .desktop 
files. It seems, you have some problem with your .desktop file for 
org-protocol. Check that you have it in ~/.local/share/applications/ and 
try the command specified in the Exec field in a terminal (with some 
org-protocol URI).


An entry in ~/.local/share/applications/mimeinfo.cache is usually created by
update-desktop-database ~/.local/share/applications
and entries to ~/.config/mimeapps.list may be added by
xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol
or something like
xdg-settings set default-url-scheme-handler org-protocol 
org-protocol.desktop

The latter actually calls the former. To check that files are updated:
xdg-mime query default x-scheme-handler/org-protocol
xdg-settings get default-url-scheme-handler org-protocol

If it is still broken then it is time to inspect output of
sh -x /usr/bin/xdg-open 'org-protocol:/org-capture?url=something'


- Have you tried to create a html page with an org-protocol link and to
click on it?


no clue what i would do to do that.


For example, create an org file with some link, export it as HTML, edit 
the result to use the URI from "Prevented navigation" error in href="..."> and open this html file in Firefox. Using org-protocol URI 
as link target in an org file is possible as well, but additional setup 
may be required to avoid treating it as unknown target.


By the way, https://github.com/sprig/org-capture-extension/ has some 
instructions. They are not perfect, but they are still in some points 
better than worg page for org-protocol.





Re: org-capture firefox extension broken [silently]

2022-06-10 Thread Samuel Wales
i did f12, selected text with mouse, clicked on unicorn icon, and this appeared:

> Prevented navigation to 
> “org-protocol://capture?template=p=https%3A%2F%2Fplanet.emacslife.com%2F=Planet%20Emacslife=This%20month”
>  due to an unknown protocol.


On 6/10/22, Samuel Wales  wrote:
> thank you for repllies.  more below.
>
> i will reply to rest of message when can, but wanted to give the
> answers.  [n.b. i still have drafts on other things because it takes
> me long time to do things but they are there.]
>
> On 6/10/22, Max Nikulin  wrote:
>> - Have you tried to check that org-protocol still works on your system?
>>xdg-open 'org-protocol:/org-capture?url=something'
>
> i ran this from emacs shell mode bash cli as user.  it brought firefox
> to fg, opened a new tab, and the tab has a search page in my default
> search engine that says "org-protocol:/org-capture?url=something" in
> the search box.  is that correct?
>
> [idk if relevant, but after the rebooting, deluge also broke; it
> stopped running the correct bash script upon rclick open on a file.
> idk why.  somebody suggested i run xdg-mime with a coupld of commans
> for a video fie but xdg-open still fails to call what i set [it calls
> a video player when run on that type of file] and deluge is still
> broken [called broken video players until i uninstalled them, een
> after i did the xdg-mime thing, and now calls the same video player].
> i find that xdg-open, mime, and file associations are too complex for
> me, do the wrong thing, stop working.]
>
>> - Have you checked what action is set for org-protocol in Firefox
>> settings page about:preferences "Applications" section?
>
> org-protocol is there.  strangely it says "always ask" even though
> clicking on the org-capture unicorn does not ask.  the icon looks like
> a page with a dog-ear.  there is nothing indicating what action is
> set.  double clicking does nothing.  rclick oes nothing.  i undid the
> tst sidebar and turned on js and still see no action listed.
>
>> - Have you tried to create a html page with an org-protocol link and to
>> click on it?
>
> no clue what i would do to do that.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: org-capture firefox extension broken [silently]

2022-06-10 Thread Samuel Wales
thank you for repllies.  more below.

i will reply to rest of message when can, but wanted to give the
answers.  [n.b. i still have drafts on other things because it takes
me long time to do things but they are there.]

On 6/10/22, Max Nikulin  wrote:
> - Have you tried to check that org-protocol still works on your system?
>xdg-open 'org-protocol:/org-capture?url=something'

i ran this from emacs shell mode bash cli as user.  it brought firefox
to fg, opened a new tab, and the tab has a search page in my default
search engine that says "org-protocol:/org-capture?url=something" in
the search box.  is that correct?

[idk if relevant, but after the rebooting, deluge also broke; it
stopped running the correct bash script upon rclick open on a file.
idk why.  somebody suggested i run xdg-mime with a coupld of commans
for a video fie but xdg-open still fails to call what i set [it calls
a video player when run on that type of file] and deluge is still
broken [called broken video players until i uninstalled them, een
after i did the xdg-mime thing, and now calls the same video player].
i find that xdg-open, mime, and file associations are too complex for
me, do the wrong thing, stop working.]

> - Have you checked what action is set for org-protocol in Firefox
> settings page about:preferences "Applications" section?

org-protocol is there.  strangely it says "always ask" even though
clicking on the org-capture unicorn does not ask.  the icon looks like
a page with a dog-ear.  there is nothing indicating what action is
set.  double clicking does nothing.  rclick oes nothing.  i undid the
tst sidebar and turned on js and still see no action listed.

> - Have you tried to create a html page with an org-protocol link and to
> click on it?

no clue what i would do to do that.



Help with assigning org-attach-id-dir using directory local variables

2022-06-10 Thread Alen Alex Ninan

Hi All,

I use org-attach to copy and attach images in my org-mode notes. I would 
like to assign org-attach-id-dir using directory local variable. Please 
find the statements I use in directory local file to define my org-roam 
directory and org-attach-id-dir below for reference.



Directory local configuration:

((nil . ((eval . (setq-local
  org-roam-directory (expand-file-name 
(locate-dominating-file

default-directory ".dir-locals.el"
 (eval . (setq-local
  org-roam-db-location (expand-file-name "org-roam.db"
org-roam-directory)))
 (eval . (setq-local
  org-attach-id-dir (expand-file-name "attachments"
org-roam-directory)))
 )))


My Emacs and Org-mode configuration:

Org: 9.6

Emacs: 28.1 (Doom Emacs)


The org-mode file opened from this directory respects the attachment 
location defined in directory local variable when display of inline 
images during start-up is disabled. Org mode displays the attachments 
once the org file is open, and I toggle display of inline image. The 
same files throw an error when I open the file with inline images 
enabled at startup.


1. Have I made an error in how I define the directory local file?

2. If I have not made and error, Is it possible to define the attachment 
directory in directory local variable and have org mode respect the 
location when display of inline images are enabled during startup?


3. If I did make an error, do you have any recommendation on how I can 
resolve this?


I am new to Emacs, and I am not good at Emacs Lisp currently. It's 
something I am trying to learn. Any suggestions or recommendation would 
help. I am open to testing this out in stock Emacs if that's something 
that will help.



Thanks & Regards,

Alen Alex




Re: [External] : Re: C-S left no longer shifts date entry?

2022-06-10 Thread Ihor Radchenko
Daniel Ortmann  writes:

> Ok!  I am on the track of it.  After stripping out all of my org-mode 
> customization settings the S-left and S-right once again work.

You may find https://github.com/Malabarba/elisp-bug-hunter useful.
Also, see
https://open.tube/videos/watch/4d819114-43bf-42df-af94-f94fc53dd0d9
for an example of usage.

Best,
Ihor



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

2022-06-10 Thread Juan Manuel Macías
Hi,

With this new value, comments are passed to the source file as plain
text, without the org metadata (keywords, property drawers, etc.).

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

Best regards and happy weekend,

Juan Manuel

>From 414e0b3a18abca34bc47f07e55debec0910d4728 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias 
Date: Fri, 10 Jun 2022 20:12:37 +0200
Subject: [PATCH] lisp/ob-tangle.el: add the `ascii' value to the `comments'
 head. arg.

* (org-babel-tangle-single-block): With the value ascii the comments
are passed as plain text. This is useful for removing all org
metadata from the source file's comments.
---
 lisp/ob-tangle.el | 53 ---
 1 file changed, 36 insertions(+), 17 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 6685a1599..aed241416 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -525,23 +525,42 @@ non-nil, return the full association list to be used by
 	  (run-hooks 'org-babel-tangle-body-hook)
 	  (buffer-string
 	 (comment
-	  (when (or (string= "both" (cdr (assq :comments params)))
-		(string= "org" (cdr (assq :comments params
-	;; From the previous heading or code-block end
-	(funcall
-	 org-babel-process-comment-text
-	 (buffer-substring
-	  (max (condition-case nil
-		   (save-excursion
-			 (org-back-to-heading t) ; Sets match data
-			 (match-end 0))
-		 (error (point-min)))
-		   (save-excursion
-		 (if (re-search-backward
-			  org-babel-src-block-regexp nil t)
-			 (match-end 0)
-		   (point-min
-	  (point)
+	  (cond ((or (string= "both" (cdr (assq :comments params)))
+		 (string= "org" (cdr (assq :comments params
+		 ;; From the previous heading or code-block end
+		 (funcall
+		  org-babel-process-comment-text
+		  (buffer-substring
+		   (max (condition-case nil
+			(save-excursion
+			  (org-back-to-heading t) ; Sets match data
+			  (match-end 0))
+			  (error (point-min)))
+			(save-excursion
+			  (if (re-search-backward
+			   org-babel-src-block-regexp nil t)
+			  (match-end 0)
+			(point-min
+		   (point
+		((string= "ascii" (cdr (assq :comments params)))
+		 ;; From the previous heading or code-block end
+		 (let ((org-babel-process-comment-text
+			(lambda (str)
+			  (org-export-string-as str 'ascii t
+		   (funcall
+		org-babel-process-comment-text
+		(buffer-substring
+		 (max (condition-case nil
+			  (save-excursion
+(org-back-to-heading t) ; Sets match data
+(match-beginning 0))
+			(error (point-min)))
+			  (save-excursion
+			(if (re-search-backward
+ org-babel-src-block-regexp nil t)
+(match-beginning 0)
+			  (point-min
+		 (point)))
  (src-tfile (cdr (assq :tangle params)))
 	 (result
 	  (list start-line
-- 
2.36.1



[BUG] ob-shell: cmdline and stdin broken when used with TRAMP

2022-06-10 Thread Felix Freeman
When using TRAMP, ob-shell's :cmdline and :stdin header options are
broken on org-babel.

I've noticed that when those options are present, it takes other route
on ob-shell.el, but I lack the proper background to fix or debug it
further.

Probably cmdline is more complicated to get working right, but stdin
seems to do most things just fine (it creates the file within the remote
part) but isn't able to read it when needed.

I'm attaching:

- A file to test the functionality: test-tramp.org
- The backtrace: backtrace.el
- Emacs generated "current state": current-state.el

Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.17.6)
 of 2022-04-27
Package: Org mode version 9.5.4 (release_9.5.4-521-g1105da.dirty @ 
/home/me/src/org-mode/lisp/)

Felix Freeman
#+name: input
tramp

* Works

#+begin_src sh :stdin input
  read -r who
  echo "hello $who"
#+end_src

#+begin_src sh :dir /ssh:user@host:
  who=tramp
  echo "hello $who"
#+end_src

* Fails

#+begin_src sh :dir /ssh:user@host: :stdin input
  read -r who
  echo "hello $who"
#+end_src
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function '(closure
   (org-id-locations
org-agenda-search-view-always-boolean
org-agenda-overriding-header t)
   (entry) (cdr (assq :title entry)))
 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-archive-hook '(org-attach-archive-delete-maybe)
 org-file-apps '(("\\.png\\'" . "setsid -w xdg-open %s") (auto-mode . emacs)
 (directory . emacs) ("\\.mm\\'" . default)
 ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-cycle-optimize-window-after-visibility-change)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '((closure
  (org--rds reftex-docstruct-symbol org-element-greater-elements
   visual-fill-column-width org-clock-history
   org-agenda-current-date org-with-time org-defdecode org-def
   org-read-date-inactive org-ans2 org-ans1
   org-columns-current-fmt-compiled org-clock-current-task
   org-clock-effort org-agenda-skip-function
   org-agenda-skip-comment-trees org-agenda-archives-mode
   org-end-time-was-given org-time-was-given org-log-note-extra
   org-log-note-purpose org-log-post-message
   org-last-inserted-timestamp org-last-changed-timestamp
   org-entry-property-inherited-from org-blocked-by-checkboxes
   org-state org-agenda-headline-snapshot-before-repeat
   org-agenda-buffer-name org-agenda-start-on-weekday
   org-agenda-buffer-tmp-name org-priority-regexp
   org-mode-abbrev-table org-mode-syntax-table
   org-element-use-cache org-element-cache-persistent
   buffer-face-mode-face org-tbl-menu org-org-menu
   org-struct-menu org-entities org-last-state
   org-id-track-globally org-clock-start-time texmathp-why
   remember-data-file org-agenda-tags-todo-honor-ignore-options
   iswitchb-temp-buflist align-mode-rules-list org-emphasis-alist
   org-emphasis-regexp-components org-export-registered-backends
   org-modules crm-separator org-babel-load-languages
   org-id-overriding-file-name org-indent-indentation-per-level
   org-element--timestamp-regexp
   org-element-cache-map-continue-from
   org-element-paragraph-separate org-agenda-buffer-name
   org-inlinetask-min-level t)
  nil
  (add-hook 'change-major-mode-hook 'org-fold-show-all 'append
   'local)
  )
 (closure
  (org-src-window-setup *this*
   org-babel-confirm-evaluate-answer-no
   org-babel-tangle-uncomment-comments
   org-src-preserve-indentation org-src-lang-modes
   org-edit-src-content-indentation org-babel-library-of-babel t)
  nil
  (add-hook 'change-major-mode-hook #'org-babel-show-result-all
   'append 'local)
  )
 org-babel-result-hide-spec org-babel-hide-all-hashes
 (closure
  (org-agenda-skip-regexp org-fold-core-style
   

Re: org-capture firefox extension broken [silently]

2022-06-10 Thread Bhavin Gandhi
On Thu, 9 Jun 2022 at 02:45, Samuel Wales  wrote:
>
> i really like and rely on the org-capture extension for firefox.  it
> has worked for years.  i was never able to get manual installation of
> org-protocol and bookmarklets to work, so this extension has been
> extremely useful.[*]
>
> however, upon an upgrade and a reboot in a security-supported debian,
> text no longer appears in org.
>
> the extension does flash its large "captured" notification, suggesting
> to the user [me] that something did work.  i used to rely on that to
> know it was captured, but now i do not know what it is a reliable
> indicator of.

I use it too, and it seems to be working fine on my machines. I have
everything setup as given here
https://github.com/sprig/org-capture-extension

Here are the versions on my system:
Firefox 100.0.2
Emacs 28.1
Org mode 9.5.2
Org Capture 0.2.1

In the Preferences of the extension, I have "Use New-Style links?"
turned on.

> there is a debug option but idk where hte console is in firefox.

I was able to see the logs:
1. I turned on Debug, hit the save button.
2. Then I visited https://orgmode.org
3. Hit F12, and then select the "Console" tab.
4. Gear icon > Persist Logs
5. While the webpage was active, I did Ctrl+Shift+L (the shortcut I
use for Org Capture).
6. I was able to see a log line in the console:
Capturing the following URI with new org-protocol:
org-protocol://capture?template=L=https%3A%2F%2Forgmode.org%2F=Org%20mode%20for%20Emacs=

Can you try to open the above org-protocol:// link as suggested by Max.
-- 
Regards,
Bhavin Gandhi (bhavin192) | https://geeksocket.in



Re: Proposal: 'executable' org-capture-templaes

2022-06-10 Thread Max Nikulin

On 07/06/2022 10:09, Samuel Wales wrote:

i must be confused.  menus aside, you can currently capture and it
uses the org forest itself, so it is both crash-proof and snappy.  and
you can yakshave as much as you want, starting a capture while doing a
capture.  those were design goals.

you can even be in the middle of a capture, get distracted, navigate
around your forest, and find where you are in the middle of a capture.
goes with the original crash-proof and yakshave and snappy
use-original-buffer design goal.

so are we talking about menus then?  is there truly a need to make
/menu state/ persistent or yakshaveable?


As soon as capture template is chosen, content is landed to the target 
file and may be autosaved. I do not expect problems here.


However if two org-protocol handlers are launched without specified 
template then behavior of Org becomes confusing. I meant this case. 
Currently reading key from minibuffer serves as a kind of 
synchronization tool.


Imagine what would happen if Emacs decided to show several capture menus 
with keymap non-blocking interface in different virtual desktops. 
Capture data should be saved somewhere till the user would discover 
initially hidden menu.


For me applications spread over 4 virtual desktops and more than one 
emacs frame is a usual case. I have not realized yet exact conditions 
when capture buffer appears in the frame other than one displayed on the 
active virtual desktop.





Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links

2022-06-10 Thread Max Nikulin

On 07/06/2022 00:47, Bhavin Gandhi wrote:

On Mon, 6 Jun 2022 at 19:09, Max Nikulin  wrote:

P.P.S. I had a hope that recent Fedora-36 release has Emacs-28 packaged,
so it would be possible to test live image in qemu to quickly check
behavior in full-fledged desktop environment, but version 27 is really
packaged there.


I think we will have Emacs 28 in Fedora 37 (that's because major changes
are not introduced in beta/released versions)[1].


I have noticed your activity in search results but finally I decided to 
revive existing minimal LXC container with Arch.



I can test the Emacs 28 + Fedora 36 combination, if you give me steps to
perform. Sorry, I don't have full context on how MIME type stuff applies
to Org mode etc., so I can try the steps and report back the behavior.


Thank you for offering a hand. Actually there are too many variables to 
ask for particular actions. I was trying various functions and stepping 
through them in debugger having side by side windows of Emacs-26 from 
Ubuntu-20.04 and Emacs-28 from ArchLinux (Emacs-27 has a bug in 
mailcap.el rather serious in this case). Content of /etc/mime.types 
(e.g. shell script definitions) and /etc/mailcap (presence of */* less 
%s) varies in Linux distributions, `mailcap-mime-apps' is not the only 
map of handlers withing Emacs, `org-open-file' uses `auto-mode-alist' 
and `org-file-apps'...


It is even more off-topic here, but since packaging Emacs for next 
Fedora has been mentioned, I have another question. To test my patches 
for Org I have LXC containers with various versions of Ubuntu and 
installing Emacs there pulls reasonable amount of X11 libraries. Several 
months ago I tried to install Emacs in a Fedora-35 container. I gave up 
because of enormous amount of requirements including wayland, libraries 
related to hardware acceleration and maybe even drivers. Often I do not 
mount /dev/dri inside containers, so a lot of packages were completely 
useless for me. Amount of required libraries in Arch is not so huge.





Re: Ambiguity in commit message conventions for org

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 23:11:09 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
Ihor> See https://orgmode.org/worg/org-contribute.html
>> 
>> Those conventions are slightly different than Emacs', with one point
>> of ambiguity. They say
>> ...
>> 
>> The summary line contains the 'lisp' directory, but the ChangeLog entry
>> doesnʼt, and in the example just after itʼs the other way around:

Ihor> You are right. The example is indeed a bit confusing. The main
Ihor> difference between Emacs' and Org's converntions is in summary line. 
We
Ihor> are less formal about and prefer shorter summaries. You can drop the
Ihor> directory or even file name if it saves space and does not create
Ihor> amiguity.

Emacs convention is to not mention the file name in the summary,
unless itʼs a one-file change, in which case you put the filename with
'* ' prepended (although some contributors prefer not to do that).

I went for 'dir/filename' in the summary, since Iʼm lazy and can copy
that from the ChangeLog commit message :-)

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 23:03:38 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
>> Ok. I will, or rather I would, but Iʼm obviously doing something wrong
>> when building org:
>> 
>> Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
>> org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658

Ihor> Oops. It was not caught by tests. Fixed on main now. You can pull the
Ihor> latest main. The error should disappear.

Working fine now, thanks. Doc patch attached (I have copyright
assignment on file for Emacs).

Thanks

Robert
-- 


>From 5437667a97dcd03a2993bfde93b0253590fae74a Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Fri, 10 Jun 2022 17:53:12 +0200
Subject: [PATCH] doc/org-manual.org: Reference org-cyclic and org-block

* doc/org-manual.org (Footnotes): Add org-cyclic and org-block to note
about org diary functions.  Add function indices for org-{date,
anniversary, cyclic, block}.
---
 doc/org-manual.org | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 32a45f884..d560562c5 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22046,6 +22046,10 @@ * Footnotes
 However, any date inserted or modified by Org adds that day name, for
 reading convenience.
 
+#+findex: org-date
+#+findex: org-anniversary
+#+findex: org-cyclic
+#+findex: org-block
 [fn:60] When working with the standard diary expression functions, you
 need to be very careful with the order of the arguments.  That order
 depends evilly on the variable ~calendar-date-style~.  For example, to
@@ -22053,10 +22057,11 @@ * Footnotes
 =(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date
 2005 12 1)=, depending on the settings.  This has been the source of
 much confusion.  Org mode users can resort to special versions of
-these functions like ~org-date~ or ~org-anniversary~.  These work just
-like the corresponding ~diary-~ functions, but with stable ISO order
-of arguments (year, month, day) wherever applicable, independent of
-the value of ~calendar-date-style~.
+these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic, and
+~org-block~.  These work just like the corresponding ~diary-~
+functions, but with stable ISO order of arguments (year, month, day)
+wherever applicable, independent of the value of
+~calendar-date-style~.
 
 [fn:61] See the variable ~org-read-date-prefer-future~.  You may set
 that variable to the symbol ~time~ to even make a time before now
-- 
2.35.1.607.gf01e51a7cf



Re: Org Column in Thunderbird

2022-06-10 Thread Ihor Radchenko
You dropped Org ML from the CC. Was it intentional?

Max Nikulin  writes:

> On 10/06/2022 20:11, Ihor Radchenko wrote:
>> I imagine browser URLs could also indicate if they have associated Org
>> notes. Or pdfs.
>
> It seems, most of PDF viewers do not allow decorations added by users. 
> Even built-in viewers in browsers displays document as privileged 
> content inaccessible by extensions. A kind of workaround is loading of 
> the same pdf.js to a regular page, but it is not really convenient. I am 
> unsure concerning security issues when pdf.js is bundled into an add-on.

AFAIK, https://web.hypothes.is/demos/ somehow works with PDFs in browsers.

>> Also, did you announce this anywhere outside Org ML?
>
> I have no idea where I should announce it since currently it is useful 
> mostly with Org mode. Unsure if e.g. API of Joplin app will allow to get 
> all links of certain kind in all notes.

/r/orgmode I guess.

> Also I am afraid that I may broke something in Thunderbird internals. It 
> has some code for custom columns but docs are rather scarce, so I am 
> unsure if I implemented it properly. It is a reason to take a pause and 
> to wait if my profile would turn into unusable state.

Part of the benefit of the announcement could be having a feedback and
people trying and reporting if you actually broke something :)
Of course, it does make sense to test things locally first and catch the
most obvious issues.

Best,
Ihor



Re: Ambiguity in commit message conventions for org

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> Ihor> See https://orgmode.org/worg/org-contribute.html
>
> Those conventions are slightly different than Emacs', with one point
> of ambiguity. They say
> ...
>
> The summary line contains the 'lisp' directory, but the ChangeLog entry
> doesnʼt, and in the example just after itʼs the other way around:

You are right. The example is indeed a bit confusing. The main
difference between Emacs' and Org's converntions is in summary line. We
are less formal about and prefer shorter summaries. You can drop the
directory or even file name if it saves space and does not create
amiguity.

The most common types for summary lines are:
org-library.el: Changed this
library-name: Changed that
function-name: Fixed
variable-name: ...

Examples:

org-lint: Fix invocation with C-u prefix argument
org-cycle-hide-block-startup: Fix docstring
manual: Fix function name and key index reference

You can also refer to
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> Ok. I will, or rather I would, but Iʼm obviously doing something wrong
> when building org:
>
>   Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
> conflict with Org mode")
> org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
> "Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
> :contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
> 744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
> :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
> :post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
> :ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
> (headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
> 744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
> 735658

Oops. It was not caught by tests. Fixed on main now. You can pull the
latest main. The error should disappear.

Best,
Ihor



Re: [External] : Re: C-S left no longer shifts date entry?

2022-06-10 Thread Daniel Ortmann

Works fine with 'emacs -Q'.  I will debug further.

Thank you!

On 6/10/22 09:32, Ihor Radchenko wrote:

Daniel Ortmann  writes:


This morning C-S left no longer shifts the date in the LOGBOOK drawer.
I set the cursor on the second date which was 2022-06-10 initially and
pressed C-S left
... expecting it to be shifted to the 2022-06-09 as shown below.

    CLOCK: [2022-06-09 Thu 11:53]--[2022-06-09 Thu 19:20] =>  7:27

I am unable to reproduce.
S- does shift the date on my side. Can you try with emacs -Q?
See 
https://urldefense.com/v3/__https://orgmode.org/manual/Feedback.html__;!!ACWV5N9M2RV99hQ!OtZni8QMUmyNNh3KYcW3zKnoBJLHUBkaoZiQjC0YF2DVR0egNb8Qa_U3islDF0sJR4Mm_QDGSo7ilvQyE3c$

Best,
Ihor





Re: Org Column in Thunderbird

2022-06-10 Thread Max Nikulin

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

Max Nikulin writes:


I am playing with a thunderbird add-on that may add an icon to folder
view if Org Mode files contains a link to this message. It is not
polished yet, but I suppose, you may try it

https://github.com/maxnikulin/orco/


Looks interesting.

I do not use Thunderbird and cannot try it, but the idea of backlinks
from third-party apps back to Emacs notes is very promising.


My colleague had a dream of cross-linking mails and notes (irrespective 
to Emacs) several years ago.



I imagine browser URLs could also indicate if they have associated Org
notes. Or pdfs.


It seems, most of PDF viewers do not allow decorations added by users. 
Even built-in viewers in browsers displays document as privileged 
content inaccessible by extensions. A kind of workaround is loading of 
the same pdf.js to a regular page, but it is not really convenient. I am 
unsure concerning security issues when pdf.js is bundled into an add-on.


As to browsers, this thunderbird add-on is my experiment with UI in 
browser action popup. When working on LinkRemark I had no idea how to 
add such feature to it. Second level of context menu is inconvenient. 
Menu in popup may be better for adding more features, but I realized it 
quite late.



Also, did you announce this anywhere outside Org ML?


I have no idea where I should announce it since currently it is useful 
mostly with Org mode. Unsure if e.g. API of Joplin app will allow to get 
all links of certain kind in all notes.


Also I am afraid that I may broke something in Thunderbird internals. It 
has some code for custom columns but docs are rather scarce, so I am 
unsure if I implemented it properly. It is a reason to take a pause and 
to wait if my profile would turn into unusable state.





Re: [PATCH] org.el (org-latex-preview): With an active region, act on it

2022-06-10 Thread Daniel Fleischer
Sébastien Miquel  writes:

> Thanks for your comment and testing this.
>
> Note that I do not have merge access to the repository.

OK, I merged it now. Thanks for the contribution!

-- 

Daniel Fleischer



Ambiguity in commit message conventions for org

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 20:59:22 +0800, Ihor Radchenko  
> said:

Ihor> Just submit a patch here. Against the Org mode repository.
Ihor> Org mode development happens in Org mode repository and in this 
mailing
Ihor> list, not in Emacs repo.

Ihor> See https://orgmode.org/worg/org-contribute.html

Those conventions are slightly different than Emacs', with one point
of ambiguity. They say

* Line 1 of the commit message should always be a short description of
 the overall change. Line 1 does not get a dot at the end and does not
 start with a star. Generally, it starts with the filename that has been
 changed, followed by a colon, like this: 

lisp/ol-man.el: Restore file
* Line 2 is an empty line.
* Line 3 starts the ChangeLog entry. It looks like this: 

* org-timer.el (org-timer-cancel-timer, org-timer-stop): Enhance
message.

The summary line contains the 'lisp' directory, but the ChangeLog entry
doesnʼt, and in the example just after itʼs the other way around:

Here is an example for such a message: 


org-capture.el: Fix the case of using a template file

* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
string before calling `string-match'.
(org-capture-templates): Fix customization type.

* doc/org.texi (Capture): Document using a file for a template.

Thanks

Robert
-- 



Re: C-S left no longer shifts date entry?

2022-06-10 Thread Ihor Radchenko
Daniel Ortmann  writes:

> This morning C-S left no longer shifts the date in the LOGBOOK drawer.  
> I set the cursor on the second date which was 2022-06-10 initially and 
> pressed C-S left
> ... expecting it to be shifted to the 2022-06-09 as shown below.
>
>    CLOCK: [2022-06-09 Thu 11:53]--[2022-06-09 Thu 19:20] =>  7:27

I am unable to reproduce.
S- does shift the date on my side. Can you try with emacs -Q?
See https://orgmode.org/manual/Feedback.html

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 20:59:22 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
>> I can send a patch against the org-mode repository main branch, or fix
>> it directly in the emacs repo. What's the preferred workflow for this
>> kind of change?

Ihor> Just submit a patch here. Against the Org mode repository.
Ihor> Org mode development happens in Org mode repository and in this 
mailing
Ihor> list, not in Emacs repo.

Ok. I will, or rather I would, but Iʼm obviously doing something wrong
when building org:

  rltb:~/repos/org-mode (main)> cat local.mk
  EMACS   := /home/rpluim/repos/emacs-28/src/emacs
  rltb:~/repos/org-mode (main)> git pull
  Already up to date.
  rltb:~/repos/org-mode (main)> git status
  On branch main
  Your branch is up to date with 'origin/main'.

  nothing to commit, working tree clean
  rltb:~/repos/org-mode (main)> make doc
  make -C doc info
  make[1]: Entering directory '/home/rpluim/repos/org-mode/doc'
  /home/rpluim/repos/emacs-28/src/emacs  -Q -batch --eval '(setq 
vc-handled-backends nil org-startup-folded nil org-element-cache-persistent 
nil)'  \
--eval '(add-to-list `load-path "../lisp")' \
--eval '(load "../mk/org-fixup.el")'\
--eval '(org-make-manual)'
  Loading /home/rpluim/repos/org-mode/mk/org-fixup.el (source)...
  Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658
  :robust-end 744521 :level 2 :priority nil :tags nil :todo-keyword nil 
:todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 
nil :post-affiliated 735540 :DESCRIPTION "With other Emacs packages." 
:ALT_TITLE "Interaction" :title "Interaction with Other Packages" :parent ... 
...) (section ... ... ...) (headline ... ...) #4) ...) (section (:begin 739061 
:end 744524 :contents-begin 739061 :contents-end 744523 :robust-begin 739061
  :robust-end 744521 :post-blank 1 :post-affiliated 739061 :mode section 
:granularity nil :parent #4) (keyword (:key "CINDEX" :value "shift-selection" 
:begin 739150 :end 739176 :post-blank 0 :post-affiliated 739150 :mode nil 
:granularity nil :parent #7)) (keyword (:key "VINDEX" :value 
"org-support-shift-select" :begin 739176 :end 739211 :post-blank 0 
:post-affiliated 739176 :mode nil :granularity nil :parent #7)) (paragraph 
(:begin 739211 :end 739889 :contents-begin 739211 :contents-end 739888 
:post-blank 1 :post-affiliated 739211 :mode nil :granularity nil :parent #7) 
#("In Emacs, shift-selection combines motions o..." 0 155 ...) (export-snippet 
...) #("S-" 0 10 ...) (export-snippet ...) #("commands to change 
timestamps,\nTODO keywords..." 0 93 ...) (export-snippet ...) #("S-" 0 
10 ...) (export-snippet ...) #("commands outside of specific contexts do 
not..." 0 82 ...) (code ...) #

Ihor> See https://orgmode.org/worg/org-contribute.html

Ihor> Also, if you think that any of the extra diary functions from Org can 
be
Ihor> useful for Emacs, you can propose to include them directly into
Ihor> diary-lib.el via M-x submit-emacs-patch (Emacs >=28) or
Ihor> M-x report-emacs-bug. The latter is also for patches, unlike the 
command
Ihor> name suggests.

Iʼll put that on my list (Iʼm guessing you'd want compatibility shims
in org-mode if I did that).

Robert
-- 



Re: C-S left no longer shifts date entry?

2022-06-10 Thread Daniel Ortmann
I think it was actually S left which I was using.  (My fingers knew the 
command but did not tell my brain.)

... Anyway, that date-shifting no longer is working.

On 6/10/22 09:07, Daniel Ortmann wrote:
This morning C-S left no longer shifts the date in the LOGBOOK drawer. 
I set the cursor on the second date which was 2022-06-10 initially and 
pressed C-S left

... expecting it to be shifted to the 2022-06-09 as shown below.

  CLOCK: [2022-06-09 Thu 11:53]--[2022-06-09 Thu 19:20] => 7:27

I've checked this email list as well as news and C-h b and do not see 
directions for an alternate method.

Can anyone direct me?
I don't know if this is an intentional change or perhaps a bug?



Versions:

Org mode version 9.5.4 (release_9.5.4-531-g57d64c @ 
/home/dortmann/src/git-org-mode/lisp/)


GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, 
cairo version 1.15.12) of 2022-06-10







C-S left no longer shifts date entry?

2022-06-10 Thread Daniel Ortmann
This morning C-S left no longer shifts the date in the LOGBOOK drawer.  
I set the cursor on the second date which was 2022-06-10 initially and 
pressed C-S left

... expecting it to be shifted to the 2022-06-09 as shown below.

  CLOCK: [2022-06-09 Thu 11:53]--[2022-06-09 Thu 19:20] =>  7:27

I've checked this email list as well as news and C-h b and do not see 
directions for an alternate method.

Can anyone direct me?
I don't know if this is an intentional change or perhaps a bug?



Versions:

Org mode version 9.5.4 (release_9.5.4-531-g57d64c @ 
/home/dortmann/src/git-org-mode/lisp/)


GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, 
cairo version 1.15.12) of 2022-06-10




Re: [PATCH] org.el (org-latex-preview): With an active region, act on it

2022-06-10 Thread Sébastien Miquel

Hi,

Daniel Fleischer writes:

Hi Miquel, thanks for the patch! It's useful and works nicely - both in
creating and removing the previews. Let's give it a couple more days for
feedback and then feel free to merge the patch.


Thanks for your comment and testing this.

Note that I do not have merge access to the repository.

Regards,

--
Sébastien Miquel




Re: Org Column in Thunderbird

2022-06-10 Thread Ihor Radchenko
Max Nikulin  writes:

> I am playing with a thunderbird add-on that may add an icon to folder 
> view if Org Mode files contains a link to this message. It is not 
> polished yet, but I suppose, you may try it
>
> https://github.com/maxnikulin/orco/

Looks interesting.

I do not use Thunderbird and cannot try it, but the idea of backlinks
from third-party apps back to Emacs notes is very promising.

I imagine browser URLs could also indicate if they have associated Org
notes. Or pdfs.

Also, did you announce this anywhere outside Org ML?

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> I can send a patch against the org-mode repository main branch, or fix
> it directly in the emacs repo. What's the preferred workflow for this
> kind of change?

Just submit a patch here. Against the Org mode repository.
Org mode development happens in Org mode repository and in this mailing
list, not in Emacs repo.

See https://orgmode.org/worg/org-contribute.html

Also, if you think that any of the extra diary functions from Org can be
useful for Emacs, you can propose to include them directly into
diary-lib.el via M-x submit-emacs-patch (Emacs >=28) or
M-x report-emacs-bug. The latter is also for patches, unlike the command
name suggests.

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 12:27:23 +0100, Angel de Vicente 
>  said:

>> If you use `org-cyclic' and `org-block' you donʼt need to worry about
>> that anymore.

Angel> I tried (briefly :-)) to look for some place where org-cyclic and
Angel> org-block are documented, but failed. But I tried, and they do work
Angel> nicely. So they always assume 'iso' style regardless of the value of
Angel> 'calendar-date-style'? 

Yes. They donʼt appear in the info documentation anywhere that I can
see. Thereʼs a footnote in (info "(org) Weekly/daily agenda") about
`org-anniversary' and `org-date' though.

I can send a patch against the org-mode repository main branch, or fix
it directly in the emacs repo. What's the preferred workflow for this
kind of change?

Robert
-- 



Re: org-capture firefox extension broken [silently]

2022-06-10 Thread Max Nikulin

On 09/06/2022 04:13, Samuel Wales wrote:

i really like and rely on the org-capture extension for firefox.

[...]

however, upon an upgrade and a reboot in a security-supported debian,
text no longer appears in org.


Samuel, do not panic. I just have tried that my LinkRemark extension is 
still able to launch org-protocol handler from Firefox-91.10 (Debian 
bullseye). My extension is not a replacement, it just mean that 
org-capture may be fixed. However I do not see bug reports for the issue:

https://github.com/sprig/org-capture-extension/issues

- Have you tried to check that org-protocol still works on your system?
  xdg-open 'org-protocol:/org-capture?url=something'
- Have you checked what action is set for org-protocol in Firefox 
settings page about:preferences "Applications" section?
- Have you tried to create a html page with an org-protocol link and to 
click on it?



the extension does flash its large "captured" notification, suggesting
to the user [me] that something did work.  i used to rely on that to
know it was captured, but now i do not know what it is a reliable
indicator of.


External scheme handler is a shoot and forget method, there is no 
reliable indicator to confirm success. The stance of mozilla developer 
is that native messaging application should be used if some feedback 
about launched application is required. Actually enough commercial 
applications use external scheme handlers. It is tricky, but some 
methods to detect failures exist. On the other hand likely you are using 
no interruption setup when captures are silently added to your inbox 
without rising any application window. It makes detection of errors in 
browser harder.



there is a debug option but idk where hte console is in firefox.


Which console would you like to get? There are a lot of them in firefox.
- [Ctrl+Shift+J] ("More tools" section of the hamburger menu): Browser 
console. Unlikely your problem may be reported here
- [Ctrl+Shift+K] or from [F12]: web developer tools for the current 
page. Most probable place to notice the error taking into account the 
method used by org-capture-extension code
- about:debugging#/runtime/this-firefox and "Inspect" button for the 
extension: mostly to check other errors related to the extension.


On 10/06/2022 06:55, Samuel Wales wrote:

thank you for the link and suggestion.  it says it works for a version
of ff one more than my current one.


Notice that copy-as-org-mode does not support org-protocol, it uses 
clipboard.



anybody know how to:

1] get a slightly older version from the firefox addons site that
might work with my version of firefox?


There is "See all versions" link on addons.mozilla.org pages. I do not 
think it help you in the case of copy-as-org-mode, likely the developer 
uses either something newer from WebExtensions API or some JavaScript 
feature that is not available in Firefox-91.



2] download it as a file, /inspect it/, and then install it from the
file [the addon site says "This add-on is not actively monitored for
security by Mozilla. Make sure you trust it before installing."?


This warning is shown for most of add-ons on the site. Only a few of 
most popular extensions are carefully reviewed by developers. Try right 
click (context menu) for the "Add to Firefox" button and choose "Save 
Link As...". .xpi files are just ZIP archives.





Org.texi (the Org Manual) in ePub format

2022-06-10 Thread Perry Smith
I joined this list about a month ago to ask how I could get the manual in ePub 
format but I also started searching.  Long story short, I joined the TexInfo 
Help mailing list and submitted a question[1] (which also references two other 
threads if you are interested).

The net net net is you may pick up the Org manual in ePub format here [2].  As 
soon as the new modifications to TexInfo are pushed out, it is drop dead easy 
to produce ePub from the texi file.

For Apple losers like me, ePub is so much nicer than PDFs in Apple Books.  All 
the features come to life such as book marks, notes, highlighting, etc.  And 
they are saved.  Almost like we rocketed into 1990.

Perhaps now that it is so easy thanks to the wonderful people supporting 
TexInfo, ePub will become a more common format that is produced and maintained 
by open source groups.

I hope to eventually learn how to use Org mode to do time tracking of my 
various software projects.  It looks very promising.

Take care,
Perry
p.s. if you are curious, please visit my photography web site [3]

[1] https://lists.gnu.org/archive/html/help-TexInfo/2022-06/msg2.html 

[2] http://why-not-photography.com/drop/org.epub 

[3] http://why-not-photography.com 



signature.asc
Description: Message signed with OpenPGP


org-crypt ?

2022-06-10 Thread David Masterson
I think I've gotten org-crypt working, but I think some things are not
making sense (it might be just me):

1. I've set org-crypt-key to nil (symmetric encryption).
2. Can I use a different encryption key for each encrypted paragraph?
3. Does org-encrypt only ask for the key the first time?
4. Does org-decrypt only ask for the key the first time?
5. How do they know where to get the password when they don't ask?
6. Shouldn't org-crypt docs in org manual have examples?

Does this make sense -- I think I'm messing something up.
-- 
David Masterson



Re: idea for capture anywhere in x

2022-06-10 Thread Charles Philip Chan
Samuel Wales  writes:

Hi Samuel,

> with the org capture firefox extension broken, i recalled this old
> thread, thinking it might be a fix,  and i think i understand the
> issue.  so i thought i would summarize here in this one post.

This new addon:

 
https://addons.mozilla.org/en-US/firefox/addon/org-protocol/?utm_source=addons.mozilla.org_medium=referral_content=search

is working well for me.

Charles


signature.asc
Description: PGP signature


Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Angel de Vicente
Hello,

Robert Pluim  writes:

>> On Tue, 31 May 2022 15:36:01 +0100, Angel de Vicente 
>>  said:
> Angel> ,
> Angel> | *** Badminton 20:45-22:15
> Angel> | <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 
> 2022 06 30))>
> Angel> `
>
> Angel> (the s-exp entry above assumes 'calendar-date-style' is set to 
> 'iso')
>
> If you use `org-cyclic' and `org-block' you donʼt need to worry about
> that anymore.

I tried (briefly :-)) to look for some place where org-cyclic and
org-block are documented, but failed. But I tried, and they do work
nicely. So they always assume 'iso' style regardless of the value of
'calendar-date-style'? 

Thanks,
-- 
Ángel de Vicente 

Research Software Engineer (Supercomputing and BigData)




Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Tue, 31 May 2022 15:36:01 +0100, Angel de Vicente 
>  said:
Angel> ,
Angel> | *** Badminton 20:45-22:15
Angel> | <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 
2022 06 30))>
Angel> `

Angel> (the s-exp entry above assumes 'calendar-date-style' is set to 'iso')

If you use `org-cyclic' and `org-block' you donʼt need to worry about
that anymore.

Robert
-- 



Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-10 Thread Ryan Scott
I believe I have addressed your feedback, Ihor.
Attached is the latest version of the patch.

   - Merged latest master
   - :post is now handled correctly (verified with example of :post usage
   in the example at https://orgmode.org/manual/Results-of-Evaluation.html)
   - Added "(with quotes)" to help make the NEWS entry clearer
   - Changed the attach directory detection to use a string prefix check

Let me know what you think.

On Thu, Apr 21, 2022 at 11:19 PM Ryan Scott 
wrote:

> Great. Just making sure that this particular approach to this feature or
> type of feature wasn't fundamentally flawed given the established behavior
> of org.
> Thanks.
>
> On Thu, Apr 21, 2022 at 11:02 PM Ihor Radchenko 
> wrote:
>
>> Ryan Scott  writes:
>>
>> > With all of the layers and assumptions/behaviors inherent in the way src
>> > block parameters are handled, do you feel like this is an approach that
>> can
>> > work, or should it be abandoned?
>>
>> I am not sure if I understand your concern.
>> Your code is reusing the existing convention that current directory is
>> managed via default-directory by ob-core.el. I do not see any problem
>> here.
>>
>> Best,
>> Ihor
>>
>


org-src-block-results-attach-dir.patch
Description: Binary data


Re: export to odt, but #text# should be coloured

2022-06-10 Thread Christian Moe


I forgot to escape the quotation marks, of course.

>   "@@odt:@@\\1@@odt:@@"

  "@@odt:@@\\1@@odt:@@"



Re: export to odt, but #text# should be coloured

2022-06-10 Thread Christian Moe


Hi,

Since all formatting is defind as styles and styles are defined in
separate (parts of the) files that make up an ODT file, this requires
you to work with ODT styles. There may be a hack around it, I don't
know.

See the manual for how to use a style sheet with #+ODT_STYLES_FILE. (For
a once-off document, the simplest is to export your document to ODT,
make any style changes to the ODT document, save it, and point
#+ODT_STYLES_FILE to that document for future export.)

In the ODT document you use as styles file, create a new Character
style. For example: In the document, mark some text red. Select the red
text. Open the Styles and Formatting dialog, go to the Character styles
tab (that's the second tab, the first is paragraph styles). Then from
the drop-down "Styles actions" menu (icon on the right), choose "New
style from selection". Name your style, e.g. "Red". It should show up in
the list of character styles.

To apply that style to a span of text, you need to wrap the text in
 tags in the content.xml
component of the ODT file. For your "#" formatting, you could set up an
export hook or filter (manual: "Advanced export configuration") with a
replace-match like

  "@@odt:@@\\1@@odt:@@"

I would probably rather use a macro like

  #+MACRO: red @@odt:@@$1@@odt:@@

  This text is {{{red(alarmingly)}}} red.

Yours,
Christian

Uwe Brauer writes:

> Hi
>
> a short hack of the sort
>
>   (interactive)
>   (while (re-search-forward "#\\([^#]*\\)#" nil t)
> (replace-match "\\1")))
> Allows me to export text like this
> #important#
>
> to HTML where the resulted text is colored in red.
>
> Now, how can I achieve something like this for the odt export?
>
> Reards
> Uwe Brauer



Re: export to odt, but #text# should be coloured

2022-06-10 Thread Fraga, Eric
On Thursday,  9 Jun 2022 at 20:37, Uwe Brauer wrote:
> Now, how can I achieve something like this for the odt export?

I have used something like the following in the past:

(format "%s" contents)

-- 
: Eric S Fraga, with org release_9.5.4-521-g1105da in Emacs 29.0.50