Re: Clarify that REST is not supported on the start TIME in a time-range timestamp.

2023-10-06 Thread Tom Alexander
> As for the problem with REST you raised, I am inclined to remove it from
> syntax doc for the time being - it only creates more confusion,
> unfortunately.

Makes sense, thanks. Is there anything we do to mark patches as rejected? I 
removed [PATCH] from the subject line.

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



Re: Lesser blocks allowing unescaped lines

2023-10-06 Thread Tom Alexander
Thank you! Makes sense.

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



org-capture firefox extension not capture in some cases

2023-10-06 Thread Samuel Wales
in html gmail, i can capture message body text and whatever else.

gmail has an html version and a js version.  html is faster and better for me.

in disroot.org, if i try to capture message body text, it seems to
capture just the link but does not capture the message body text.

-- 
The Kafka Pandemic

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



Re: Completion of links to man pages

2023-10-06 Thread Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > It seems, I was not the only person who had an impression that `woman' 
  > is the Emacs way to read man pages. I have no idea concerning its 
  > origin, perhaps some pages and comments I had seen on the net.

This suggests that running M-x woman should display a message saying to
use M-x man instead.

The message could add this

   The name M-x man refers to the old Unix command `man', which is
   short for "manual".  Its purpose is to read pages of the manual.
   Mx- woman was a joke based on that name.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?

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

> Ihor Radchenko writes:
>
>>> In tables there is more consistency because :float is a float
>>> environment (table or any arbitrary value) and :environment is a table
>>> environment (tabular or any arbitrary value). Here :placement :options
>>> and :align act as what is expected of them:
>>>
>>> #+ATTR_LaTeX: :environment foo :float var :placement [!h] :options [blah] 
>>> :align 
>>> |a|a|a|a|
>> ...
>> This is not documented and is possibly a bug.
>
> I would say that it is the expected behavior: :float is for a float
> environment and :environment is for the environment that builds the
> table (by default tabular). According to the manual:

Oops. You are indeed right. I missed that both :float and :environment
are documented for tables.

> The difference is that with images, except in cases of somewhat more
> complex constructions where there are subfigures, there is only one
> environment, "figure" by default or any other arbitrary one. There was a
> commit a while ago, I don't remember when, that allowed :float to
> support any arbitrary string as the float environment name, in images
> and tables. In images ':float t' is figure (by default) and in tables it
> is table (also by default).

So, the difference between :environment and :float is that :float also
encapsulates \caption in addition to the actual environment (like
tabularx or includegraphics) used for transcoded exported element.

I can see how :float+:placement can be imprecise and that the existing
:environment indeed serves a different purpose. (It might be worth
clarifying this distinction in the manual - it seems arbitrary from the
first glance).

But what would be the better name then?

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



Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?

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

>> In tables there is more consistency because :float is a float
>> environment (table or any arbitrary value) and :environment is a table
>> environment (tabular or any arbitrary value). Here :placement :options
>> and :align act as what is expected of them:
>>
>> #+ATTR_LaTeX: :environment foo :float var :placement [!h] :options [blah] 
>> :align 
>> |a|a|a|a|
>>
>> ===>
>>
>> \begin{var}[!h]
>> \centering
>> \begin{foo}[blah]{}
>> a & a & a & a\\[0pt]
>> \end{foo}
>> \end{var}
>> \end{document}
>
> This is not documented and is possibly a bug.

I would say that it is the expected behavior: :float is for a float
environment and :environment is for the environment that builds the
table (by default tabular). According to the manual:

#+begin_quote
The table environments by default are not floats in LaTeX.  To make
them floating objects use =:float= with one of the following
options: =t= (for a default =table= environment), =sideways= (for a
=sidewaystable= environment), =multicolumn= [...] and
=nil=.  In addition to these three values, =:float= can pass through
any arbitrary value, for example a user-defined float type with the
=float= LaTeX package
#+end_quote

and (for :environment):

#+begin_quote
Set the default LaTeX table environment for the LaTeX export
backend to use when exporting Org tables.  Common LaTeX table
environments are provided by these packages: tabularx, longtable,
array, tabu, and bmatrix.  For packages, such as tabularx and tabu,
or any newer replacements
#+end_quote

The difference is that with images, except in cases of somewhat more
complex constructions where there are subfigures, there is only one
environment, "figure" by default or any other arbitrary one. There was a
commit a while ago, I don't remember when, that allowed :float to
support any arbitrary string as the float environment name, in images
and tables. In images ':float t' is figure (by default) and in tables it
is table (also by default).

