org-cite: only last names and et al. for more than two coauthors

2022-06-26 Thread M. Pger
Hi,

I've recently tried to switch to org-cite, but I still have some problems with 
the basics.

Consider the following entry:

@article{akey2022,
title = {This is the title},
shorttitle = {This is the short title},
author = {Surname1, Name1 and Surname2, Name2 and Surname3, Name3},
year = {2022},
(truncated)}

I want to have something like: "as shown by Surname1 et al. (2022), ...", i.e. 
something one can get with natbib \citet command. With org-ref it worked like a 
charm.

I've tried the syntax presented in 
https://blog.tecosaur.com/tmio/2021-07-31-citations.html#more-exporting, that 
is:
[cite/t/c:@akey2022]
but I ended with a 'wrong type argument' error.

I then tried [cite/t:@akey2022]: exporting succeeds. However, I end up with "as 
shown by Surname1, Name1 and Surname2, Name2 and Surname3, Name3 (2022), ...".

How can I correctly specify the options mentioned above? Is there a complete 
and updated tutorial available somewhere?

Thanks in advance.

Best,

Max

Re: Org, Hyperbole, and eev

2022-06-26 Thread Robert Weiner
These are Action buttons run by the action button type defined via the defib 
macro in the “hibtypes.el” file.  Just search for ‘defib action’  in there.  
You can invoke its implicit button type function from Lisp as (ibtypes::action) 
if I recall.

-- Bob

> On Jun 26, 2022, at 11:48 PM, Eduardo Ochs  wrote:
> 
> On Sun, 26 Jun 2022 at 21:50, Robert Weiner  wrote:
>> 
>> So here is a simple implementation (...)
> 
> Hi Robert,
> 
> thanks - but most functions of eev that deal with youtube URLs are
> clearly marked either as "this is part of a 5-minute hack" or as "this
> is part of an ex-5-minute hack that grew too much", so people are
> encouraged to rewrite them...
> 
> What are the functions of Hyperbole that handle sexp buttons in the
> <...> syntax? Are they called by an "ebut:..." function, by an
> "ibut:..." function, or what? Do you remember the names of the
> lower-level functions that run <...> buttons?
> 
>  [[]],
>Eduardo Ochs
>http://angg.twu.net/#eev



Re: Org, Hyperbole, and eev

2022-06-26 Thread Eduardo Ochs
On Sun, 26 Jun 2022 at 21:50, Robert Weiner  wrote:
>
> So here is a simple implementation (...)

Hi Robert,

thanks - but most functions of eev that deal with youtube URLs are
clearly marked either as "this is part of a 5-minute hack" or as "this
is part of an ex-5-minute hack that grew too much", so people are
encouraged to rewrite them...

What are the functions of Hyperbole that handle sexp buttons in the
<...> syntax? Are they called by an "ebut:..." function, by an
"ibut:..." function, or what? Do you remember the names of the
lower-level functions that run <...> buttons?

  [[]],
Eduardo Ochs
http://angg.twu.net/#eev



Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-06-26 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. ]]]

  > > Is it possible to make a donation through Liberapay without running
  > > any nonfree software?  Including nonfree Javascript software send
  > > by the site itself?
  > >
  > > And is it possible for the intended recipients to receive the money
  > > without running nonfree software including JS?
  > >
  > > If the answers are yes and yes, maybe that system is ethical and good.
  > > Otherwise, it is not a solution, only a different variation of the 
problem.

  > AFAIU, no and no. See
  > 
https://list.orgmode.org/CAFm0skG_-80iQ-TO-hduvVt_GHQWosOHBeHJ61dyA=wng8v...@mail.gmail.com/T/#m322d74a1efb4e3773ae2df7b6bda4505c4b5fa15

This is disappointing but not surprising,

GNU packages should not steer people towards running nonfree software.
As a consequence, they should not suggest people donate using payment services
that _require_ the donor to run a nonfree program.


-- 
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: [PATCH] Re: [BUG] Adding note to heading without newline at the end

2022-06-26 Thread Samuel Banya
Gotcha, after this great advice, I am also able to get the following result:
```
- Note taken on [2022-06-26 Sun 22:31] \\
  Adding test note
* test
```

However, even after toggling 'M-x toggle-debug-on-error', it didn't enter the 
debugger since I guess this would be considered a 'user error' according to the 
'*Messages*' buffer present:
```
user-error: Before first headline at position 43 in buffer orgModeNoteBug.org
```
I checked 'org.el' which has the related 'org-add-note' function present.

This appears to call the 'org-add-log-setup' function, and passes the 'note' 
argument to it.

I then took a look at the 'org-add-log-setup' function.

>From the bug's nature itself, it most likely is moving the cursor incorrectly 
>to the previous line above it, when it should be really doing it on the line 
>AFTER it.

This to me is probably the 'moving' section that should be modified:
```
  (move-marker org-log-note-marker (point))
```

It's probably the position that needs to be recalculated or adjusted 
accordingly. 

I used 'C-h f' and found that 'move-marker' is just an alias for 'set-marker' 
which is in the Emacs codebase itself.

I think the issue is HOW we are calling it here.

Can you give me a few pointers in terms of how we can maybe force it to go to 
the next line instead of adjusting it based on the point present?

Thanks,

Sam


On Sun, Jun 26, 2022, at 7:32 PM, Samuel Banya wrote:
> Hey everyone,
> 
> I'm using Emacs 28.1 on Manjaro, and pulled the latest version of Org Mode 
> from the git repo.
> 
> I'm still unable to reproduce this as I basically just opened up a new .org 
> file and did Tom's exact steps. I was able to add a blank note without 
> receiving an error at the exact cursor point that was mentioned.
> 
> Ihor, can you take a look at the .mkv video I attached of my test and let me 
> know what you did to be able to reproduce this because I'm not observing any 
> errors on my machine.
> 
> Thanks,
> 
> Sam
> 
> On Thu, Jun 23, 2022, at 11:59 AM, Samuel Banya wrote:
>> Hey Ihor,
>> 
>> I can check it out on the weekend, sounds like fun.
>> 
>> Will step through the debugger to see what's up and get back to you on this, 
>> thanks for tagging me on this.
>> 
>> On Wed, Jun 22, 2022, at 10:28 AM, Tor Kringeland wrote:
>>> Ihor Radchenko  writes:
>>> 
>>> > Confirmed.
>>> >
>>> > Samuel, do you want to try fixing this?
>>> > It should be fairly easy to debug.
>>> 
>>> Nice.  But these are distinct bugs, it seems like.  The one you sent a
>>> patch for earlier fixes the former bug (which is also present in Org
>>> 9.5).  While my original problem is only present in Org 9.6.
>> 
> 
> 
> *Attachments:*
>  * orgAddNoteBugVideo-2022-06-26_19.25.54.mkv


Re: feature proposal: export to html headless