Update: ah, I already have the commit located, because I also remember
that I myself sent a patch to update the documentation and correct a
regression that that commit introduced (:float t produced an environment
"t" (\begin{t}...\end{t}):

https://list.orgmode.org/878ruhrvfq@posteo.net/



Re: Are 'placement' and 'float' "obsolete terms" in inline images exported to LaTeX?

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

> Ihor Radchenko writes:
>
>> Further, we also provide :environment and :options attributes that do
>> the same thing, but without special treatment of standard
>> t/multicolumn/wrap/sideways/nil values in :float.
>
> t/multicolumn/wrap/sideways/nil... and any arbitrary value (see lines 14125
> and 14262 in org-manual.org).

My point is that actual "t", "multicolumn", "wrap", "sideways", and
"nil" LaTeX environments are not allowed.

>> So, it might be even better idea to extend :environment/:options
>> attributes to more elements - their names make more sense and the values
>> do not have a pre-defined special meanings.
>
> Currently it is not possible in inline images (if I don't miss anything) this:
>
> #+ATTR_LaTeX: :environment minipage :options {\textwidth}
> [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]

Sure. But we might as well implement :environment support in addition to :float.

> Implementing :environment/:options here would result in redundancy with:
>
> #+ATTR_LaTeX: :float minipage :placement {\textwidth}
> [[file:/usr/share/texmf-dist/tex/latex/mwe/example-image-a.jpg]]
>
> which produces the same.

Sure. But didn't you motivate the change with the confusing _name_
:float? IMHO, :environment is more clear.

> In tables there is more consistency because :float is a float
> environment (table or any arbitrary value) and :environment is a table
> environment (tabular or any arbitrary value). Here :placement :options
> and :align act as what is expected of them:
>
> #+ATTR_LaTeX: :environment foo :float var :placement [!h] :options [blah] 
> :align 
> |a|a|a|a|
>
> ===>
>
> \begin{var}[!h]
> \centering
> \begin{foo}[blah]{}
> a & a & a & a\\[0pt]
> \end{foo}
> \end{var}
> \end{document}

This is not documented and is possibly a bug.

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



[BUG] No newline at end of exported HTML file [9.6.6 (release_9.6.6 @ /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/)]

2023-10-06 Thread YE


Exporting HTML file from Org-mode, f.i. with `org-html-export-to-html',
I expect to get a newline after the closing  tag, but it's not
added. I believe this used to work with previous versions of Org-mode.
Am I missing something?

Thanks.

Emacs  : GNU Emacs 29.1 (build 2, aarch64-apple-darwin22.6.0, NS appkit-2299.70 
Version 13.5 (Build 22G74))
 of 2023-08-02
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/)



Re: [BUG] Error message when adding an item to a bullet list [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]

2023-10-06 Thread Ihor Radchenko
Johannes Keller  writes:

> Error message when adding an item to a bullet list [9.6.6 (release_9.6.6 @ 
> /usr/share/emacs/29.1/lisp/org/)]

Thanks for reporting, but may you please share the error message you are seeing?

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



org-table-transpose-table-at-point does not convert formulas

2023-10-06 Thread Uwe Brauer
Hi

Starting with this 
#+begin_src 

| pos | rango | weight |
|-+---+|
|  23 |   329 |307 |
|  71 |   329 |259 |
|  77 |   333 |257 |
|  58 |   333 |276 |
| 155 |   310 |156 |
| 164 |   325 |162 |
| 203 |   330 |128 |
#+TBLFM: $3=($2+1)-$1
#+end_src

org-table-transpose-table-at-point leads to 
#+begin_src 
| pos|  23 |  71 |  77 |  58 | 155 | 164 | 203 |
| rango  | 329 | 329 | 333 | 333 | 310 | 325 | 330 |
| weight | 307 | 259 | 257 | 276 | 156 | 162 | 128 |
#+TBLFM: $3=($2+1)-$1
#+end_src


However the correct formula should have been
#+begin_src 
|---+-+-+-+-+-+-+-|
| pos   |  23 |  71 |  77 |  58 | 155 | 164 | 203 |
| rango | 329 | 329 | 333 | 333 | 310 | 325 | 330 |
| peso  | 307 | 259 | 257 | 276 | 156 | 162 | 128 |
#+TBLFM: @4$2..@4$13=@3+1-@2
#+end_src


Does there exist such a command (Scalc and I presume excel allow to transpose a 
table and convert the corresponding formula)


Thanks and regards

Uwe Brauer 
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/




Re: Case insensitivity of simple [[links]]

2023-10-06 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

>> For context, I use '#+OPTIONS: num:nil', which means that '[[link]]'
>> exports as 'link' and not a section number.
>
> I am confused. num:nil just means that section titles will not be
> numbered. It has nothing to do with links, AFAIK.

My sentence says it all, but if that is not clear, consider:

EXAMPLE 1:

  This is a [[test]] link.
  
  * test

EXPORT OF EXAMPLE 1:

  This is a 1 link.

EXAMPLE 2:

  #+OPTIONS: num:nil
  
  This is a [[test]] link.
  
  * test

EXPORT OF EXAMPLE 2:

  This is a test link.

> What about [[Link][link]]?

That makes Org documents hard to read in *plain text*, that is without
the "descriptive links" fontification.  Here is my note again, compare:

EXAMPLE 1: Hard-to-read, unhelpful markup:

  The set of [[Cellular membrane][cellular membrane]]-bound
  [[Organelle][organelle]]s inside of the [[Eukaryotic cell][eukaryotic
  cell]] that work together on the synthesis and distribution of
  [[Protein][protein]]s and [[Lipid][lipid]]s.

EXAMPLE 2: Lightweight, helpful markup:

  The set of [[cellular membrane]]-bound [[organelle]]s inside of the
  [[eukaryotic cell]] that work together on the synthesis and
  distribution of [[protein]]s and [[lipid]]s.

> Judging from your example, I am not sure if it is an actual problem
> with Org mode. I am still to see a use case when case-insensitivity
> would be useful. Now, I am inclined to fix the docstring (and possibly
> the manual), clarifying about case-sensitivity of the internal links.

For me, this is not only "an actual problem with Org" but the biggest
problem, and the only big problem, I have with Org.

As a markup language, Org is "99% there" in having some of the *most
practical* plain text [[link]]s available, but then falls short on case
sensitivity, ending up with the exact opposite.

Now, I could use descriptive links, which hide the [[Wart][wart]] behind
fontification tricks, but that would not solve my problem.  Why?  I need
to use other plain text tools, such as Git, with my densely linked Org
documents.

Rudy
-- 
"Simplicity is complexity resolved."
-- Constantin Brâncuși, 1876-1957

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



[proof of concept, tip] 'Templates with arguments' using org src blocks

2023-10-06 Thread Juan Manuel Macías
Hi, this is a proof of concept of how a sort of 'templates with
arguments' can be used within Org, just with Org’s own resources at the
user level. It occurred to me that org src blocks might be handy for
this. For this test I just made a disguised format string using this
function:

┌
│   (defun my-format-template (template vars)
│ (format
│"#+begin_src emacs-lisp :results raw :exports results :var template = %s
│   (format
│(format \"%%s\" template)
│   %s)
│ #+end_src" template vars))
└

and a macro:

┌
│ #+MACRO: template (eval (my-format-template $1 $2))
└

A simple example. We start from this template:

┌
│ #+NAME: template1
│ #+begin_src org :exports none
│   ,*%s*
│   %s
│ #+end_src
│ 
│ #+header: :var hello = "Hello World"
│ #+header: :var str = "Lorem ipsum dolor"
│ {{{template(template1,hello str)}}}
└

An example with a src block inside the template:

┌
│ #+NAME: template2
│ #+begin_src org :exports none
│   ,#+begin_src emacs-lisp :exports results :results raw
│   (let ((name "%s"))
│   (format "/Hello, %%s/" name))
│   ,#+end_src
│ #+end_src
│ 
│ #+header: :var name = "World"
│ {{{template(template2,name)}}}
└

And this example is somewhat more elaborate. We want a table in LaTeX
with the threeparttable package. Template:

┌
│ #+NAME: tptable
│ #+begin_src org :exports none
│   ,#+begin_table
│   ,#+ATTR_LaTeX: :options [b]
│   ,#+begin_threeparttable
│   %s
│   ,#+begin_tablenotes
│   %s
│   ,#+end_tablenotes
│   ,#+end_threeparttable
│   ,#+end_table
│ #+end_src
└

the table:

┌
│ #+NAME: table1
│ #+begin_src org :exports none
│   ,#+ATTR_LaTeX: :center nil :booktabs t :float nil
│   ,#+caption: Lorem ipsum dolor
│   ,#+name: table1
│   |---+--+---|
│   | lorem | ipsum@@latex:\tnote{1}@@ | dolor |
│   | lorem | ipsum@@latex:\tnote{2}@@ | dolor |
│   |---+--+---|
│ #+end_src
└


And, finally:

┌
│ #+header: :var table = table1
│ #+header: :var notes = "\\item [1] First note\n\\item [2] Second note"
│ {{{template(tptable,table notes)}}}
└

Best regards,

Juan Manuel

-- 
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com





Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-10-06 Thread Po Lu
Visuwesh  writes:


> Attached patch adds yank-media and DND handler to attach files in the
> clipboard and dropped onto an Emacs frame respectively.
>
> The yank-media handler for images is well tested, I use it frequently
> however, rest of the stuff aren't really tested since I don't use a GUI
> file manager.  I tested enough to make sure the logic is right so I
> don't know if they are ergonomic enough.  As noted in the comments,
> files copied/cut to clipboard doesn't seem to have a solid spec and most
> of the code was written with pcmanfm as the file manager, testing with
> other file managers are highly welcome.
>
> Better names for the newly added defcustoms are highly welcome since I
> don't find them to be clear enough from their name.
>
> The patch compiles cleanly without warnings but I haven't tested _this_
> patch yet, I have these functions in my init.el and have tested those.

Thanks.  You have only implemented handlers for one of the two protocols
employed by X programs to perform drag-and-drop.

Lisp code receiving dropped files must also implement an XDS handler,
absent which files dropped from web browsers such as Firefox will merely
be saved into the default-directory.  XDS is distinct from the regular
drag-and-drop system in that Emacs is enjoined by the drag source to
provide a file name under which the file should be saved, whereas
regular drag-and-drop transpires once it has already been saved by the
drag source.  Refer to (elisp)Drag and Drop.



[BUG] Error message when adding an item to a bullet list [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]

2023-10-06 Thread Johannes Keller


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

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

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




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

current state:
==
(setq
 org-noter--doc-goto-location-hook '(org-noter-djvu--goto-location 
org-noter-nov--goto-location
 org-noter-pdf--goto-location)
 org-link-elisp-confirm-function 'yes-or-no-p
 org-global-properties '((Effort_ALL . "0:05 0:10 0:15 0:20 0:30 0:45 1:00 1:30 
2:00 2:30 3:00 3:30 4:00")
 )
 org-roam-db-gc-threshold 2305843009213693951
 org-ref-cite-onclick-function #[257 "\300 \207" [org-ref-citation-hydra/body] 
2 "\n\n(fn _)"]
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-ref-insert-cite-function 'org-ref-cite-insert-helm
 org-log-done 'time
 org-agenda-custom-commands '(("d" "Day block view" ((agenda "") (todo "")))
  ("o" "Agenda and Office-related tasks"
   ((agenda "") (tags-todo "work") (tags "office")))
  )
 org-koma-letter-default-class "my-letter"
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-agenda-files '("~/org/todos.org" "~/org/freelance-projects.org" 
"~/org/il-profondo-productions.org"
"~/org/la-cetra-productions.org" "~/org/phd.org" 
"~/org/pontio.org"
"~/org/private.org" "~/org/studio31-vicentino21.org" 
"~/org/teaching.org"
"~/org/work-coordination.org" "~/org/research.org")
 org-publish-project-alist '(("org-notes" :base-directory 
"~/org/web/johanneskeller/" :base-extension
  "org" :publishing-directory "~/Public-html/" 
:recursive t :auto-sitemap t
  :sitemap-filename "sitemap.org" :sitemap-title 
"Navigation"
  :publishing-function org-html-publish-to-html 
::with-author nil
  :with-creator nil :with-toc nil :section-numbers 
nil :time-stamp-file nil
  :headline-levels 4 :auto-preamble t)
 ("org-static" :base-directory 
"~/org/web/johanneskeller/" :base-extension
  
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory
  "~/Public-html/" :recursive t 
:publishing-function org-publish-attachment)
 ("org" :components ("org-notes" "org-static")))
 org-capture-templates '(("t" "Simple TODO" entry (file+headline 
"~/org/todos.org" "Inbox")
  "* TODO %^{Title}\nSCHEDULED: %^t")
 ("l" "Todo with link" entry (file+headline 
"~/org/todos.org" "Inbox")
  "* TODO %^{Title}\nSCHEDULED: %^t\n%^{Content}\n%a")
 ("e" "Todo with time effort estimate" entry
  (file+headline "~/org/todos.org" "Inbox")
  "* TODO %^{Title}\n:PROPERTIES:\n:EFFORT: %^{Time 
Effort}\n:END:\nSCHEDULED: %^t\n%?")
 ("a" "Appointment" entry (file+headline 
"~/org/todos.org" "Inbox")
  "* %^{Title} %^T")
 ("c" "Contact" entry (file+headline 
"~/org/contacts.org" "Contacts")
  "* 
%(org-contacts-template-name)\n:PROPERTIES:\n:EMAIL: 
%(org-contacts-template-email)\n:ADDRESS: 
%^{Address}\n:BIRTHDAY:\n:NOTE:\n:END:")
 )
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-format-latex-options '(:foreground default :background default :scale 1.0 
:html-foreground "Black"
:html-background "Transparent" :html-scale 5.0 
:matchers
("begin" "$1" "$" "$$" "\\(" "\\["))
 org-refile-targets '((org-agenda-files :level . 1))
 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 "~/org/org/todos.org"
 org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h 
org-roam--register-completion-functions-h
   org-roam--replace-roam-links-on-save-h
   org-roam-db-autosync--setup-update-on-save-h)
 org-ref-bibtex-assoc-pdf-with-entry-move-function 'rename-file
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-columns-default-format "%40ITEM(Task) %TODO %3PRIORITY %17Effort(Estimated 
Effort){:}"
 org-noter--pretty-print-location-for-title-hook