2022-06-26 Thread Samuel Wales
this isn't an answer for you, but it might be useful for a reader for
reference or so.  for exporting org subtrees to things like textboxes
on the web that accept simplified html, my own command has this at the
core:

   (org-export-to-buffer format ; e.g. 'html
 buf
 ;; async
 nil
 'subtree
 ;; visible-only
 nil
 'body-only)))

for many years i have used the surrounding command to create html for
my blogger blog, to update or post a new post.

[it isn't an answer for you because you want it in the menu.  others
will field that.  and it's similar to your code.]


On 6/26/22, Uwe Brauer  wrote:
>
>
> Hi
>
> Some time ago I asked whether it would be possible to have a simplified
> html export function (basically I need it to insert it in certain moodle
> forms)
>
>
> I was pointed out to me by the author/maintainer of org-mode that the
> following would do the trick
>
> (defun my-org-export-to-html ()
>   (interactive)
>   (org-html-export-to-html nil nil t t))
>
>
> So the question is could that be added to the export-dispach menu
> as HTML headless, I propose to use the letter L as in headLess.
>
> Regards
>
> Uwe Brauer
>
> --
> I strongly condemn Putin's war of aggression against the Ukraine.
> I support to deliver weapons to Ukraine's military.
> I support the ban of Russia from SWIFT.
> I support the EU membership of the Ukraine.
>
>
>


-- 
The Kafka Pandemic

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



Re: Org, Hyperbole, and eev

2022-06-26 Thread Robert Weiner
So here is a simple implementation that is not unlike your own though the
functions are a bit simpler and more clearly documented without a listing
of every possible test case type and requires neither Hyperbole nor Org
until you want to activate things as buttons:

(require 'browse-url)

(defun youtube-normalize-link (video-link)
  "Return a URL to a youtube video.  ViDEO-LINK must be a string and can be
a video identifier, e.g. WkwZHSbHmPg, or a full URL to the video."
  (if (or (string-prefix-p "https://; video-link)
 (string-prefix-p "www." video-link))
  video-link
(concat "https://www.youtube.com/watch?v=; video-link)))

(defun youtube-normalize-time (time-string)
  "Given a colon-separated TIME-STRING, with optional hours and minutes,
e.g. 1:2:44 (1 hour, two minutes, 45 seconds into a video), return the
normalized time for a Youtube url.
If the TIME-STRING format is invalid, return nil."
  (if (string-match-p ":" time-string)
  (let* ((time-parts (split-string time-string ":"))
(num-of-parts (length time-parts)))
(cond ((zerop num-of-parts)
  "0s")
 ((= num-of-parts 1)
  (concat (nth 0 time-parts) "s"))
 ((= num-of-parts 2)
  (format "%sm%ss" (nth 0 time-parts) (nth 1 time-parts)))
 ((= num-of-parts 3)
  (format "%sh%sm%ss" (nth 0 time-parts) (nth 1 time-parts) (nth 2
time-parts)
time-string))

(defun youtube-url-from-time (video-link time-string)
  "Given a VIDEO-LINK and a colon-separated TIME-STRING, e.g. 2:44 (two
minutes, 45 seconds into the video), return the url to play from that point
in the video.
Return nil if TIME-STRING is invalid."
  (when (setq time-string (youtube-normalize-time time-string))
(format "%s=%s"
   (youtube-normalize-link video-link)
   time-string)))

(defun youtube-play-from-time (video-link time-string)
  "Given a VIDEO-LINK and a colon-separated TIME-STRING, e.g. 2:44 (two
minutes, 45 seconds), play the video from that point."
  (browse-url (youtube-url-from-time video-link time-string)))

;;

Then once you load the Hyperbole package, in any buffer you could use any
of the 3 buttons below which all do the same thing when pressed upon with
the Action Key, {M-RET}:



https://www.youtube.com/watch?v=WKwZHSbHmPg;
"2:44">

If you added these functions to eev, I think you would simply change the <>
to ():

(youtube-play-from-time "WKwZHSbHmPg" "2:44")



I avoided creating implicit button and action types for this example to
show you that they are not needed as you don't like specialized syntax
anyway and want everything to be explicit, but in Hyperbole, we would
probably create
an implicit button type that recognized strings like "yt:WKwZHSbHmPg@2:44"
and invoked the calls shown above.



For comparison, below is your eev code for the same purpose.  You can see
that it has extra arguments for little reason, uses eval where not
necessary, and makes the URL assembly more complicated than needed.  The
differences are not major but my point is this adds up both in amounts of
code and amounts of maintenance needed that you could reduce leveraging
existing capabilities, like Hyperbole's ability to turn arbitrary functions
into hyperbuttons.

;;;_ _ _ _
;;;  _   _  ___  _   _| |_ _   _| |__   ___ __   _(_) __| | ___  ___
;;; | | | |/ _ \| | | | __| | | | '_ \ / _ \\ \ / / |/ _` |/ _ \/ _ \
;;; | |_| | (_) | |_| | |_| |_| | |_) |  __/_\ V /| | (_| |  __/ (_) |
;;;  \__, |\___/ \__,_|\__|\__,_|_.__/ \___|  \_/ |_|\__,_|\___|\___/
;;;  |___/
;;
;; «find-youtube-video»  (to ".find-youtube-video")
;; Play a video on youtube using a browser.
;; Tests: (ee-find-youtube-url   "xQqWufQgzVY" nil)
;;(ee-find-youtube-url   "xQqWufQgzVY" "1:23")
;;(ee-find-youtube-video "xQqWufQgzVY")
;;(ee-find-youtube-video "xQqWufQgzVY" "1:23")
;;(ee-find-youtube-video "xQqWufQgzVY" "1:23" "Bla")
;;   (find-youtube-video "xQqWufQgzVY" "1:23")
;;(ee-find-youtube-video "FoAzpGzFCSE" "15:14" "nice")
;;   (find-youtube-video "FoAzpGzFCSE" "15:14" "nice")
;;
(defvar ee-find-youtube-video-program 'find-googlechrome)

(defun find-youtube-video (youtubeid  time  rest)
  (eval (ee-find-youtube-video youtubeid time)))

(defun ee-find-youtube-video (youtubeid  time  rest)
  (list ee-find-youtube-video-program
(ee-find-youtube-url youtubeid time)))

(defun ee-find-youtube-url (youtubeid time)
  (format "http://www.youtube.com/watch?v=%s%s;
  youtubeid (or (ee-time-to-youtube-time (or time "")) "")))

;; «youtube-time»  (to ".youtube-time")
;; Tests: (ee-time-to-youtube-time "")
;;(ee-time-to-youtube-time "!")
;;(ee-time-to-youtube-time "2")
;;(ee-time-to-youtube-time "23")
;;(ee-time-to-youtube-time "123")
;;(ee-time-to-youtube-time "1:23")
;;(ee-time-to-youtube-time "1:23:43")
;;(ee-time-to-youtube-time 

Re: [PATCH] Re: [BUG] Adding note to heading without newline at the end

2022-06-26 Thread Ihor Radchenko
"Samuel Banya"  writes:

> Ihor, can you take a look at the .mkv video I attached of my test and let me 
> know what you did to be able to reproduce this because I'm not observing any 
> errors on my machine.

You misunderstood the email formatting.

#+begin_example
* test
#+end_example

actually meant the following:

1. Create a new org file
2. Type (literally) the following:
* test
3. You will get a file containing "* test" exactly, no newline at the
   end
4. Do _not_ save the file
5. Run C-c C-z and add some note

Best,
Ihor




Re: Org, Hyperbole, and eev

2022-06-26 Thread Eduardo Ochs
On Sun, 26 Jun 2022 at 17:24, Robert Weiner  wrote:
>
> That was not the offer. The offer was to show you how to implement a
> discrete eev command using another framework, possibly simplifying
> its implementation. Hopefully, from seeing the code used to do this,
> you could dig in yourself and follow the flow to whatever level you
> like. Hyperbole, for example, has been implemented across years of
> part-time work. Of course, it has complexities in its implementation
> and if the non-abstract parts of that interest you, then use edebug
> or trace commands to explore the code flow but I wouldn't expect
> anyone to write that out for you.

Hi Robert,

That's bad news. In the last years I became a specialist on helping
people with the "non-abstract parts", usually via chat... we discuss
until we find together what are the parts that are not clear to them,
them we write tests that show how those parts work, and then we go
back to the high-level functions.

In eev the two sexp hyperlinks below

  (find-efunction 'hkey-initialize)
  (find-efunction 'hkey-initialize "Bind the Action Key to {M-RET}")

point to the source code of `hkey-initialize', but the second one is a
"refinement" of the first one in this sense:

  (find-refining-intro)
  http://angg.twu.net/eev-intros/find-refining-intro.html

I often use sequences of sexp hyperlinks, with and without
refinements, to record an "explanation" of how something is done. For
example, this block

  (code-c-d "hyperbole" "~/.emacs.d/elpa/hyperbole-8.0.0/")
  (find-hyperbolefile "DEMO")
  (find-hyperbolefile "DEMO" "Action Key is {M-RET}")
  (find-hyperbolegrep "grep -nH --null -e M-RET *")
  (find-efunction 'hkey-initialize)
  (find-efunction 'hkey-initialize "Bind the Action Key to {M-RET}")
  (find-ekeymapdescr hyperbole-mode-map)
  (find-ekeymapdescr hyperbole-mode-map "M-RET")
  (find-ekeymapdescr hyperbole-mode-map "M-RET" "hkey-either")
  (find-efunction 'hkey-either)
  (find-efunction 'assist-key)
  (find-efunction 'assist-key-internal)
  (find-efunction 'action-key)
  (find-efunction 'action-key-internal)
  (find-efunction 'hkey-execute)
  (find-efunction 'hkey-execute "hkey-alist")
  (find-evardescr 'hkey-alist)
  (find-eppp   hkey-alist)
  (find-evariable 'hkey-alist)
  (find-evariable 'hkey-alist "If on a Hyperbole button")
  (find-efunction 'hbut:at-p)
  (find-efunction 'hbut:at-p "ebut:at-p")
  (find-efunction 'hbut:at-p "ibut:at-p")
  (find-efunction 'ebut:at-p)
  (find-efunction 'ebut:get)
  (find-efunction 'ibut:at-p)

is an attempt to understand how M-RET treats hkey-alist as a kind of
program to be run...

How would you rewrite the sexps above as Hyperbole buttons?

I downloaded a local copy of

  (find-hyperbolefile "FAST-DEMO")
  (find-hyperbolefile "FAST-DEMO" "GNU Hyperbole Videos")
  (find-hyperbolefile "FAST-DEMO" "Overview and Demo")
  (find-hyperbolefile "FAST-DEMO" "https://youtu.be/WKwZHSbHmPg;)

with

  (find-youtubedl-links nil nil "WKwZHSbHmPg" nil "hoandd")
  Docs: (find-efunction 'find-youtubedl-links)

and I found - via the transcript -

  (find-yttranscript-links "hoandd" "WKwZHSbHmPg")
  Docs: (find-efunction 'find-yttranscript-links)

that starting on 5:14

  (find-hypoanddvideo "05:14" "and so it's very easy to create these")
  (find-hypoanddvideo "05:17" "live")
  (find-hypoanddvideo "05:18" "uh interactive tutorials if you want")

you say that you can use Hyperbole buttons to create interactive
tutorials... I do that with eev all the time, but my "buttons" are
sexps.

Imagine for a moment that a group of, say, 42 Emacs users asks you to
prepare a video tutorial on how exactly hkey-alist works, because they
want to create their own extensions - button types? - and they think
that it would be nice, and useful to the world, etc, etc, if you could
record a video explaining that... would you still answer something
like this,

  "then use edebug or trace commands to explore the code flow but I
  wouldn't expect anyone to write that out for you"

or would you use Hyperbole to create an interactive tutorial
explaining the details, and record a video demo-ing it?

  [[]] =/,
Eduardo Ochs
http://angg.twu.net/#eev



Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Tim Cross


Ypo  writes:

> Thanks, Bruno
>
> I've debugged it manually because (keymap-lookup) doesn't seem to exist in my 
> emacs, if that's possible.
>
> The problem comes from:
>
> (define-key org-mode-map (kbd "C-u C-n") #'org-next-item)
>
> If I eval that line, "C-u C-SPC" stops working on org-mode. 
>
> Same problem in runemacs -q. Is it a bug?
>

You cannot use C-u like this.

The C-u is a binding to the 'universal argument'. Your line breaks that
binding so that it no longer works. What you have done is (sort of)
created a new binding which shadows the old universal argument binding
and sets up C-u as a prefix. Now, when you hit C-u emacs is waiting for
C-n. 

You will need to use some other key binding. This can be difficult as
most of the good ones are already used. Packages like free-keys can help
identify spare/unused bindings. This is one reason I like evil-mode - I
have a wealth of available bindings, most of which easy to access
without leaving the keyboard (or 'home' row). For example, in org mode,
I have j/k for down/up line, S-j/S-k for down/up heading and M-j/M-k for
down/up list item. 



Re: Org and Hyperbole

2022-06-26 Thread Robert Weiner
Hi Jonathan:

Yes, I no longer have time to maintain it and based on quality standards
don't wish to re-release it unless one or more highly experienced Emacs
package developers want to take it on, as it is a good size package.  Such
a person would have to have developed significant Emacs packages like Org
or Hyperbole and have reasonable time to answer questions and make updates
as issues and requests came in.  Familiarity with a multitude of
object-oriented languages would also be useful.  Such volunteers are
welcome.  Please don't offer if you have the desire but not the experience.

In the event no such party appears, when I do find time to make some
necessary updates for a release, I'll do my best to get to it and then make
a release that you can check out.

-- rsw

On Sun, Jun 26, 2022 at 4:28 PM indieterminacy
 wrote:

>
> On 26-06-2022 22:03, David Masterson wrote:
> >  writes:
> >
> >> On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:
> >
> >>> [...] I feel that some of the
> >>> questions raised here about Hyperbole sound akin to the story of five
> >>> blind men feeling the elephant [...]
> >>
> >> The nice thing about that kind of situation is that it only can
> >> improve
> >> by adding in a sixth blind man ;-)
> >>
> >> Thank you from someone "too swamped right now to try to tackle another
> >> whole peradigm, but still enormously curious about this thing".
> >
> > Yup!  I hope a new generation of users will sprout.  As I mentioned to
> > Bob, I think OO-Browser will bring programmers in to help expand
> > Hyperbole as well as OO-Browser.
>
> Ive seen references to OO-Browser (documentation, wistfulness) but hadnt
> come across how to try it.
>
> Id interpreted it as being a victim of bitrot and lost in the sands of
> time (and is resting next to a genie lamp and hardback documentation for
> Xemacs).
>
> Is there a working version about for GNU Emacs?
>
>
> --
> Jonathan McHugh
> indieterminacy@libre.brussels
>
>


Re: Org and Hyperbole

2022-06-26 Thread Robert Weiner
Hi Siva:

Yes, I think you have a good handle on the concepts behind Hyperbole
buttons and additional Action Key contexts.  Beyond that, there is also the
Koutliner, HyRolo and HyControl in Hyperbole as you grow into it.  Look
forward to seeing some of the implicit button types you create for your own
use.

-- rsw

On Sun, Jun 26, 2022 at 2:37 AM Siva Swaminathan 
wrote:

> Hello,
>
> I only recently became aware of Hyperbole (through Bob's demo video
> available on Youtube), and came across this thread while googling to
> find more information about Hyperbole. I feel that some of the
> questions raised here about Hyperbole sound akin to the story of five
> blind men feeling the elephant, so I humbly offer my perspective on
> what I consider to be the key underlying ideas. Forgive me if I'm
> stating the obvious, and I also don't know whether Hyperbole as
> currently implemented does exactly all this :-)
>
> I'd like to think of the key idea of Hyperbole as converting text in
> buffers into *objects* (aka "buttons") by attaching *behavior* to them.
> The two actions provided by convention could be thought of as akin to
> the left-click and right-click which one is familiar with in
> contemporary GUIs, in this case respectively bound to methods for "do
> (by default)" and "show metadata". Supporting more
> behaviors/methods/messages for user-invocation is an obvious next idea
> (if not already so).
>
> The above system would be of quite limited composability if it required
> objects to be defined explicitly -- because most buffers one operates
> on are generated without awareness of Hyperbole (imagine the pain of
> everything needing to conform to something like a Hyperbole
> framework/protocol!). The cleverness behind implicit buttons is that
> one can opportunistically use common conventions as "schemas" to "parse
> / deserialize" the contents which make up an object from any buffer (in
> this case via regexps) and attach corresponding (expected) behaviors to
> them! Because of the highly structured nature of such data, even if
> embedded in a stream of plain text, it can typically be parsed
> correctly without needing explicit type annotations. The behaviors
> could presumably depend not just the object, but also the active modes,
> environment variables, etc.
>
> Here are a few made-up example use cases (hand-waving over details):
>
> 1. I might embed phrases such as "bug:123" in my code / emails / org
> task management and have behaviors that respectively fetch the bug
> report / open some URL in a browser / or update the TODO status based
> on the bug status, as desired. This would help me interface
> conveniently with a bespoke bug-tracking tool.
>
> 2. On encountering Goodreads links in my reading list org file, I could
> have a behavior to parse the contents of the webpage and extract
> desired metadata to add to the item properties (or an entry to some org
> table).
>
> 3. Linking by immutable block identifiers (and fast lookup) of course
> enables a lot of PKM workflows that have recently become popular (with
> the addition of bidirectional links).
>
> Other aspects such as menus generated from button files seem like
> convenient affordances bolted on to make up the UI of the system. I
> still need to wrap my mind around these, but I wonder whether there
> might be opportunities to compose with other ecosystem tools which have
> pioneered some nice UI ideas eg. transient menus, hydras, interactive
> selection lists, etc. But that's a discussion for the Hyperbole mailing
> list.
>
>
> From a first impression, I'm really impressed, and also surprised that
> Hyperbole is not more popular. Much gratitude to the contributors for a
> nifty tool, and a fascinating design perspective.
>
> Best regards,
> Siva
> http://sivark.me
>
>


Re: Org and Hyperbole

2022-06-26 Thread indieterminacy



On 26-06-2022 22:03, David Masterson wrote:

 writes:


On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:



[...] I feel that some of the
questions raised here about Hyperbole sound akin to the story of five
blind men feeling the elephant [...]


The nice thing about that kind of situation is that it only can 
improve

by adding in a sixth blind man ;-)

Thank you from someone "too swamped right now to try to tackle another
whole peradigm, but still enormously curious about this thing".


Yup!  I hope a new generation of users will sprout.  As I mentioned to
Bob, I think OO-Browser will bring programmers in to help expand
Hyperbole as well as OO-Browser.


Ive seen references to OO-Browser (documentation, wistfulness) but hadnt 
come across how to try it.


Id interpreted it as being a victim of bitrot and lost in the sands of 
time (and is resting next to a genie lamp and hardback documentation for 
Xemacs).


Is there a working version about for GNU Emacs?


--
Jonathan McHugh
indieterminacy@libre.brussels



Re: Org, Hyperbole, and eev

2022-06-26 Thread Robert Weiner
That was not the offer.  The offer was to show you how to implement a
discrete eev command using another framework, possibly simplifying its
implementation.  Hopefully, from seeing the code used to do this, you could
dig in yourself and follow the flow to whatever level you like.  Hyperbole,
for example, has been implemented across years of part-time work.  Of
course, it has complexities in its implementation and if the non-abstract
parts of that interest you, then use edebug or trace commands to explore
the code flow but I wouldn't expect anyone to write that out for you.

#3 is closer to the offer.  If you want to see a Hyperbole function or
button type equivalent, I can show you that, i.e. you load Hyperbole and
then you use Hyperbole or eev syntax to jump to a point in a video that is
done through a Hyperbole implementation.  But I can't explain the Hyperbole
dispatching mechanisms except at a high level.  hkey-alist in Hyperbole is
not hard to understand.  The prioritized list of implicit buttons types in
Hyperbole is not that hard to understand.  That kind of level I can discuss.

-- rsw

-- rsw

On Sun, Jun 26, 2022 at 3:45 PM Eduardo Ochs  wrote:

> On Sun, 26 Jun 2022 at 15:23, Robert Weiner  wrote:
> >
> > Maybe if you could pick a single eev function that you think could
> > be implemented with Org and Hyperbole and pointed us to the
> > documentation for that, then we could show you an equivalent one
> > using these packages and begin to give you a better sense of how you
> > would go about leveraging what has been built. You document
> > everything in detail, so this should be pretty simple.
>
> I am not sure if I understood your proposal correctly, but let me
> propose three tasks that would be pretty natural in eev-land... In all
> cases below "explain" means "explain step by step, with links to the
> source code and to the docs, and with sexps that inspect the data
> structures".
>
>   1) explain what happens when we type M-RET on this button:
>
>"subr.el"
>
>   2) explain what happens when we type:
>
>C-h h d d
>
>   3) suppose that we have a function that plays a local copy of your
>  video "GNU Hyperbole - Overview and Demo". Let's use this fake
>  function instead of a real one:
>
>;; Test: (fake-play-oand "2:34")
>;;
>(defun fake-play-oand (time  comments)
>  (move-beginning-of-line 2)
>  (insert (format "[Play Overview and Demo from: %s]\n" time)))
>
>  Explain how you would implement buttons - choose your favorite
>  syntax for them - that play "GNU Hyperbole - Overview and Demo"
>  starting from a given timemark.
>
> Is that a good starting point? Note the unusual meaning for
> "explain"... how would you use Hyperbole to prepare these
> "explanations"?
>
> > From my perspective, I do really like your idea of replayable
> > notebooks for training and interaction purposes. And you have
> > certainly made that easy to use via eev. But your implementation
> > could use much better organization and abstraction which would
> > likely greatly reduce the code size as well. You should separate out
> > computation of what you want to display from how and where you will
> > display it as one technique.
>
> I'm very interested in seeing your suggestions! Can you be more
> concrete?
>
>   [[]],
> Eduardo Ochs
> http://angg.twu.net/#eev
>


Re: Org and Hyperbole

2022-06-26 Thread David Masterson
 writes:

> On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:

>> [...] I feel that some of the
>> questions raised here about Hyperbole sound akin to the story of five
>> blind men feeling the elephant [...]
>
> The nice thing about that kind of situation is that it only can improve
> by adding in a sixth blind man ;-)
>
> Thank you from someone "too swamped right now to try to tackle another
> whole peradigm, but still enormously curious about this thing".

Yup!  I hope a new generation of users will sprout.  As I mentioned to
Bob, I think OO-Browser will bring programmers in to help expand
Hyperbole as well as OO-Browser.

-- 
David Masterson



Re: Org, Hyperbole, and eev

2022-06-26 Thread Eduardo Ochs
On Sun, 26 Jun 2022 at 15:23, Robert Weiner  wrote:
>
> Maybe if you could pick a single eev function that you think could
> be implemented with Org and Hyperbole and pointed us to the
> documentation for that, then we could show you an equivalent one
> using these packages and begin to give you a better sense of how you
> would go about leveraging what has been built. You document
> everything in detail, so this should be pretty simple.

I am not sure if I understood your proposal correctly, but let me
propose three tasks that would be pretty natural in eev-land... In all
cases below "explain" means "explain step by step, with links to the
source code and to the docs, and with sexps that inspect the data
structures".

  1) explain what happens when we type M-RET on this button:

   "subr.el"

  2) explain what happens when we type:

   C-h h d d

  3) suppose that we have a function that plays a local copy of your
 video "GNU Hyperbole - Overview and Demo". Let's use this fake
 function instead of a real one:

   ;; Test: (fake-play-oand "2:34")
   ;;
   (defun fake-play-oand (time  comments)
 (move-beginning-of-line 2)
 (insert (format "[Play Overview and Demo from: %s]\n" time)))

 Explain how you would implement buttons - choose your favorite
 syntax for them - that play "GNU Hyperbole - Overview and Demo"
 starting from a given timemark.

Is that a good starting point? Note the unusual meaning for
"explain"... how would you use Hyperbole to prepare these
"explanations"?

> From my perspective, I do really like your idea of replayable
> notebooks for training and interaction purposes. And you have
> certainly made that easy to use via eev. But your implementation
> could use much better organization and abstraction which would
> likely greatly reduce the code size as well. You should separate out
> computation of what you want to display from how and where you will
> display it as one technique.

I'm very interested in seeing your suggestions! Can you be more
concrete?

  [[]],
Eduardo Ochs
http://angg.twu.net/#eev



Re: Beamer export: Executing LaTeX between two frames

2022-06-26 Thread Fraga, Eric
On Sunday, 26 Jun 2022 at 12:17, Ihor Radchenko wrote:
> This is too hacky as for my taste.
>
> I'd rather use :ignore: tag from ox-extra:

Excellent.  I did not know that the ignore tag processing closed the
previous headline body as it seems to do given your example.  This
definitely makes things less hacky!

-- 
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50


Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Ypo

Thanks, Bruno

I will save your advice for future debugging :-)


Maybe you could use the keys that are already defined by org, to move
between list items ?


 ‘S-’
 ‘S-’
  Jump to the previous/next item in the current list, but only if
  ‘org-support-shift-select’ is off(6).  If not, you can still use
  paragraph jumping commands like ‘C-’ and ‘C-’ to quite
  similar effect.


That requires me to change hands position, I must think about it.

Best regards :-)

El 26/06/2022 a las 21:13, Bruno Barbier escribió:

Ypo  writes:


Thanks, Bruno

I've debugged it manually because (keymap-lookup) doesn't seem to exist
in my emacs, if that's possible.

Sorry, my bad. 'keymap-lookup' will only exist in 29.  I should have
used 'lookup-key':

  (lookup-key global-map (kbd "C-u"))
  

The problem comes from:

(define-key org-mode-map (kbd "C-u C-n") #'org-next-item)

If I eval that line, "C-u C-SPC" stops working on org-mode.

Same problem in runemacs -q. Is it a bug?

That line is the problem. It's hiding the real "C-u"
(universal-argument) in org-mode buffers. Once you've lost the standard
meaning of "C-u", you can't use C-u C-SPC and all other functions.

Maybe you could use the keys that are already defined by org, to move
between list items ?


 ‘S-’
 ‘S-’
  Jump to the previous/next item in the current list, but only if
  ‘org-support-shift-select’ is off(6).  If not, you can still use
  paragraph jumping commands like ‘C-’ and ‘C-’ to quite
  similar effect.

Bruno




El 25/06/2022 a las 9:47, Bruno Barbier escribió:

Hi Ypo,

Ypo   writes:


Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
  (error "C-u has been redefined"))


I'm not sure in what way it didn't work and I didn't try bug-hunter yet.


FWIW, just in case it might help you, when I have such a problem, I just
define a function, something like:

 (defun my-check-bug ()
   "Throw an error when C-u is not the universal argument in org-mode."
   (with-temp-buffer
 (org-mode)
 (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
   (error "C-u has been redefined"


Then I add:

 (my-check-bug)
 
everywhere in my init files and I start emacs with --debug-init.


Good luck,

Bruno



Re: We have asynchronous sessions, why have anything else?

2022-06-26 Thread Ivar Fredholm
Hi, Ihor,
I believe the two could be unified if we expand the functionality of the async 
filter to look for 'exception' tags. Then each language implementation must 
only put the org-babel src block in a try-except type construction and put the 
error message into the except block. The async filter will then find the error 
information and report it back to the org-buffer. We could then emulate the 
synchronous session functionality by adding a filter to the async-filter which 
blocks until an 'end' or 'exception' tag is detected. This way, all four 
combinations of session/session-less and synchronous/asynchronous header 
arguments could be handled by the asynchronous code alone.
Best, Guacho




Sent with Proton Mail secure email.

--- Original Message ---
On Saturday, June 25th, 2022 at 10:28 PM, Ihor Radchenko  
wrote:


> Ivar Fredholm freddyho...@protonmail.com writes:
>
> > A session-less block can be executed by starting a session with a special 
> > name (say "*none") which always gets killed after block execution is 
> > completed. For interpreter-less languages, we could use the shell as an 
> > interpreter (for instance, if we wanted to execute C, we could just start a 
> > shell, and send it the gcc command to compile and execute). Would this not 
> > cut down the amount of code that needs to be maintained and uniformize the 
> > existing code?
>
>
> Feel free to compare ob-eval.el and ob-comint.el. Their functionality is
> not equivalent. In particular ob-eval.el has a better handling of
> errors.
>
> If you find a way to unify the two without loosing the functionality, it
> will be welcome.
>
> Best,
> Ihor



Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Bruno Barbier
Ypo  writes:

> Thanks, Bruno
>
> I've debugged it manually because (keymap-lookup) doesn't seem to exist 
> in my emacs, if that's possible.

Sorry, my bad. 'keymap-lookup' will only exist in 29.  I should have
used 'lookup-key':

 (lookup-key global-map (kbd "C-u"))
 
>
> The problem comes from:
>
> (define-key org-mode-map (kbd "C-u C-n") #'org-next-item)
>
> If I eval that line, "C-u C-SPC" stops working on org-mode.
>
> Same problem in runemacs -q. Is it a bug?

That line is the problem. It's hiding the real "C-u"
(universal-argument) in org-mode buffers. Once you've lost the standard
meaning of "C-u", you can't use C-u C-SPC and all other functions.

Maybe you could use the keys that are already defined by org, to move
between list items ?


‘S-’
‘S-’
 Jump to the previous/next item in the current list, but only if
 ‘org-support-shift-select’ is off(6).  If not, you can still use
 paragraph jumping commands like ‘C-’ and ‘C-’ to quite
 similar effect.

Bruno


>
>
> El 25/06/2022 a las 9:47, Bruno Barbier escribió:
>> Hi Ypo,
>>
>> Ypo  writes:
>>
>>> Hi, Bruno
>>>
>>> Yes, I tried your assertion for bug-hunter, but it didn't work.
>>>
>>> (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
>>>  (error "C-u has been redefined"))
>>>
>> I'm not sure in what way it didn't work and I didn't try bug-hunter yet.
>>
>>
>> FWIW, just in case it might help you, when I have such a problem, I just
>> define a function, something like:
>>
>> (defun my-check-bug ()
>>   "Throw an error when C-u is not the universal argument in org-mode."
>>   (with-temp-buffer
>> (org-mode)
>> (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
>>   (error "C-u has been redefined"
>>
>>
>> Then I add:
>>
>> (my-check-bug)
>> 
>> everywhere in my init files and I start emacs with --debug-init.
>>
>> Good luck,
>>
>> Bruno
>>
>>



Re: [PATCH] Re: ox-latex table tabbing support.

2022-06-26 Thread Daniel Fleischer
Kyle Meyer [2022-06-26 Sun 14:18] wrote:

> Thanks for the follow-up patch.

> This format doesn't quite align to the conventions.  Here are two
> examples:
>
> ,[ https://orgmode.org/worg/org-contribute.html#commit-messages ]
> |  * lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
> |  string before calling `string-match'.
> |  (org-capture-templates): Fix customization type.
> `
>
> ,[ 
> https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
>  ]
> | * lisp/term.el (term-emulate-terminal): Avoid errors if the whole
> | decoded string is eight-bit characters.  Don't attempt to save the
> | string for next iteration in that case.
> | * test/lisp/term-tests.el (term-decode-partial)
> | (term-undecodable-input): New tests.
> `

Thanks for the feedback!

Applied to master 321bfb88b5.

-- 

Daniel Fleischer



Re: [PATCH] Re: ox-latex table tabbing support.

2022-06-26 Thread Kyle Meyer
Thanks for the follow-up patch.

Daniel Fleischer writes:

> Subject: [PATCH] lisp/ox-latex.el: tabbing code refactor
>
> * lisp/ox-latex.el: documentation, indentation, cleaning
> (org-latex-table)
> (org-latex--align-string-tabbing)
> (org-table--org-tabbing)

This format doesn't quite align to the conventions.  Here are two
examples:

,[ https://orgmode.org/worg/org-contribute.html#commit-messages ]
|  * lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
|  string before calling `string-match'.
|  (org-capture-templates): Fix customization type.
`

,[ 
https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
 ]
| * lisp/term.el (term-emulate-terminal): Avoid errors if the whole
| decoded string is eight-bit characters.  Don't attempt to save the
| string for next iteration in that case.
| * test/lisp/term-tests.el (term-decode-partial)
| (term-undecodable-input): New tests.
`

[...]
> +  (or (org-export-read-attribute :attr_latex table :align)
> +  (let* ((count
> +  ;; Count the number of cells in the first row.
> +  (length
> +   (org-element-map
> +   (org-element-map table 'table-row
> + (lambda (row)
> +   (and (eq (org-element-property :type row)
> +'standard)
> +row))
> + info 'first-match)
> +   'table-cell
> + (lambda (cell) cell

Fine as is, but (lambda (cell) cell) could be reduced to #'identity

> + ;; Calculate the column width, using a proportion of
> + ;;the documets textwidth.

nit: missing space before "the"

typo: documets -> document's

> +(defun org-table--org-tabbing (table contents info)
> +  "Return tabbing environment latex code for Org table.

Perhaps s/latex/LaTeX/ for consistency?

Otherwise, looks good to me.  Thanks again.



Re: Org, Hyperbole, and eev

2022-06-26 Thread Robert Weiner
Hi Eduardo:

I do get this and see this is why you have not leveraged Hyperbole or Org
for eev implementation.  (I do feel eev has a number of interesting and
useful ideas, and as I've said to you personally, I just hoped you could
use Hyperbole or other existing Emacs infrastructure to avoid embedding so
much code within eev).

I took a brief look today at some of the code in the latest packaged
release of eev from ELPA, as well as a bit at some of your email archives
and video links.  What I see is that you like things extraordinarily
concrete and packages like Hyperbole and Org try to build up generalized
abstractions that can be used in many contexts.  When you try to break down
how these abstractions work at the very low-level concrete mental model you
like, you find them too complex and therefore have to set them aside.  If
you can't bend on that, then I think your choice is right, to just build
large amounts of low-level code that meets your needs.  I think the way you
archive long lists of hyperlinks into videos for every few words spoken in
the video speaks to this style.  I see the utility but this is not a common
style or need.  It feels like we are offering a 'pour a glass of water'
function and you are trying to understand the physics of the molecular
movement within the water while it is pouring.  Because you struggle to do
so, you decide you can't use our functions/capabilities, which is fine if
this is how your mind works, but really should not be a commentary upon the
packages provided.

You see each day new people are coming to these packages and figuring out
not only how to use them but to extend them to meet their needs, either
through new hyperbutton types or snippets of additional code.  So they can
be bent to people's wills but you have to be willing to deal with
abstractions, not the equivalent of assembly language to do so.

Maybe if you could pick a single eev function that you think could be
implemented with Org and Hyperbole and pointed us to the documentation for
that, then we could show you an equivalent one using these packages and
begin to give you a better sense of how you would go about leveraging what
has been built.  You document everything in detail, so this should be
pretty simple.

>From my perspective, I do really like your idea of replayable notebooks for
training and interaction purposes.  And you have certainly made that easy
to use via eev.  But your implementation could use much better organization
and abstraction which would likely greatly reduce the code size as well.
You should separate out computation of what you want to display from how
and where you will display it as one technique.

-- rsw

On Sun, Jun 26, 2022 at 1:52 PM Eduardo Ochs  wrote:

> On Sun, 26 Jun 2022 at 13:29, Robert Weiner  wrote:
> > Hi Eduardo:
> >
> > I really think that you are confused in saying that Hyperbole and Org
> are hacker-unfriendly.  Yes, they are targeted at users who don't have to
> understand the programming, but if you do understand Lisp programming well,
> the interactive features are available as Lisp functions in almost all
> cases, so you simply have to dive in, find the functions you want and
> utilize or change them.
> >
> > In fact, Hyperbole offers 'action implicit buttons' that utilize
> angle-bracket syntax to turn any Lisp function (or hyperbole button type
> call or variable reference) into a hyperbutton that runs the function with
> arguments or displays the variable, e.g.   my-org-file.org">.
> >
> > With Hyperbole, much of the behavior is factored into class-like
> libraries with the 'methods' alphabetized and separated into public and
> private groupings.  Now some of this code is complex in order to handle
> many contexts and make things simple to the user but that is a matter of
> you understanding this complexity if you want to hack on it.
> >
> > I'm not sure what else you could ask for in packages.
>
>
> Hi Robert,
>
> let me see if I can find something useful to say...
>
> Most of the people that I know who became active users of eev were
> "beginner programmers" when they started using eev - by "beginner
> programmers" I mean that their mental buffers were still quite small,
> and they couldn't understand well functions that were more than a few
> lines long. I wanted to make eev more accessible to people like them,
> and I treated their feedback very seriously.
>
> One of the techniques that I used to make eev more accessible to them
> is described in this video,
>
>   http://angg.twu.net/find-elisp-intro.html
>   (find-1stclassvideo-links "2022findelispintro")
>   (find-2022findelispintrovideo "14:36")
>
> from 14:36 onwards - "put several similar examples close to one
> another, starting by the most basic ones".
>
> I treated that technique as "obvious" for many years - I just used it
> in many places, and I thought that the users would notice that
> pattern, and start to use it in their own notes. That didn't work, and
> I saw that I had to 

Re: Org, Hyperbole, and eev

2022-06-26 Thread Eduardo Ochs
On Sun, 26 Jun 2022 at 13:29, Robert Weiner  wrote:
> Hi Eduardo:
>
> I really think that you are confused in saying that Hyperbole and Org are 
> hacker-unfriendly.  Yes, they are targeted at users who don't have to 
> understand the programming, but if you do understand Lisp programming well, 
> the interactive features are available as Lisp functions in almost all cases, 
> so you simply have to dive in, find the functions you want and utilize or 
> change them.
>
> In fact, Hyperbole offers 'action implicit buttons' that utilize 
> angle-bracket syntax to turn any Lisp function (or hyperbole button type call 
> or variable reference) into a hyperbutton that runs the function with 
> arguments or displays the variable, e.g.   "~/.org/my-org-file.org">.
>
> With Hyperbole, much of the behavior is factored into class-like libraries 
> with the 'methods' alphabetized and separated into public and private 
> groupings.  Now some of this code is complex in order to handle many contexts 
> and make things simple to the user but that is a matter of you understanding 
> this complexity if you want to hack on it.
>
> I'm not sure what else you could ask for in packages.


Hi Robert,

let me see if I can find something useful to say...

Most of the people that I know who became active users of eev were
"beginner programmers" when they started using eev - by "beginner
programmers" I mean that their mental buffers were still quite small,
and they couldn't understand well functions that were more than a few
lines long. I wanted to make eev more accessible to people like them,
and I treated their feedback very seriously.

One of the techniques that I used to make eev more accessible to them
is described in this video,

  http://angg.twu.net/find-elisp-intro.html
  (find-1stclassvideo-links "2022findelispintro")
  (find-2022findelispintrovideo "14:36")

from 14:36 onwards - "put several similar examples close to one
another, starting by the most basic ones".

I treated that technique as "obvious" for many years - I just used it
in many places, and I thought that the users would notice that
pattern, and start to use it in their own notes. That didn't work, and
I saw that I had to spell out that technique explicitly, and repeat it
often.

When I asked you questions about how to create eev-style sexps that
would behave as hyperbole-style buttons, in some of the e-mails that I
point to here,

  http://angg.twu.net/hyperbole.html

I was signaling that my mental buffers were almost full... at that
point explanations in English helped me very little, and I was trying
to write "several similar examples close to one another, starting by
the most basic ones" to factor your code conceptually via tests.

I _still_ think that your buttons and menus are hacker-unfriendly. The
source code is available, yes, but I spent several evenings trying to
understand them in my "non-user" way, and I got a mental buffer
overflow instead of enlightenment... and I also spent many hours
writing e-mails to the Hyperbole mailing list, but the answers left me
very frustrated.

  Hope that helps, =/
Eduardo Ochs
http://angg.twu.net/#eev



Re: Allowed characters/formatting in Org text blocks

2022-06-26 Thread Fabio Natali
On 2022-06-26 19:39:25 +0800, Ihor Radchenko  wrote:
[...]
> So, headlines always have higher priority over other elements because
> they always serve as separators of the document or parent heading
> contents.
> 
> The high priority of headline elements has prons and cons.

Hey Ihor,

I see, it all makes sense. That was a very useful recap.

Thanks for your help with this! All the best, Fabio.



Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Ypo

Thanks, Bruno

I've debugged it manually because (keymap-lookup) doesn't seem to exist 
in my emacs, if that's possible.


The problem comes from:

(define-key org-mode-map (kbd "C-u C-n") #'org-next-item)

If I eval that line, "C-u C-SPC" stops working on org-mode.

Same problem in runemacs -q. Is it a bug?


El 25/06/2022 a las 9:47, Bruno Barbier escribió:

Hi Ypo,

Ypo  writes:


Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
 (error "C-u has been redefined"))


I'm not sure in what way it didn't work and I didn't try bug-hunter yet.


FWIW, just in case it might help you, when I have such a problem, I just
define a function, something like:

(defun my-check-bug ()
  "Throw an error when C-u is not the universal argument in org-mode."
  (with-temp-buffer
(org-mode)
(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
  (error "C-u has been redefined"


Then I add:

(my-check-bug)

everywhere in my init files and I start emacs with --debug-init.


Good luck,

Bruno



Re: Org, Hyperbole, and eev

2022-06-26 Thread Robert Weiner
Hi Eduardo:

I really think that you are confused in saying that Hyperbole and Org are
hacker-unfriendly.  Yes, they are targeted at users who don't have to
understand the programming, but if you do understand Lisp programming well,
the interactive features are available as Lisp functions in almost all
cases, so you simply have to dive in, find the functions you want and
utilize or change them.

In fact, Hyperbole offers 'action implicit buttons' that utilize
angle-bracket syntax to turn any Lisp function (or hyperbole button type
call or variable reference) into a hyperbutton that runs the function with
arguments or displays the variable, e.g.  .

With Hyperbole, much of the behavior is factored into class-like libraries
with the 'methods' alphabetized and separated into public and private
groupings.  Now some of this code is complex in order to handle many
contexts and make things simple to the user but that is a matter of you
understanding this complexity if you want to hack on it.

I'm not sure what else you could ask for in packages.

-- rsw

On Sun, Jun 26, 2022 at 11:58 AM Eduardo Ochs  wrote:

> Hi all,
>
> this message is slightly off-topic, and a shameless plug...
>
> Eev can do many things that Org and Hyperbole and do, but it makes
> very little sense to people who can play the role of "users" well, in
> the sense of people who can "use" Emacs packages without looking at
> the elisp source and hacking it, i.e.: reading the source of the
> package, inspecting and understanding its data structures, and
> creating sexps that call the package's functions directly...
>
> Eev still has a couple of parts whose data structures are hard to
> inspect. I don't regard these parts as "real" bugs, but I do regard
> them as hugely embarassing - and I have just fixed one of them:
> `find-here-links', that is explained in this section of the main
> tutorial,
>
>   http://angg.twu.net/eev-intros/find-eev-quick-intro.html#4.1
>
> and in this other tutorial:
>
>   http://angg.twu.net/eev-intros/find-here-links-intro.html
>
> The way to run `find-here-links' in debug mode is explained here,
>
>   http://angg.twu.net/eev-current/eev-hlinks.el.html
>
> in the second part of the ";;; Commentary:" at the top - look for
> "Debug mode".
>
> As I mentioned in the other thread
>
>   https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00524.html
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/threads.html#00524
>
> and in these pages,
>
>   http://angg.twu.net/2021-org-for-non-users.html
>   http://angg.twu.net/find-elisp-intro.html
>   http://angg.twu.net/eev-wconfig.html
>   http://angg.twu.net/hyperbole.html
>
> I find Org and Hyperbole difficult mainly because they are
> hacker-unfriendly. It _may be_ that some of the people who said that
> they find Org very hard in this thread
>
>
> https://lists.gnu.org/archive/html/emacs-devel/2022-06/threads.html#00186
>
> would also benefit from a bit more of hacker-friendliness... and so it
> would be great if more ideas could flow between Org, eev, and Hyperbole.
>
>   Cheers and sorry the noise =P,
> Eduardo Ochs
> http://angg.twu.net/#eev
>
>


Org, Hyperbole, and eev

2022-06-26 Thread Eduardo Ochs
Hi all,

this message is slightly off-topic, and a shameless plug...

Eev can do many things that Org and Hyperbole and do, but it makes
very little sense to people who can play the role of "users" well, in
the sense of people who can "use" Emacs packages without looking at
the elisp source and hacking it, i.e.: reading the source of the
package, inspecting and understanding its data structures, and
creating sexps that call the package's functions directly...

Eev still has a couple of parts whose data structures are hard to
inspect. I don't regard these parts as "real" bugs, but I do regard
them as hugely embarassing - and I have just fixed one of them:
`find-here-links', that is explained in this section of the main
tutorial,

  http://angg.twu.net/eev-intros/find-eev-quick-intro.html#4.1

and in this other tutorial:

  http://angg.twu.net/eev-intros/find-here-links-intro.html

The way to run `find-here-links' in debug mode is explained here,

  http://angg.twu.net/eev-current/eev-hlinks.el.html

in the second part of the ";;; Commentary:" at the top - look for
"Debug mode".

As I mentioned in the other thread

  https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00524.html
  https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/threads.html#00524

and in these pages,

  http://angg.twu.net/2021-org-for-non-users.html
  http://angg.twu.net/find-elisp-intro.html
  http://angg.twu.net/eev-wconfig.html
  http://angg.twu.net/hyperbole.html

I find Org and Hyperbole difficult mainly because they are
hacker-unfriendly. It _may be_ that some of the people who said that
they find Org very hard in this thread

  https://lists.gnu.org/archive/html/emacs-devel/2022-06/threads.html#00186

would also benefit from a bit more of hacker-friendliness... and so it
would be great if more ideas could flow between Org, eev, and Hyperbole.

  Cheers and sorry the noise =P,
Eduardo Ochs
http://angg.twu.net/#eev



[PATCH] Re: ox-latex table tabbing support.

2022-06-26 Thread Daniel Fleischer
Kyle Meyer [2022-06-25 Sat 23:49] wrote:

> Thanks for flagging this, Ihor.  I was just glancing at this commit
> (4a0d951c6) due to seeing this warning.  It's doing
>
>   (let ((align ...))
> (setq align ...))
>
> where the align value is returned, so the align binding can be dropped
> altogether.
>
> Daniel, in addition to that, there are at least a few other issues with
> 4a0d951c6 that should be addressed:
>
>  * the first line of the new docstrings should be a complete sentence.
>
>For example
>
>  Return an appropriate LaTeX alignment string, for the
>  latex tabbing environment.
>
>should be changed to something like
>
>  Return alignment string for LaTeX tabbing environment.
>
>See (info "(elisp)Documentation Tips")
>
>  * the indentation is off in several places, including the start of the
>docstrings.  Please indent the code with, e.g., indent-region.
>
>  * one of org-table--org-tabbing's parameters is a typo (contenst),
>which it looks like Ihor pointed out in an earlier review
>
>  * comment typo: documets
>
>  * several spots put opening and trailing parentheses on their own line
>
>That goes against the usual conventions of this repo:
>
>  $ git grep '^ *)' '*.el' | wc -l
>  42
>  $ git grep '( *$' '*.el' | wc -l
>  17
>
>  * rather than doing something like
>
>  (let ((x ""))
>(setq x )
>...)
>
>just do
>
>  (let ((x ))
>   ...)
>
>And consider whether it's worth adding a binding at all rather than
>inlining the code.
>
>As an extreme case, org-table--org-tabbing does
>
>  (let ((output (format ...)))
>output)
>
>rather than
>
>  (format ...)

Thanks for the code feedback; patch attached. 

>From b041dd62cbeea924ea6d2b6dee9b1142aef968ec Mon Sep 17 00:00:00 2001
From: Daniel Fleischer 
Date: Sun, 26 Jun 2022 17:25:00 +0300
Subject: [PATCH] lisp/ox-latex.el: tabbing code refactor

* lisp/ox-latex.el: documentation, indentation, cleaning
(org-latex-table)
(org-latex--align-string-tabbing)
(org-table--org-tabbing)

See
https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00700.html.
---
 lisp/ox-latex.el | 66 +++-
 1 file changed, 31 insertions(+), 35 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 898fa34dd..1446b7fca 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3667,7 +3667,8 @@ (defun org-latex-table (table contents info)
((or (string= type "math") (string= type "inline-math"))
 (org-latex--math-table table info))
;; Case 3: Tabbing
-   ((string= type "tabbing") (org-table--org-tabbing table contents info))
+   ((string= type "tabbing")
+(org-table--org-tabbing table contents info))
;; Case 4: Standard table.
(t (concat (org-latex--org-table table contents info)
 		  ;; When there are footnote references within the
@@ -3706,32 +3707,29 @@ (defun org-latex--align-string (table info  math?)
 	(apply 'concat (nreverse align)
 
 (defun org-latex--align-string-tabbing (table info)
-"Return an appropriate LaTeX alignment string, for the
-latex tabbing environment.
+  "Return LaTeX alignment string using tabbing environment.
 TABLE is the considered table.  INFO is a plist used as
 a communication channel."
-(or (org-export-read-attribute :attr_latex table :align)
-(let ((align "")
-  (count 0)
-  (separator ""))
-;; Count the number of cells in the first row.
-(setq count (length
-  (org-element-map
-  (org-element-map table 'table-row
-(lambda (row)
-  (and (eq (org-element-property :type row) 'standard) row))
-info 'first-match)
-  'table-cell
-(lambda (cell) cell
-;; Calculate the column width, using a proportion of the documets
-;; textwidth.
-(setq separator (format
- "\\hspace{%s\\textwidth} \\= "
- (- (/  1.0 count) 0.01)))
-(setq align (concat
- (apply 'concat (make-list count separator))
- "\\kill")))
-))
+  (or (org-export-read-attribute :attr_latex table :align)
+  (let* ((count
+  ;; Count the number of cells in the first row.
+  (length
+   (org-element-map
+   (org-element-map table 'table-row
+ (lambda (row)
+   (and (eq (org-element-property :type row)
+'standard)
+row))
+ info 'first-match)
+   'table-cell
+ (lambda (cell) cell
+ ;; Calculate the column width, using a proportion of
+ ;;the documets textwidth.
+   

Re: [PATCH] describe how to override Author

2022-06-26 Thread Daniel Fleischer
Robert Pluim [2022-06-26 Sun 15:47] wrote:

> Something like this? (I hope Iʼve got the syntax right, I seldom write
> org for exporting purposes). The emacs CONTRIBUTE guidelines talk
> about setting 'Author', but I guess not everyone reads those...


> +When applying patches written by other people, please ensure that the
> +=Author= information of the resulting commit(s) is correct.  When
> +applying patches created with =git format-patch= this will happen
> +automatically, but when applying simple diffs you will need to
> +override the author. Here are three ways to do that, depending on

2 spaces here.

Looks good and to the point. 

-- 

Daniel Fleischer



[PATCH] describe how to override Author

2022-06-26 Thread Robert Pluim


Robert> The thing thatʼs missing is any discussion of how to ensure the 
Author
Robert> of the commit is set correctly. When applying git patches it all
Robert> works, but not when applying diffs. Iʼll read through the
Robert> org-contribute section and see if I can come up with some verbiage.

Something like this? (I hope Iʼve got the syntax right, I seldom write
org for exporting purposes). The emacs CONTRIBUTE guidelines talk
about setting 'Author', but I guess not everyone reads those...

diff --git a/org-contribute.org b/org-contribute.org
index a3cb6f2b..c01bf417 100644
--- a/org-contribute.org
+++ b/org-contribute.org
@@ -270,6 +270,19 @@ * Your first commit as an Org maintainer
 locally and make sure you have a clean commit history before merging
 it into the =bugfix= or =main= branch.
 
+When applying patches written by other people, please ensure that the
+=Author= information of the resulting commit(s) is correct.  When
+applying patches created with =git format-patch= this will happen
+automatically, but when applying simple diffs you will need to
+override the author. Here are three ways to do that, depending on
+which method you use to commit to git:
+
+1. Command line: src_sh{git commit --author='First Last '}
+2. =VC=: Set the 'Author:' field in log-edit mode (requires setting
+   `log-edit-setup-add-author').
+3. =Magit=: Override the author using the =-A= flag from magit's commit
+   transient.
+
 To check our Git workflow in more details, please read 
[[file:org-maintenance.org][Org maintenance]].
 
 * Commit messages and ChangeLog entries



feature proposal: export to html headless

2022-06-26 Thread Uwe Brauer



Hi 

Some time ago I asked whether it would be possible to have a simplified
html export function (basically I need it to insert it in certain moodle
forms)


I was pointed out to me by the author/maintainer of org-mode that the
following would do the trick 

(defun my-org-export-to-html ()
  (interactive)
  (org-html-export-to-html nil nil t t))


So the question is could that be added to the export-dispach menu 
as HTML headless, I propose to use the letter L as in headLess.

Regards

Uwe Brauer 

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




Re: Re : Re: org-ref3 export html with references of pages

2022-06-26 Thread Joseph Vidal-Rosset
Hi John, hello everyone,

For your information, the numerical style that produces perfectly that I wanted 
is

oil-shale.csl

https://www.zotero.org/styles?fields=geology=numeric

the code

[[first_author_key, 80]] is exported into [1, p. 80]

and

[[second_author_key, 81-86] , [2, pp. 81-86]

url links are given in the bibliography, etc. A really good numeric cls style, 
still better in my opinion than american-medical-association-brackets.csl and 
many others.

All the best,

Jo.

---
https://www.vidal-rosset.net

Envoyé avec la messagerie sécurisée [Proton Mail](https://proton.me/).

--- Original Message ---
Le dimanche 26 juin 2022 à 09:17, Joseph Vidal-Rosset  
a écrit :

> Hi John,
>
> I am ashamed for having not understood this solution by myself !
>
> It works perfectly also with my csl style.
>
> Many thanks again for your so kind and very efficient help.
>
> Best wishes,
>
> Jo.
>
> ---
> https://www.vidal-rosset.net
>
> Envoyé avec la messagerie sécurisée [Proton Mail](https://proton.me/).
>
> --- Original Message ---
> Le samedi 25 juin 2022 à 13:16, John Kitchin  a 
> écrit :
>
>> Hi Joseph,
>>
>> It looks like what I suggested (e.g. use a csl file that supports what you 
>> want)
>>
>> This org file:
>>
>> #+csl-style: american-medical-association-brackets.csl
>> #+csl-locale: en-US
>>
>> See [[cite: 55-56]]
>>
>> bibliography:~/Dropbox/emacs/bibliography/references.bib
>>
>> leads to this output for me. You have to export it with C-c C-e rh to use 
>> the org-ref exporter.
>>
>> [image.png]
>>
>> John
>>
>> ---
>> Professor John Kitchin (he/him/his)
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> [https://kitchingroup.cheme.cmu.edu](https://kitchingroup.cheme.cmu.edu/)
>> https://pointbreezepubs.gumroad.com/ pycse bookstore
>>
>> On Sat, Jun 25, 2022 at 6:00 AM Joseph Vidal-Rosset 
>>  wrote:
>>
>>> Hello everyone,
>>>
>>> With org-ref (version 3) I meet the following (minor) problem with the
>>> html export of references when I want to give the pages of a book in
>>> numerical csl format.
>>>
>>> With LaTeX export, no difficulty: I get
>>>
>>> [1, pp. 55-56]
>>>
>>> to refer to the book 1 and pages 55-56.
>>>
>>> With html export, I get only:
>>>
>>> [1]
>>>
>>> and no mean to give the pages in this format.
>>>
>>> John Kitchin tried to help me (with downgrade to org-ref version 2), but
>>> it is not so easy to downgrade and with regular org and prelude
>>> upgrades, it is not easy always to keep the same version of org-mode.
>>>
>>> Help is welcome, if someone knows the solution.
>>>
>>> All the best,
>>>
>>> Jo.

Re: Allowed characters/formatting in Org text blocks

2022-06-26 Thread Ihor Radchenko
Fabio Natali  writes:

> Incidentally and FWIW, this is a bit counter-intuitive to me. I'd have
> expected everything withing a comment or literal block to be treated as
> content until the ending statement, =#+end_comment= or =#+end_src=
> respectively. I suppose that this makes sense in the larger scheme of
> Org things though?

Each Org document consists of an optional first chapter followed by a
sequence of headlines. Each headline is a sequence of optional section
followed by sequence of child headlines. Each section is a sequence of
ordinary syntax elements. No syntax element ever intersect other
element.

So, headlines always have higher priority over other elements because
they always serve as separators of the document or parent heading
contents.

The high priority of headline elements has prons and cons.
Consider the following markdown markup:

 test 1
==

```
(message "Hello world!")

... 100 headings not shown ...

 test 2
==

(message "Hello world!")

```

Should "test 2" be considered a heading?
The answer is not so important in short documents, but long documents
with large number of headings may become very sensitive to incomplete or
broken markup like the above.
In Org, you just need to care about getting the headings right. Issues
with all other markup elements should never go beyond the containing
headline section, which is especially useful when Org document is used
as todo-list with large number of headings.

Best,
Ihor



[PATCH] Improve "Speeding Up Your Agendas" chapters

2022-06-26 Thread Stefan Kangas
Please see the attached patches.  Thanks.
From 061255f1d6441f1496a3b062d6f29193ff2fb3c2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Sun, 26 Jun 2022 12:48:06 +0200
Subject: [PATCH 1/2] Move appendix on performance in manual to agenda chapter

* doc/org-manual.org (Speeding Up Your Agendas): Move section to
chapter "Agenda Views".
---
 doc/org-manual.org | 86 +++---
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 4c2e968e7..6bedeb344 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -10738,6 +10738,49 @@ environment.  This causes the following issues:
today, with the time already spent---via =CLOCKSUM=---and with
the planned total effort for it.
 
+** Speeding Up Your Agendas
+:PROPERTIES:
+:DESCRIPTION: Tips on how to speed up your agendas.
+:END:
+#+cindex: agenda views, optimization
+
+Some agenda commands slow down when the Org files grow in size or
+number.  Here are tips to speed up:
+
+- Reduce the number of Org agenda files to avoid slowdowns due to hard drive
+  accesses.
+
+- Reduce the number of DONE and archived headlines so agenda
+  operations that skip over these can finish faster.
+
+- Do not dim blocked tasks:
+  #+vindex: org-agenda-dim-blocked-tasks
+
+  #+begin_src emacs-lisp
+  (setq org-agenda-dim-blocked-tasks nil)
+  #+end_src
+
+- Stop preparing agenda buffers on startup:
+  #+vindex: org-startup-folded
+  #+vindex: org-agenda-inhibit-startup
+
+  #+begin_src emacs-lisp
+  (setq org-agenda-inhibit-startup t)
+  #+end_src
+
+- Disable tag inheritance for agendas:
+  #+vindex: org-agenda-show-inherited-tags
+  #+vindex: org-agenda-use-tag-inheritance
+
+  #+begin_src emacs-lisp
+  (setq org-agenda-use-tag-inheritance nil)
+  #+end_src
+
+These options can be applied to selected agenda views.  For more
+details about generation of agenda views, see the docstrings for the
+relevant variables, and this [[https://orgmode.org/worg/agenda-optimization.html][dedicated Worg page]] for agenda
+optimization.
+
 * Markup for Rich Contents
 :PROPERTIES:
 :DESCRIPTION: Compose beautiful documents.
@@ -21003,49 +21046,6 @@ special function:
 (org-agenda-overriding-header "Projects waiting for something: "
 #+end_src
 
-** Speeding Up Your Agendas
-:PROPERTIES:
-:DESCRIPTION: Tips on how to speed up your agendas.
-:END:
-#+cindex: agenda views, optimization
-
-Some agenda commands slow down when the Org files grow in size or
-number.  Here are tips to speed up:
-
-- Reduce the number of Org agenda files to avoid slowdowns due to hard drive
-  accesses.
-
-- Reduce the number of DONE and archived headlines so agenda
-  operations that skip over these can finish faster.
-
-- Do not dim blocked tasks:
-  #+vindex: org-agenda-dim-blocked-tasks
-
-  #+begin_src emacs-lisp
-  (setq org-agenda-dim-blocked-tasks nil)
-  #+end_src
-
-- Stop preparing agenda buffers on startup:
-  #+vindex: org-startup-folded
-  #+vindex: org-agenda-inhibit-startup
-
-  #+begin_src emacs-lisp
-  (setq org-agenda-inhibit-startup t)
-  #+end_src
-
-- Disable tag inheritance for agendas:
-  #+vindex: org-agenda-show-inherited-tags
-  #+vindex: org-agenda-use-tag-inheritance
-
-  #+begin_src emacs-lisp
-  (setq org-agenda-use-tag-inheritance nil)
-  #+end_src
-
-These options can be applied to selected agenda views.  For more
-details about generation of agenda views, see the docstrings for the
-relevant variables, and this [[https://orgmode.org/worg/agenda-optimization.html][dedicated Worg page]] for agenda
-optimization.
-
 ** Extracting Agenda Information
 :PROPERTIES:
 :DESCRIPTION: Post-processing agenda information.
-- 
2.30.2

From f6a192e912c32406829f734cb7fe95b47eea5af6 Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Sun, 26 Jun 2022 13:07:46 +0200
Subject: [PATCH 2/2] Document org-agenda-ignore-drawer-properties in manual

* doc/org-manual.org (Speeding Up Your Agendas): Document
org-agenda-ignore-drawer-properties.
---
 doc/org-manual.org | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 6bedeb344..914f8db5d 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -10776,6 +10776,17 @@ number.  Here are tips to speed up:
   (setq org-agenda-use-tag-inheritance nil)
   #+end_src
 
+  #+vindex: org-agenda-ignore-drawer-properties
+- Disable parsing of some drawer properties:
+
+  #+begin_src emacs-lisp
+  (setq org-agenda-ignore-drawer-properties '(effort appt stats category))
+  #+end_src
+
+  The drawer properties you can disable in the agenda are effort
+  estimates (~effort~), appointments (~appt~), statistics (~stats~)
+  and subtree-local categories (~category~).
+
 These options can be applied to selected agenda views.  For more
 details about generation of agenda views, see the docstrings for the
 relevant variables, and this [[https://orgmode.org/worg/agenda-optimization.html][dedicated Worg page]] for agenda

Re: Allowed characters/formatting in Org text blocks

2022-06-26 Thread Fabio Natali
On 2022-06-26 08:29:02 +0800, Ihor Radchenko  wrote:
[...]
> You need to escape "*" and "#+" at the beginning of line inside code
> blocks using comma: ",*", ",#+".

Hi Ihor,

Thanks for getting back to me!

I see, and yes, the documentation is pretty clear in that regard, you're
right. Escaping leading =*= and =#+= is perfectly possible in my case
and this completely solves my issue.

By the way, I've just tried with comment blocks, and I see that this
works the same way there too.

Incidentally and FWIW, this is a bit counter-intuitive to me. I'd have
expected everything withing a comment or literal block to be treated as
content until the ending statement, =#+end_comment= or =#+end_src=
respectively. I suppose that this makes sense in the larger scheme of
Org things though?

Thanks again, best wishes,

Fabio.



Re: Org mode export accessibility

2022-06-26 Thread Ihor Radchenko
Let me take a freedom to add T.V Raman to the discussion. This thread
might be of interest for him and he probably knows a lot more about
accessibility options.

This thread starts at
https://list.orgmode.org/87v8sn3obd@gmail.com/T/#u

Juan Manuel Macías  writes:

> Tim Cross writes:
>
>> As I understand it (which isn't brilliant), the core problem is more to
>> do with how the LaTeX/TeX engine processes the input to generate the
>> postscript and pdf output. Modern PDFs have a wealth of internal tagging
>> which simply sin't supported via the tex -> pdf pathway. The matter is
>> made slightly worse by a lack of built-in support within latex/tex for
>> accessibility 'tags' (similar to the aria tags for web content). 
>
> There is a relatively recent experimental package for LaTeX that may be
> of interest to you:
>
> CTAN: https://www.ctan.org/pkg/tagpdf
>
> GitHub: https://github.com/u-fischer/tagpdf
>
> The package is maintained by Ulrike Fischer, who is very active in the
> TeX community. However, the package description says:
>
>> The package offers tools to experiment with tagging and accessibility
>> using pdfLaTeX and LuaTeX. It isn't meant for production but allows
>> the user to try out how difficult it is to tag some structures; to try
>> out how much tagging is really needed; to test what else is needed so
>> that a pdf works e.g. with a screen reader. Its goal is to get a
>> feeling for what has to be done, which kernel changes are needed, how
>> packages should be adapted.
>
> Best regards,
>
> Juan Manuel 



Re: Org mode export accessibility

2022-06-26 Thread Juan Manuel Macías
Tim Cross writes:

> As I understand it (which isn't brilliant), the core problem is more to
> do with how the LaTeX/TeX engine processes the input to generate the
> postscript and pdf output. Modern PDFs have a wealth of internal tagging
> which simply sin't supported via the tex -> pdf pathway. The matter is
> made slightly worse by a lack of built-in support within latex/tex for
> accessibility 'tags' (similar to the aria tags for web content). 

There is a relatively recent experimental package for LaTeX that may be
of interest to you:

CTAN: https://www.ctan.org/pkg/tagpdf

GitHub: https://github.com/u-fischer/tagpdf

The package is maintained by Ulrike Fischer, who is very active in the
TeX community. However, the package description says:

> The package offers tools to experiment with tagging and accessibility
> using pdfLaTeX and LuaTeX. It isn't meant for production but allows
> the user to try out how difficult it is to tag some structures; to try
> out how much tagging is really needed; to test what else is needed so
> that a pdf works e.g. with a screen reader. Its goal is to get a
> feeling for what has to be done, which kernel changes are needed, how
> packages should be adapted.

Best regards,

Juan Manuel 



Re: ox-latex table tabbing support.

2022-06-26 Thread Robert Pluim
> On Sat, 25 Jun 2022 11:32:21 +0800, Ihor Radchenko  
> said:

Ihor> em...@vergauwen.me writes:
>> Hi Robert, 
>> I used the instructions provide on 
>> https://orgmode.org/worg/org-contribute.html#first-patch.
>> For me, it was a first too, send a patch via email. Can I 
>> prevent these issues in the future or use a different method
>> to send my patches?

I donʼt think you did anything wrong, although if you'd committed the
changes locally and run 'git format-patch' to produce the patch file,
your authorship would have been included (Ihor's link below discusses
it at length)

Ihor> I think we describe one method in
Ihor> https://orgmode.org/worg/org-contribute.html#org5355fd7

Ihor> You can also find my personal suggestions and walkthrough in
Ihor> https://orgmode.org/list/87levyzwsk.fsf@localhost

The thing thatʼs missing is any discussion of how to ensure the Author
of the commit is set correctly. When applying git patches it all
works, but not when applying diffs. Iʼll read through the
org-contribute section and see if I can come up with some verbiage.

Robert
-- 



org-capture and fast selection of tags

2022-06-26 Thread Christian Heinrich
Hi everyone,

I am trying to set up an org-capture template that presents me with the fast 
selection window for
tags instead of just the prompt one gets when using org-capture's %^g / %^G 
placeholders. I often
have project related tags that I need to apply to many but not all tasks, so 
this would help me a
lot.

I have my tags defined through #+TAGS in my org file. 

I first thought that using %(org-set-tags-command) should work; but the 
capture-buffer is narrowed
(i.e., no tags are available), so I used (setq 
org-complete-tags-always-offer-all-agenda-tags t) to
make my tags available there as well. They are available now, but the fast 
selection is not used, as
org-use-fast-tag-selection is set to 'auto'. When I set it explicitly to t, the 
fast selection is
shown but because of org-complete-tags-always-offer-all-agenda-tags, I have way 
too many options to
choose from. I only want the tags defined through #+TAGS to be offered through 
fast selection.

How can I achieve that? Is there a way to also make only the tags defined in 
the target file
available?

Thanks for any help!

Best regards
Christian


signature.asc
Description: This is a digitally signed message part


Re: Improve the docstring for 'org-html-mathjax-options'

2022-06-26 Thread Bastien Guerry
Hi Ihor and Rudolf,

Ihor Radchenko  writes:

> Bastien, AFAIK Rudolf has completed his FSF copyright assignment. 

I do confirm.

> Can you please add him to the contributor list?

Done, thanks,

-- 
 Bastien



Re: [BUG] org parser error [9.5.1 (release_9.5.1-256-gf1929a @ /Users/raymondjohn/org-mode/lisp/)]

2022-06-26 Thread Ihor Radchenko
Raymond John Abayan  writes:

> I have the following error and coudn't seem to find a solution online.
> Warning (org-element-cache): org-element--cache: Org parser error in *Org Src 
> init.org[ elisp ]*::115. Resetting.
> The error was: (error "rx ‘**’ range error")
> Backtrace:
> nil

Thanks for reporting!
Note that your Org 9.5.1 version is not the latest version. Yet, you
appear to be using org-element.el from the latest version. This
situation is called "mixed installation" and can cause unpredictable
errors.

Please make sure that you set the correct load-path early in your
init.el before org-mode is loaded.

Best,
Ihor



[BUG] org parser error [9.5.1 (release_9.5.1-256-gf1929a @ /Users/raymondjohn/org-mode/lisp/)]

2022-06-26 Thread Raymond John Abayan



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.


I have the following error and coudn't seem to find a solution online.
Warning (org-element-cache): org-element--cache: Org parser error in *Org Src 
init.org[ elisp ]*::115. Resetting.
The error was: (error "rx ‘**’ range error")
Backtrace:
nil

Emacs  : GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 
Version 12.0.1 (Build 21A559))
of 2022-04-22
Package: Org mode version 9.5.1 (release_9.5.1-256-gf1929a @ 
/Users/raymondjohn/org-mode/lisp/)

current state:
==
(setq
org-agenda-prefix-format '((dashboard-agenda . " %i %-12:c %s ")
(agenda . " %i %-12:c%?-12t% s")
(todo . " %i %-12:c") (tags . " %i %-12:c")
(search . " %i %-12:c"))
org-link-elisp-confirm-function 'yes-or-no-p
org-bibtex-headline-format-function '(closure (t) (entry)
   (cdr (assq :title entry)))
org-log-done 'note
org-agenda-custom-commands '(("d" "Dashboard"
   ((agenda "" ((org-deadline-warning-days 7)))
(todo "REVIEW"
 ((org-agenda-overriding-header
   "Items to Review")
  )
 )
(todo "NEXT"
 ((org-agenda-overriding-header "Next Tasks")))
(tags-todo "agenda/ACTIVE"
 ((org-agenda-overriding-header
   "Active Projects")
  )
 )
)
   )
  ("n" "Next Tasks"
   ((todo "NEXT"
 ((org-agenda-overriding-header "Next Tasks")))
)
   )
  ("W" "Work Tasks" tags-todo "+work-email")
  ("w" "Workflow Status"
   ((todo "WAIT"
 ((org-agenda-overriding-header
   "Waiting on External")
  (org-agenda-files org-agenda-files))
 )
(todo "REVIEW"
 ((org-agenda-overriding-header "In Review")
  (org-agenda-files org-agenda-files))
 )
(todo "PLAN"
 ((org-agenda-overriding-header "In Planning")
  (org-agenda-todo-list-sublevels nil)
  (org-agenda-files org-agenda-files))
 )
(todo "BACKLOG"
 ((org-agenda-overriding-header
   "Project Backlog")
  (org-agenda-todo-list-sublevels nil)
  (org-agenda-files org-agenda-files))
 )
(todo "READY"
 ((org-agenda-overriding-header
   "Ready for Move")
  (org-agenda-files org-agenda-files))
 )
(todo "ACTIVE"
 ((org-agenda-overriding-header
   "Active Projects/Tasks")
  (org-agenda-files org-agenda-files))
 )
(todo "COMPLETED"
 ((org-agenda-overriding-header
   "Completed Projects/Tasks")
  (org-agenda-files org-agenda-files))
 )
(todo "CANC"
 ((org-agenda-overriding-header
   "Cancelled Projects/Tasks")
  (org-agenda-files org-agenda-files))
 )
)
   )
  )
org-log-into-drawer t
org-startup-folded t
org-agenda-files '("~/Dropbox/org-roam/20220502102008-action_items.org"
"~/Dropbox/org-roam/20220517193319-habits.org"

Re: [BUG] Async execution fails to detect exceptions

2022-06-26 Thread Ihor Radchenko
Ivar Fredholm  writes:

> Specifically for ob-python, if an exception happens before we can print the 
> 'end' token used by async-filter, there will be no output or indication of an 
> error.

Could you please provide steps to reproduce, detail what you expected
and what you actually get?
See https://orgmode.org/manual/Feedback.html

Best,
Ihor



[BUG] Async execution fails to detect exceptions

2022-06-26 Thread Ivar Fredholm
Specifically for ob-python, if an exception happens before we can print the 
'end' token used by async-filter, there will be no output or indication of an 
error.

Sent with [Proton Mail](https://proton.me/) secure email.

Re: Org and Hyperbole

2022-06-26 Thread tomas
On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:
> Hello,

> [...] I feel that some of the
> questions raised here about Hyperbole sound akin to the story of five
> blind men feeling the elephant [...]

The nice thing about that kind of situation is that it only can improve
by adding in a sixth blind man ;-)

Thank you from someone "too swamped right now to try to tackle another
whole peradigm, but still enormously curious about this thing".

Cheers
-- 
t


signature.asc
Description: PGP signature


Re : Re: org-ref3 export html with references of pages

2022-06-26 Thread Joseph Vidal-Rosset
Hi John,

I am ashamed for having not understood this solution by myself !

It works perfectly also with my csl style.

Many thanks again for your so kind and very efficient help.

Best wishes,

Jo.

---
https://www.vidal-rosset.net

Envoyé avec la messagerie sécurisée [Proton Mail](https://proton.me/).

--- Original Message ---
Le samedi 25 juin 2022 à 13:16, John Kitchin  a écrit :

> Hi Joseph,
>
> It looks like what I suggested (e.g. use a csl file that supports what you 
> want)
>
> This org file:
>
> #+csl-style: american-medical-association-brackets.csl
> #+csl-locale: en-US
>
> See [[cite: 55-56]]
>
> bibliography:~/Dropbox/emacs/bibliography/references.bib
>
> leads to this output for me. You have to export it with C-c C-e rh to use the 
> org-ref exporter.
>
> [image.png]
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> [https://kitchingroup.cheme.cmu.edu](https://kitchingroup.cheme.cmu.edu/)
> https://pointbreezepubs.gumroad.com/ pycse bookstore
>
> On Sat, Jun 25, 2022 at 6:00 AM Joseph Vidal-Rosset  
> wrote:
>
>> Hello everyone,
>>
>> With org-ref (version 3) I meet the following (minor) problem with the
>> html export of references when I want to give the pages of a book in
>> numerical csl format.
>>
>> With LaTeX export, no difficulty: I get
>>
>> [1, pp. 55-56]
>>
>> to refer to the book 1 and pages 55-56.
>>
>> With html export, I get only:
>>
>> [1]
>>
>> and no mean to give the pages in this format.
>>
>> John Kitchin tried to help me (with downgrade to org-ref version 2), but
>> it is not so easy to downgrade and with regular org and prelude
>> upgrades, it is not easy always to keep the same version of org-mode.
>>
>> Help is welcome, if someone knows the solution.
>>
>> All the best,
>>
>> Jo.

Re: Org mode export accessibility (was: About 'inline special blocks')

2022-06-26 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> Sadly, org isn't great from an accessibility perspective. This is
>> something I would like to see improved, but it is a huge and complex
>> task. There are some 'easy' winds we could try. For example, org still
>> defaults to using the  and  tags instead of
>>  and . Likewise, we should move to html5 as
>> the default, not xhtml, but last time I raised that, there was
>> considerable push back to stick with xhtml. We also need complete
>> overhaul of the use of aria tags and numerous other areas. As I said, a
>> very large job which is complex and extremely time consuming. 
>
> I will not argue about html5 switch - I don't have enough knowledge to
> weigh on this.
>
> However, can't we at least address accessibility issues with the
> existing HTML export? A good starting point could be identifying what
> can be improved in ox-html.el.
>

Yes, we can probably make some incremental improvements. However, it is
a complex and difficult area and I suspect to really improve the
situation, we likely need a major re-design. A big part of the challenge
is how to enable authors to add the right level of accessibility
'tagging', but at the same time, not lose one of the main advantages of
org mode i.e. simplicity and ease of syntax. 

>> Sadly, I'm not sure there is a lot we can do with accessibility and PDFs
>> in org mode. This is the one area where TeX/LaTeX does a poor job. Last
>> time I looked, there was considerable discussion about what to do from
>> an accessibility standpoint in the TeX community, but seemed to be
>> little or very slow progress (not a criticism of the efforts of members
>> of that community, but rather a reflection of how complicated this stuff
>> is).
>
> From Org perspective, we can do what is available in the exported
> format. If LaTeX is not great from accessibility point of view, is there
> a better format? Or are there things we can do to improve situation in
> ox-latex.el?
>

As I understand it (which isn't brilliant), the core problem is more to
do with how the LaTeX/TeX engine processes the input to generate the
postscript and pdf output. Modern PDFs have a wealth of internal tagging
which simply sin't supported via the tex -> pdf pathway. The matter is
made slightly worse by a lack of built-in support within latex/tex for
accessibility 'tags' (similar to the aria tags for web content). 

> What about other export backends?
>

To be honest, no idea. I'm certainly not an expert in these areas. While
I am impacted more by lack of accessibility, unfortunately, that doesn't
make you an expert.

I do feel that in order to get reasonable accessibility levels, it is
probably something which needs to be baked in as part of the overall
design and not something which can be added later. This isn't really
feasible. Things can probably be slightly improved, but I doubt org mode
and the documents it produces will ever be particularly good from an
accessibility perspective. 



Re: Org and Hyperbole

2022-06-26 Thread Siva Swaminathan
Hello,

I only recently became aware of Hyperbole (through Bob's demo video
available on Youtube), and came across this thread while googling to
find more information about Hyperbole. I feel that some of the
questions raised here about Hyperbole sound akin to the story of five
blind men feeling the elephant, so I humbly offer my perspective on
what I consider to be the key underlying ideas. Forgive me if I'm
stating the obvious, and I also don't know whether Hyperbole as
currently implemented does exactly all this :-)

I'd like to think of the key idea of Hyperbole as converting text in
buffers into *objects* (aka "buttons") by attaching *behavior* to them.
The two actions provided by convention could be thought of as akin to
the left-click and right-click which one is familiar with in
contemporary GUIs, in this case respectively bound to methods for "do
(by default)" and "show metadata". Supporting more
behaviors/methods/messages for user-invocation is an obvious next idea
(if not already so).

The above system would be of quite limited composability if it required
objects to be defined explicitly -- because most buffers one operates
on are generated without awareness of Hyperbole (imagine the pain of
everything needing to conform to something like a Hyperbole
framework/protocol!). The cleverness behind implicit buttons is that
one can opportunistically use common conventions as "schemas" to "parse
/ deserialize" the contents which make up an object from any buffer (in
this case via regexps) and attach corresponding (expected) behaviors to
them! Because of the highly structured nature of such data, even if
embedded in a stream of plain text, it can typically be parsed
correctly without needing explicit type annotations. The behaviors
could presumably depend not just the object, but also the active modes,
environment variables, etc.

Here are a few made-up example use cases (hand-waving over details):

1. I might embed phrases such as "bug:123" in my code / emails / org
task management and have behaviors that respectively fetch the bug
report / open some URL in a browser / or update the TODO status based
on the bug status, as desired. This would help me interface
conveniently with a bespoke bug-tracking tool.

2. On encountering Goodreads links in my reading list org file, I could
have a behavior to parse the contents of the webpage and extract
desired metadata to add to the item properties (or an entry to some org
table).

3. Linking by immutable block identifiers (and fast lookup) of course
enables a lot of PKM workflows that have recently become popular (with
the addition of bidirectional links).

Other aspects such as menus generated from button files seem like
convenient affordances bolted on to make up the UI of the system. I
still need to wrap my mind around these, but I wonder whether there
might be opportunities to compose with other ecosystem tools which have
pioneered some nice UI ideas eg. transient menus, hydras, interactive
selection lists, etc. But that's a discussion for the Hyperbole mailing
list.


>From a first impression, I'm really impressed, and also surprised that
Hyperbole is not more popular. Much gratitude to the contributors for a
nifty tool, and a fascinating design perspective.

Best regards,
Siva
http://sivark.me




Re: [BUG] org-todo (C-c C-t) bad negative prefix behavior [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]

2022-06-26 Thread Ihor Radchenko
Allen Li  writes:

> Attached

Thanks!
Applied onto main via 711ada5ac.
I changed the patch slightly adding
;; FIXME: Add tests for all other allowed prefix arguments.
line to the test.

Best,
Ihor



Re: Improve the docstring for 'org-html-mathjax-options'

2022-06-26 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Applied onto main via 15068ce30.

Forgot to mention that I amended the commit message adding the "." at
the end of the sentence and using the `symbol' quoting style for
symbols.

Best,
Ihor



Re: Improve the docstring for 'org-html-mathjax-options'

2022-06-26 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Please, see the attached patch.
> ...
> Subject: [PATCH] Fix incorrectly documented MathJax options
>
> * lisp/org/ox-html.el (org-html-mathjax-options): Fix some incorrect
> choices for 'indent' and 'autonumber' in the docstring

Thanks!
Applied onto main via 15068ce30.

Bastien, AFAIK Rudolf has completed his FSF copyright assignment. Can
you please add him to the contributor list?

Best,
Ihor



Improve the docstring for 'org-html-mathjax-options'

2022-06-26 Thread Rudolf Adamkovič
Please, see the attached patch.

>From e12a2bdd28b73661bbe89550409355ebdea7a082 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Sun, 26 Jun 2022 08:04:40 +0200
Subject: [PATCH] Fix incorrectly documented MathJax options

* lisp/org/ox-html.el (org-html-mathjax-options): Fix some incorrect
choices for 'indent' and 'autonumber' in the docstring
---
 lisp/ox-html.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 32187f191..66d1c5c60 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1185,10 +1185,9 @@ font  The font to use with HTML-CSS and SVG output.  As of MathJax 2.5
 linebreaksLet MathJax perform automatic linebreaks.  Valid values
   are \"true\" and \"false\".
 indentIf align is not center, how far from the left/right side?
-  Valid values are \"left\" and \"right\"
 multlinewidth The width of the multline environment.
 autonumberHow to number equations.  Valid values are \"None\",
-  \"all\" and \"AMS Math\".
+  \"All\" and \"AMS\".
 tagindent The amount tags are indented.
 tagside   Which side to show tags/labels on.  Valid values are
   \"left\" and \"right\"
-- 
2.36.1


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

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