Re: contact management in emacs

2022-09-09 Thread Sébastien Rey-Coyrehourcq

Hi,

After some search today on the web, like Alan i try to compare all 
possibility to manage my contact + mail using emacs, mu4e, and org.


Since Alan Schmitt message, i think many people jump into the great 
*org-roam* wagon to manage notes, bibliography, links, everything...


I'm into this *crazy* wagon, trying now to manage contact, with this 
workflow :


- one file/node by contact,
- stored into the org-roam specific folder "/myorgroamfolder/contact/ 
with this encrypted org pattern to protect files "*.org.gpg"

- using into mu4e

There are some post exploring part of this use case on the web, but i 
first focus to *org-contacts*, because it's well integrated with mu4e 
auto-completion :


Moving from org-contrib to https://repo.or.cz/org-contacts.git , 
accessible with melpa,  the documentation is mostly into the source-code 
actually, i found few example on the web .


What property field are correct :MOBILE:, :PHONE:, :BIRTHDAY: , and ?

I found some information about configuration in Terencio Agozzino 
dotfiles (https://github.com/rememberYou/.emacs.d) but when i try to 
adapt to this use case,
that don't work, probably because i misunderstand something, about 
properties name, or localization into the .org.gpg files.


I config like that (org-contacts-file (file-expand-wildcards 
"~/my-org-roam-folder/contact/*.org.gpg))


It's slow because everything need to be unencrypted before (this is 
another problem ...) but something i don't understand is how matching 
work :
calling "M-x org-contacts", i try multiple patterns, so i'm interested 
by a working org/org-roam contact example.


I found some alternatives to test next week :

- org-vcard (on github) compatible with org-contacts, focusing on 
import/export of vcard files

- mu4e-contacts (on gitlab) using helm / mu4e, inspired by org-contacts
- org-ql query ?

Best,

Sebastien R.C



Le 27/02/2021 à 12:08, Alan Schmitt a écrit :

Hello,

This may be slightly off-topic for the list, but as I’m considering
org-contacts for my question, I hope it will be of interest here.

I would like to migrate my contact management to emacs, as I’m already
using it for email. My requirements are the following ones:
- address completion in emacs email clients (I currently use notmuch)
- support for multiple email addresses and custom fields
- creation of org links to contacts
- export to vcard format for synchronization to my mobile phone (using
vdirsyncer)
- keep the data under version control

I have looked at two tools, which almost seem fit for the job.
- ebdb does most of this, with the exception of vcard export (it seems
to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
sure using version control on an sqlite file is a good idea.
- org-contacts also seem to have all the required features, including
vcard export (and if not sufficient there is
https://github.com/novoid/org-contacts2vcard). I was worried it was
unmaintained when looking at the copyright line, but I see in
https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
that there are recent commits to the file.

Do you manage your contacts in emacs? And if so, what tools or workflow
do you recommend?

Best,

Alan




#+ candidates

2022-09-09 Thread Perry Smith
The manual says I can type #+ and then hit M-tab to get the list of 
completions.  In my case, flyspell-mode had stolen that key binding so I 
disabled flyspell-mode.

There are 100 #+ candidates.  Is there a nice place that lists them and 
documents each one?  So far, I’ve yet to find one.  It is sometimes nice to 
browse through such a list just to become familiar with what is possible.

Thank you,
Perry



signature.asc
Description: Message signed with OpenPGP


Re: Why do org-agenda-switch-to and org-agenda-goto put the point in different spots in the target buffer?

2022-09-09 Thread Rohit Patnaik
> org-agenda-switch-to jumps to the actual agenda match (usually a timestamp).
> It may or may not be close to the headline (think of active timestamp inside
> notes). Such behaviour, albeit undocumented, may be useful for some users. I'd
> rather not change it.

Okay, that makes sense.

> Recentering is purely a visual thing. It should be safe to add.

I've added the recentering behavior in the attached patch. The recentering part
was more important for me than the point jumping to the heading, because
sometimes the match would appear at the very top of the screen and I'd have to
scroll up manually to see the heading. If the screen is centered on the match,
then it's likely that the heading will also be visible in the window.

Thanks,
Rohit

0001-org-agenda.el-Make-org-agenda-switch-to-recenter-on-.patch
Description: Binary data


Re: Question about cite_export basic

2022-09-09 Thread Ihor Radchenko
Dominik Schrempf  writes:

>   title   = {{Introduction to Markov Chain Monte Carlo}},
> ...
> Is rendered as
>
> Geyer, Charles J (2011). {Introduction to Markov Chain Monte Carlo}, CRC 
> press.
>
> In particular, the curly braces are printed. Curly braces are often
> used in bib files to indicate that the capitalization is to be
> preserved.
>
> Do we want to change the default behavior of the basic processor so
> that it correctly handles these cases?

This makes sense. However, I see it as something to be done by
bibtex.el; not by Org. Or we may need to write a small exporter for
BibTeX fields specifically. So that
http://www.bibtex.org/SpecialSymbols/ is obeyed. We may also handle
upcasing the title words in such exporter.

For now, I reached Emacs devs asking to provide the parsing within
bibtex.el. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57712
Lets see what they reply first.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Link-words with spaces, allowed or not?

2022-09-09 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Below, the documentation gives an example that defines a link-word
>
> "Nu Html Checker"
>
> that contains multiple words and invalid characters (spaces).
>
> That makes me wonder:
>
> - Does Org need updated to disallow spaces in link-words?

Strictly speaking, Org does allow spaced in link-words, but only for
bracketed [[links]]. Plain links like http: cannot have spaces.

> - Does Org documentation need updated to remove the "Nu Html Checker"?

The documentation example is valid, though we should indeed clarify that
spaces are only allowed in bracketed links.

> Alternatively, if Org allows spaces in link-words, then I wonder
>
> - How to define a link-word with spaces using #+link?

AFAIK, you cannot. The #+LINK keywords are matched against
"\\`\\(\\S-+\\)[ \t]+\\(.+\\)" regexp.

We may allow something like
#+LINK: "this is a link with spaces" http://replacement

Patches are welcome!

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: org-babel-load-languages usability issue

2022-09-09 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>>> We have [[info:org#Languages]] linking to
>>> https://orgmode.org/worg/org-contrib/babel/languages/index.html
>>> I guess we can simply add the manual link to the docstring. Would it be
>>> sufficient?
>>>
>>
>> Yes, I think so. That was what I was thinking would be reasonable and
>> would avoid maintenance issues for the doc string when languages are
>> added/removed.
>
> Done.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7c20552ed636d6c058d6be649e19d3d5edc0f62a
>

Excellent. Thanks.

 Would it load them if the default values for all the languages which
 have bundleed modes in Emacs were set to nil rather than t?
>>>
>>> I am not sure if it is a good idea.
>>> I am now looking at the usage of org-babel-load-languages in the code,
>>> and I am seeing `org-lint-wrong-header-argument',
>>> `org-babel-demarcate-block' ignoring difference between (lang . nil) and
>>> (lang .t).
>>
>> OK, so if I understand you correctly, not all of org code honours the
>> enabled/disabled setting so adding all bundled languages, but setting
>> them to nil, would result in unexpected or additional processing for
>> those languages despite them being disabled?
>
> Yes, though I am not 100% sure if the impact is significant enough for
> us to care.
>

Agreed.

>> If that is the case, you right and adding them would be
>> problematic. However, I would also argue this is probably a
>> bug. Essentially, it means that the value associated with the language
>> symbol key is sometimes interpreted and sometimes ignored. I think this
>> is an inconsistency which can potentially cause confusion and could
>> contribute to subtle bugs.
>
> Agree. 
>
>> One thing I do wonder though wrt the two examples you cited. Could this
>> be deliberate/intentional for these functions?
>>
>> I wondering about the scenario where you want to include blocks for a
>> certain language, but you do not need to evaluate them, so no need for
>> babel support. Might this be a case where you would set the language to
>> nil, but be fine with lint and other checks verifying the block
>> structure? Provided this isn't also resulting in loading of language
>> specific babel code, it may not be an issue?
>
> I do not think that your example is a valid use-case.
> (lang . nil), when set during startup, means that (require 'ob-lang) has
> never been executed (or, at least, we cannot guarantee it).
> When (lang . nil) is changed from (lang . t) at some point,
> (require 'ob-lang) is executed, but org-babel-do-load-languages
> explicitly unloads the babel function that executes the LANG blocks.
>
> In general, we cannot assume that any of the ob-lang functions are
> loaded when there is (lang . nil). No LANG-specific info is available.
>
> Also, (lang . nil) is supposed to deny loading LANG. It should be no
> different compared to not listing LANG at all.

OK, fair enough. The point regarding (lang . nil) being supposed to deny
loding LANG is my main point. I would hope it is exactly the same as not
listening LANG. Originally, my thought was it would be easier for the
user from a usability perspective if they could just look at the value
of this variable and immediately see not only the languages currently
enabled, but also those languages which could be trivially enabled
because they are bundled with Emacs - for example, 'shell', 'eshell' and
possibly others which tend to have the runtime installed in most cases
and where Emacs has a built in mode.

At any rate, the changes made are a good start and I'm happy if things
are left there for now. 



Re: Manual Ordering and Dynamic Priority

2022-09-09 Thread Tim Cross


Rudolf Adamkovič  writes:

> Tim Cross  writes:
>
>> - Life is about getting things done, not planning to get things
>>   done. Overly complex management of your tasks is very likely to
>>   result in more time spent managing the tasks than actually doing
>>   the tasks.
>
> Let me share a slightly different experience.
>
> I used to minimize the time I spent on planning, wanting to start
> "actually doing the tasks".  Looking back, it often led to pointless
> work and wasted time.  So, I changed my ways!
>
> These days, I do not mind spending half a day, or more, on planning my
> learning week at school.  I also do not mind "more time spent managing
> the tasks than actually doing the tasks" because I noticed that it
> might, unexpectedly, change the entire equation.  For example, at work,
> I noticed that careful planning, which includes design, can save ten
> times the time it takes, though one never knows for sure beforehand.
>
> For another example, I spent two days designing my Org Agenda.  I first
> made some drawings on paper, thinking carefully about what I want from
> it, and then configured Emacs to compute it that way.  It might sound
> crazy, for I could have spent those two days "actually doing the tasks",
> but I thank myself every day for doing it!
>

The difference here is in what we define as planning. For example, I
would not consider 2 days spend designing how my agenda would work as
task planning - that is design work.

What I'm referring to is having a task management process where you
spend large amounts of time just managing the item 'metadata' - not
actually working on the item at all, but just tracking its state,
progress, priority, etc. 

Planning as a task in itself is very important. I live by the 6Ps
(Piss-poor planning prevents poor performance). However, that planning
effort needs to be focused on moving things forward. Too often, I see
people make the same error with org mode. They develop a complex all
singing and dancing workflow for recording, tracking and managing their
tasks. Before they realise it, they become a slave to the process and
spend lots of time updating task state information, changing priorities
and schedules, making notes which never get read again and tracking
everything at a micro level. AS an extreme example, I saw someone once
who had in their list of tasks "Get out of bed" - honestly, what is
having that task really adding except noise and wasted time. Do you
really need a task telling you to get out of bed? I've seen other
examples where people find they are overwhelmed with the number of tasks
in their task list, but when you look at what they have listed you see
crazy micro level planning e.g.

8:00 - Walk to bus stop
8:15 - Ride bus to Kent st. 
8:45 - Walk from Kent ST. buss stop to office
9:00 - Turn on office computer
9:00 - 11:30 - Do office work
...

Unless you have some sort of memory issue or learning condition,
planning at this level is largely pointless. This may seem extreme, but
I see people do very similar fine grained task logging in projects as
well.

Planning, like effort estimating, is a skill and needs practice. All I
am trying to convey is a warning against being overly ambitious or
having overly high expectations regarding org mode and how/when it can
be beneficial. While you can probably capture everything in your life in
plain text org files, doing so may not actually help make your life
easier. I believe you need to be judicious in what you map out as tasks
and in what data you capture. Too much and there is a danger it all
becomes white noise and you become a slave to the process. Our brains
are amazing things which can handle a lot of complexity easily and at a
fast rate - the interface is still faster and more powerful than org and
we should use it to its maximum and apply org to augment it rather than
replace it. Problem is, someone sees org mode for the first time and
their blown away and suddenly can see how they can generate a
comprehensive, concise and well mapped out process for everything they
do. The pendulum swings to far the other way and suddenly, they now have
an additional time consuming maintenance task which is now using time
previously spent actually getting the job done.

The other danger is of course that we become too dependent on the
technology. We can see this happening now with information like phone
numbers. Even only 20 years ago, most people would memorise and be able
to recall many phone numbers. Recent surveys indicate most people don't
even know the phone number of their spouse! Consider that for a second -
if you lost your mobile phone, how many of the phone numbers of people
close to you can you recall? 



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-09 Thread Fedja Beader
> As Tomas pointed out, Emacs has a concept of safe and non-safe
> file-local variables. org-confirm-babel-evaluate in particular is only
> safe when it is set to t (query execution). If your downloaded file
> attempts to set org-confirm-babel-evaluate to nil, Emacs will show a
> warning and ask you whether you want to use this unsafe nil value.

Can this mechanism be relied upon? I see in
https://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Variables.html
that user may press ! to mark everything safe. This is less effort than
the explicit "yes" required for executing a block on C-c C-c.


> I am sorry if any of the answers to your suggestion sounded hostile.

> The above does not mean that we reject your suggestion. Rather we try to
> weigh on the available options in Org and Emacs itself and then try to
> integrate the new feature into the existing concepts/functionalities.


Not at all. If anything the reply of mine might have sounded such.
Because your and Steven's initial replies focused on how to achieve this
with different user-local changes, instead of making it automatic,
it felt to me that my first email did not contain enough motivation
behind such changes and that I had to clarify it again/further.


> Note that Org mode already has a large number of customizations, which
> is why we are trying to not introduce unnecessary customizations. Too
> many options is not always a good thing.

This makes me wonder how many of us have a custom init.el for
the purpose discussed here. Surely I am not alone, and surely
having such customisation maintained in org-mode itself would
be better.

> Yes-for-all/No-for-all may be implemented in multiple ways:
> - During the current org-babel-execute-buffer call

If the user determined that it is safe to execute all blocks
once, then why would it not be safe to execute them again?

> - From now until the buffer is closed

This option is probably closest to what I want.

> - Forever for this file path

Also fine. But
1) then this would have to be stored somewhere outside
   of the file, else the user would still be asked if they
   want to load that unsafe local variable. Meaning that in
   that case babel could just ask the user directly.
2) As I learn to use Emacs, the number of restarts
   decreases, meaning that the session just lives forever.
   In that case the once per open nagging of babel
   is acceptable.

> - Forever for this file path until the file contents is changed

What would change the file if not the user, and if the user
already approved the existing code, why would the user
not approve their own additions to it?

> - For some period of time

Same response as above.

> Moreover, the above may apply for all the src blocks in buffer or just a
particular src block.

Going through blocks one by one and whitelisting, then executing them
seems like a reasonable course of action, so why not.
However, it might be a bit difficult to implement?
How would babel determine that a block is the same
one, even if it changes? Position in file?

> I doubt that all the options should be implemented in practice. We may
> probably just allow yes-for-all when running org-babel-execute-buffer
> but not individual C-c C-c on src blocks. I can see valid reasons to
> allow (1) in current org-babel-execute-buffer-call; (2) until the buffer
> is closed; (3) until the file contents is changed + limited by time.
> However, 3 possible options in the dialogue may be disorienting:

I would like the option to mark whole file as
trusted without having to execute all blocks in it.

> yes/no (each src block)
> Yes/No (all src blocks in current org-babel-execute-buffer cal)

all/none? always/never?

> * (until the buffer is closed)

allfornow? alluntilclose?

> ! (until the buffer is closed and in the next 30 days, as long as the
>  buffer contents is not changed)

I'd prefer having to type full words,
so that it is obvious what the user meant.



Re: Org Publish HTML and PDF With GPG Files

2022-09-09 Thread David Masterson
 writes:

> On Mon, Sep 05, 2022 at 09:08:13PM -0700, David Masterson wrote:
>> l...@tosk.in writes:
>> 
>> > Ihor Radchenko yanta...@gmail.com writes:
>> >> 
>> >> > David Masterson dsmaster...@gmail.com writes:
>> >> > 
>> >> > > Does org-publish have options for files with org-crypt entries?
>> >> > 
>> >> > We do not have an explicit option, but you can add org-decrypt-entries
>> >> > to your org-export-before-processing-hook.
>> >> 
>> >> Thanks
>> 
>> > Is there a specific way of setting this in the config?
>> > I tried adding `(add-hook 'org-export-before-processing-hook
>> > #'org-decrypt-entries)` to my init.el, but publishing fails with the
>> > error "run-hook-with-args: Wrong number of arguments: (0 . 0), 1"
>> 
>> Been awhile -- what's the purpose of the '#' character?
>
> Its nickname is "sharp-quote" (actually the whole #' thingy is called
> like that). As ' is just a shorthand for 'quote' (i.e. 'foo is a
> shorthand for (quote foo), #' is a shorthand for 'function, i.e.
> #'foo stands for (function foo), meaning "the function the symbol
> foo refers to".
>
> Being Emacs Lisp, you could just have said 'foo, but this has quite
> a few downsides, one of them being that you blindside your compiler
> (And your human readers).
>
> Cheers

Ah ha! Thanks

-- 
David Masterson



Re: Org mode "style sheet" for software documentation

2022-09-09 Thread Ihor Radchenko
Perry Smith  writes:

>> We currently do not support extensions to emphasis, though we may do it
>> in future. See https://orgmode.org/list/87letvrege.fsf@localhost
>> 
>> Implementing new emphasis markers will require introducing a new syntax
>> object into org-element.el. Such object will unlikely be using a
>> single-char markers - single-char markers are problematic in numerous
>> edge cases; we should better introduce something closer to inline src
>> block syntax to allow arbitrary emphasis extensions.
>
> I’m now retired with time on my hands so ping me if I can help somehow if / 
> when the time
> comes.  I sometimes turn off receiving from the list so drop me an email 
> directly to
> make sure I see it.

If you are interested in an involved contribution, it is the most
welcome.

We currently have plans to implement fully custom elements and objects
in Org. The idea is to allow the
:export/:activate-func/:face/:keymap/:export functionality like in Org
links, but for special blocks and inline objects. I can provide more
details if you are interested.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [BUG] Org parser error [9.5.4 (9.5.4-ge36c3c @ /Users/apc/.emacs.d/straight/build/org/)]

2022-09-09 Thread Ihor Radchenko
Alejandro Pérez Carballo  writes:

> I was asked to submit this to the mailing list. Not sure exactly what the 
> nature of the problem is, but I have been getting a number of errors 
> concering the org-element cache.

Thanks for reporting!

Could you please add

(setq org-element--cache-self-verify 'backtrace
  org-element--cache-self-verify-frequency 1.0)

to your config.

Then, try to reproduce the error and post the contents of the (very
long) warning buffer to the mailing list. (Make sure that no private
information is listed there).

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Call code block via link?

2022-09-09 Thread Felix Dorner
I have a silenced codeblock, that I postprocess to push the result (a
password) onto the kill-ring, and then returns "Password copied" (showing
in the status line). This works very nicely. I'm now looking for the cherry
on the cake: I'd like to render the #+CALL as a link, e.g. something like,
[Copy the secret thing]. Clicking/following the link would execute the call
and my password ready to paste elsewhere. Feasible?

-- 
Linux. The choice of a GNU generation.


[BUG] org-catch-invisible-edits has stopped working [9.5.5 (9.5.5-geb5ef0 @ /home/slk/.emacs.default/straight/build/org/)]

2022-09-09 Thread Sławomir Grochowski
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.

functionality provided by this variable:

(setq-default org-catch-invisible-edits 'error) ;; prevent deleting
invisible text

has stopped working,


Emacs  : GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0)
 of 2022-08-25
Package: Org mode version 9.5.5 (9.5.5-geb5ef0 @
/home/slk/.emacs.default/straight/build/org/)

current state:
==
(setq
 org-log-note-headings '((note . "%t") (done . "CLOSING NOTE %t") (state .
"State %-12s from %-12S %t")
(note . "Note taken on %t") (reschedule . "Rescheduled from %S on %t")
(delschedule . "Not scheduled, was %S on %t") (redeadline . "New deadline
from %S on %t")
(deldeadline . "Removed deadline, was %S on %t") (refile . "Refiled on %t")
(clock-out . ""))
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-log-done 'time
 org-agenda-custom-commands '(("w" "Weekly review" agenda ""
  ((org-agenda-start-day "-14d") (org-agenda-span 14)
(org-agenda-start-on-weekday 1)
(org-agenda-start-with-log-mode '(closed)) (org-agenda-archives-mode t)
(org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "^\\*\\*
DONE ")))
  )
 ("n" "Agenda and all TODOs" agenda "" ((alltodo ""
 org-log-into-drawer t
 org-startup-folded t
 org-agenda-files '("~/aamystuff/mystuff/index.org"
"~/aamystuff/life/life.org.gpg"
   "~/aamystuff/phprefactor/phprefactor.org")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
 org-cycle-optimize-window-after-visibility-change)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-font-lock-set-keywords-hook '(doom-themes-enable-org-fontification)
 org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function
org-imenu-get-tree] 2] org-tempo-setup
org-eldoc-load visual-line-mode org-indent-mode org-bullets-mode
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook
org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-sorting-strategy '((todo todo-state-up priority-down))
 org-fold-catch-invisible-edits 'error
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-hide-leading-stars t
 org-todo-keywords '((sequence "REPEAT" "DOING" "TODO" "NEXT" "WAITING"
"SOMEDAY" "LOOKING-FOR" "DONE")
(sequence "|" "CANCELED(c)" "RECONSIDER(@)"))
 org-structure-template-alist '(("e" . "src elisp") ("a" . "export ascii")
("c" . "center") ("C" . "comment")
("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" .
"quote")
("s" . "src") ("v" . "verse"))
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-confirm-babel-evaluate nil
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-agenda-finalize-hook '((lambda nil
(save-excursion (goto-char (point-min))
 (if (re-search-forward "Global list of TODO items of type:
[[:upper:]]*" nil t)
  (progn
(insert
(propertize (format " (%s 

Question about cite_export basic

2022-09-09 Thread Dominik Schrempf
Hello!

When using the basic org cite export processor, that is:

#+cite_export: basic

bibliography items with curly braces are rendered in an unexpected way.

For example,

@InCollection{Geyer2011,
  author  = {Geyer, Charles J},
  title   = {{Introduction to Markov Chain Monte Carlo}},
  year= 2011,
  booktitle   = {{Handbook of Markov Chain Monte Carlo}},
  editor  = {Brooks, Steve and Gelman, Andrew and Jones, Galin and Meng,
  Xiao-Li},
  publisher   = {CRC press},
  pages   = 45,
}

Is rendered as

Geyer, Charles J (2011). {Introduction to Markov Chain Monte Carlo}, CRC press.

In particular, the curly braces are printed. Curly braces are often
used in bib files to indicate that the capitalization is to be
preserved.

Do we want to change the default behavior of the basic processor so
that it correctly handles these cases?

Thanks,
Dominik



Re: [PATCH] ox-icalendar.el: customizable vevent summary prefix

2022-09-09 Thread Ihor Radchenko
Mikhail Skorzhisnkii  writes:

> Thank you for suggestion, I seen an announcement about this function, but 
> somehow forgot about it.
>
> Sending next version of these patches. Changes from the next version:

Thanks!

> Subject: [PATCH 3/3] org-refile.el: show refile targets with a title
>
> * lisp/org-refile.el (org-refile-get-targets): Use a document
> title (#+TITLE) instead of file or buffer name in outline path, if
> a corresponding customisation option is set to 'title. Fallback to a
> filename if there is no title in the document.

Please use 2 spaces between sentences in docstrings, comments, and
commit messages. Also, end sentences with ".". See
https://orgmode.org/worg/org-contribute.html#commit-messages and
https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html

>  (defcustom org-outline-path-complete-in-steps t
>"Non-nil means complete the outline path in hierarchical steps.
> @@ -319,6 +320,11 @@ converted to a headline before refiling."
>(push (list (and (buffer-file-name (buffer-base-buffer))
>(file-truename (buffer-file-name 
> (buffer-base-buffer
>   f nil nil) tgs))
> +   (when (eq org-refile-use-outline-path 'title)
> + (push (list (or (org-get-title)
> + (and f (file-name-nondirectory f)))
> + f nil nil)
> +   tgs))

We have very too many whens in this function. It will be more succinct
to use a single (pcase org-refile-use-outline-path ...) instead.

> +  ;; When `org-refile-use-outline-path' is `title', return extracted
> +  ;; document title
> +  (should
> +   (equal '("T" "T/H1")
> + (org-test-with-temp-text-in-file "#+title: T\n* H1"

You may as well add a test when multiple #+title lines are present.

> From 62684b478ae5ceb03f66967fbebcc4d6163c826c Mon Sep 17 00:00:00 2001
> From: Mikhail Skorzhinskii 
> Date: Sat, 12 Sep 2020 18:10:05 +0200
> Subject: [PATCH 2/3] org-agenda.el: show document title in outline path
 ^Show
> * lisp/org.el (org-display-outline-path): Show a document title (#+TITLE
> value) and an outline path in an echo area if the customisation option
> is set to 'title. Fallback to a file or a buffer name if the document
  ^  Fallback ;; (double space between sentences)
> title is absent.

>  ** New options
> -*** New custom settings =org-icalendar-scheduled-summary-prefix= and 
> =org-icalendar-deadline-summary-prefix=

This is removing an existing NEWS entry. I guess it is not intentional.

> +*** A new option for custom setting =org-agenda-show-outline-path= to show 
> document title
>  
>  (defcustom org-agenda-show-outline-path t
> -  "Non-nil means show outline path in echo area after line motion."
> +  "Non-nil means show outline path in echo area after line motion.
> +
> +If set to 'title, show outline path with prepended document
> +title.  Fallback to file name is no title is present."
>:group 'org-agenda-startup
> -  :type 'boolean)
> +  :type '(choice
> +   (const :tag "Don't show outline path in agenda view." nil)
> +   (const :tag "Show outline path with prepended file name." t)
> +   (const :tag "Show outline path with prepended document title. 
> Fallback to file name is no title is present." title)))

I think you can leave
(const :tag "Show outline path with prepended document title." title)

This text will be displayed in drop menu in cutomize interface alongside
with the full docstring. Mentioning the fallback in the docstring should
be good enough.

> From 5b15f886b22dc542220b48ae9659c4c2d56dea78 Mon Sep 17 00:00:00 2001
> From: Mikhail Skorzhinskii 
> Date: Thu, 8 Sep 2022 21:29:23 +0200
> Subject: [PATCH 1/3] org-clock.el: rename org-clock-get-file-title
^Rename

> * lisp/org.el (org-get-title): A new function to collect a document
> title from an org-mode buffer, based on a org-clock-get-file-title
> implementation.

`org-clock-get-file-title'. Elisp symbols should be quoted.

>  ** New functions and changes in function arguments
> +*** New function ~org-get-title~ to get ~#+TITLE:~ property from buffers

We generally use ~code~ for Elisp symbols and =#+TITLE:= for verbatim
non-code text. (This has not been consistently followed in etc/NEWS, but
at least please change ~#+TITLE~ to =#+TITLE=). See
doc/Documentation_Standards.org

>  ** Removed or renamed functions and variables
> +*** Rename ~org-clock-get-file-title~ to ~org-get-file-title~
> +
> +This function is now part of the =org.el= file.

You do not need to mention this. org-clock-get-file-title was
introduced in recent commits on main. Main is development branch, and we
do not need to document changes on the changes made after the last
release.

>  ;;;###autoload
>  (defun org-dblock-write:clocktable (params)
>"Write the standard clocktable."
> @@ 

Re: [BUG] org-catch-invisible-edits has stopped working [9.5.5 (9.5.5-geb5ef0 @ /home/slk/.emacs.default/straight/build/org/)]

2022-09-09 Thread Ihor Radchenko
Sławomir Grochowski  writes:

> functionality provided by this variable:
>
> (setq-default org-catch-invisible-edits 'error) ;; prevent deleting
> invisible text
>
> has stopped working,

Could you please provide an example Org file and detail what you did,
what you expected to get, and what did not work?
See https://orgmode.org/manual/Feedback.html

On my side, 'error value does prevent deleting.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Question about cite_export basic

2022-09-09 Thread Alain . Cochard
Dominik Schrempf writes on Fri  9 Sep 2022 11:08:
 > Hello!
 > 
 > When using the basic org cite export processor, that is:
 > 
 > #+cite_export: basic
 > 
 > bibliography items with curly braces are rendered in an unexpected way.
 >
 > [...]
 > 
 > In particular, the curly braces are printed.

I don't observe that.  I even used your Geyer2011 example:

#+bibliography: ~/Ref/coch.bib
[cite:@Geyer2011]
#+print_bibliography:

Org mode version 9.5.4 (9.5.4-ge0b05b @ /home/cochard/.emacs.d/elpa/org-9.5.4/)

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




Re: Why do org-agenda-switch-to and org-agenda-goto put the point in different spots in the target buffer?

2022-09-09 Thread Ihor Radchenko
"Rohit Patnaik"  writes:

> I've gotten back into using org-agenda to manage my todos, and I noticed an 
> odd discrepancy in behavior. When I hit RET in the agenda buffer to go to the 
> TODO entry in the original org file, I see that the point is on the DEADLINE 
> line. However, when I hit TAB, I find that the point is placed at the 
> beginning of the heading. Looking at the source of org-agenda.el, I find that 
> TAB is bound to `org-agenda-goto', which does the following:
>
> (recenter (/ (window-height) 2))
> (org-back-to-heading t)
>
> RET, on the other hand, is bound to `org-agenda-switch-to', which does not 
> have these lines, and thus does not place the point on the heading.
>
> Is there a reason for this discrepancy between the two functions? I'm
> asking because I prefer the point placement behavior of
> `org-agenda-goto', but I use `org-agenda-switch-to' because switches
> to the target org file in the current window rather than opening a new
> window.

org-agenda-switch-to jumps to the actual agenda match (usually a
timestamp). It may or may not be close to the headline (think of active
timestamp inside notes). Such behaviour, albeit undocumented, may be
useful for some users. I'd rather not change it.

If you want to force org-agenda-switch-to to jump back to headline, you
can modify org-agenda-after-show-hook.

> Would there be any issues with me taking the recentering and point
> placement behavior from `org-agenda-goto' and adding it to
> `org-agenda-switch-to`?

Recentering is purely a visual thing. It should be safe to add.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [BUG] org-catch-invisible-edits has stopped working [9.5.5 (9.5.5-geb5ef0 @ /home/slk/.emacs.default/straight/build/org/)]

2022-09-09 Thread Ihor Radchenko
Sławomir Grochowski  writes:

> Sorry for the noise. I've tested it with emacs -Q and it works fine.
> Probably some other package is making this.
> So my bug report should therefore be considered invalid.

You may consider https://github.com/Malabarba/elisp-bug-hunter to find
out which package is the culprit.

Best,
Ihor



Re: Question about cite_export basic

2022-09-09 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

>  > In particular, the curly braces are printed.
>
> I don't observe that.  I even used your Geyer2011 example:
>
> #+bibliography: ~/Ref/coch.bib
> [cite:@Geyer2011]
> #+print_bibliography:
>
> Org mode version 9.5.4 (9.5.4-ge0b05b @ 
> /home/cochard/.emacs.d/elpa/org-9.5.4/)

This is confusing. I actually can reproduce. I used the same Org file
and a bib file containing the only record - Geyer2011.

I did export using C-c C-e t A (ASCII to buffer) and I got the
following:


Ihor Radchenko


Table of Contents
_




(Geyer, Charles J, 2011)
Geyer, Charles J (2011). /{Introduction to Markov Chain Monte Carlo}/,
CRC press.


Note the curly brackets.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [PATCH v2] org.el: Preserve case for link subgroups from `org-file-apps'

2022-09-09 Thread Ihor Radchenko
Max Nikulin  writes:

> Evey attempt to read this function gives a new surprise. I agree that 
> dlink has no sense any more, see the new patches.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=33686b9955c011486a72ec548475651dcadb0339
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6e9ea3a0766de9df6992bfb0359a5826ed1951b5
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f25b308af671766bb01e507c6db57bf3e83d8d05

>> So, it is probably safe to drop it, especially if tests are passing.
>
> There is no tests for `org-open-file'. Checking of file existence, 
> running an asynchronous process make it harder to create such tests.

We need mocking, I guess (aka cl-letf).

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Manual Ordering and Dynamic Priority

2022-09-09 Thread Rudolf Adamkovič
Tim Cross  writes:

> - Life is about getting things done, not planning to get things
>   done. Overly complex management of your tasks is very likely to
>   result in more time spent managing the tasks than actually doing
>   the tasks.

Let me share a slightly different experience.

I used to minimize the time I spent on planning, wanting to start
"actually doing the tasks".  Looking back, it often led to pointless
work and wasted time.  So, I changed my ways!

These days, I do not mind spending half a day, or more, on planning my
learning week at school.  I also do not mind "more time spent managing
the tasks than actually doing the tasks" because I noticed that it
might, unexpectedly, change the entire equation.  For example, at work,
I noticed that careful planning, which includes design, can save ten
times the time it takes, though one never knows for sure beforehand.

For another example, I spent two days designing my Org Agenda.  I first
made some drawings on paper, thinking carefully about what I want from
it, and then configured Emacs to compute it that way.  It might sound
crazy, for I could have spent those two days "actually doing the tasks",
but I thank myself every day for doing it!

Rudy
-- 
"Strange as it may sound, the power of mathematics rests on its evasion
of all unnecessary thought and on its wonderful saving of mental
operations."
-- Ernst Mach, 1838-1916

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



Re: Question about cite_export basic

2022-09-09 Thread Alain . Cochard
Ihor Radchenko writes on Fri  9 Sep 2022 18:38:

 > This is confusing. I actually can reproduce.
 > [...]
 > I did export using C-c C-e t A (ASCII to buffer)

Sorry, it did not occur to me that there is a life out of latex
export.  I used C-c C-e l o.  I can also reproduce with C-c C-e t A.

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




Re: org-babel-load-languages usability issue

2022-09-09 Thread Ihor Radchenko
Tim Cross  writes:

>> We have [[info:org#Languages]] linking to
>> https://orgmode.org/worg/org-contrib/babel/languages/index.html
>> I guess we can simply add the manual link to the docstring. Would it be
>> sufficient?
>>
>
> Yes, I think so. That was what I was thinking would be reasonable and
> would avoid maintenance issues for the doc string when languages are
> added/removed.

Done.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7c20552ed636d6c058d6be649e19d3d5edc0f62a

>>> Would it load them if the default values for all the languages which
>>> have bundleed modes in Emacs were set to nil rather than t?
>>
>> I am not sure if it is a good idea.
>> I am now looking at the usage of org-babel-load-languages in the code,
>> and I am seeing `org-lint-wrong-header-argument',
>> `org-babel-demarcate-block' ignoring difference between (lang . nil) and
>> (lang .t).
>
> OK, so if I understand you correctly, not all of org code honours the
> enabled/disabled setting so adding all bundled languages, but setting
> them to nil, would result in unexpected or additional processing for
> those languages despite them being disabled?

Yes, though I am not 100% sure if the impact is significant enough for
us to care.

> If that is the case, you right and adding them would be
> problematic. However, I would also argue this is probably a
> bug. Essentially, it means that the value associated with the language
> symbol key is sometimes interpreted and sometimes ignored. I think this
> is an inconsistency which can potentially cause confusion and could
> contribute to subtle bugs.

Agree. 

> One thing I do wonder though wrt the two examples you cited. Could this
> be deliberate/intentional for these functions?
>
> I wondering about the scenario where you want to include blocks for a
> certain language, but you do not need to evaluate them, so no need for
> babel support. Might this be a case where you would set the language to
> nil, but be fine with lint and other checks verifying the block
> structure? Provided this isn't also resulting in loading of language
> specific babel code, it may not be an issue?

I do not think that your example is a valid use-case.
(lang . nil), when set during startup, means that (require 'ob-lang) has
never been executed (or, at least, we cannot guarantee it).
When (lang . nil) is changed from (lang . t) at some point,
(require 'ob-lang) is executed, but org-babel-do-load-languages
explicitly unloads the babel function that executes the LANG blocks.

In general, we cannot assume that any of the ob-lang functions are
loaded when there is (lang . nil). No LANG-specific info is available.

Also, (lang . nil) is supposed to deny loading LANG. It should be no
different compared to not listing LANG at all.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [PATCH] make quarter work as parameter for :step in clocktable

2022-09-09 Thread Ihor Radchenko
Joost Helberg  writes:

> many years ago a colleague and myself wrote a patch for quarters into
> org-mode/clocktable for blocks, today I noticed that :step should allow
> 'quarter' as an argument too. Here's the tiny patch to allow that:

And almost a year later, I finally got to this todo item :)

This addition is reasonable, so I pushed it on main after resolving
conflicts, adding TINYCHANGE cookie, and providing a proper commit
message.

I also added etc/NEWS item and a test.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3f3ff643d2e2f0e65a7fd4ff0163944e1c62ae03
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=583c01c08496021f2db5ffde118e8ff71039c510
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c9db3c51aba351ba05148449acc464b10c316ccc

Thank you for the contribution.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Org mode "style sheet" for software documentation

2022-09-09 Thread Perry Smith


> On Sep 9, 2022, at 00:09, Ihor Radchenko  wrote:
> 
> Perry Smith  writes:
> 
>> So… it seems I didn’t the two BORDER characters do not need to match.  So 
>> I’m off trying to figure out a way to create more emphasis MARKERS.  In the 
>> old days, we had only about 43 non-alphanumeric characters to play with but 
>> now with Emacs being 8 bit clean for countless years we have another 128 
>> characters and with UTF-8 we have bazillians more!
>> 
>> So I’m gently poking around in the code to see how hard it would be to 
>> define more.
> 
> We currently do not support extensions to emphasis, though we may do it
> in future. See https://orgmode.org/list/87letvrege.fsf@localhost
> 
> Implementing new emphasis markers will require introducing a new syntax
> object into org-element.el. Such object will unlikely be using a
> single-char markers - single-char markers are problematic in numerous
> edge cases; we should better introduce something closer to inline src
> block syntax to allow arbitrary emphasis extensions.

I’m now retired with time on my hands so ping me if I can help somehow if / 
when the time
comes.  I sometimes turn off receiving from the list so drop me an email 
directly to
make sure I see it.

Perry



signature.asc
Description: Message signed with OpenPGP


Link-words with spaces, allowed or not?

2022-09-09 Thread Rudolf Adamkovič
The documentation at

https://orgmode.org/manual/Link-Abbreviations.html

says that the link-word

"[...] must be a word, starting with a letter, followed by letters,
numbers, ‘-’, and ‘_’."

Below, the documentation gives an example that defines a link-word

"Nu Html Checker"

that contains multiple words and invalid characters (spaces).

That makes me wonder:

- Does Org need updated to disallow spaces in link-words?
- Does Org documentation need updated to remove the "Nu Html Checker"?

Alternatively, if Org allows spaces in link-words, then I wonder

- How to define a link-word with spaces using #+link?

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

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



Re: [off topic] List all non-latin characters in a buffer

2022-09-09 Thread Robert Pluim
> On Fri, 19 Aug 2022 16:50:54 +0200, Uwe Brauer  said:

 "JMM" == Juan Manuel Macías  writes:
Uwe> Hi Juan


>> Sorry for the offtopic, but I thought this homemade function I wrote
>> some time ago for my work might perhaps be useful to some Orgers. When
>> executed in a buffer, the `list-non-latin-chars' function opens a window
>> displaying a list of all the non (basic) Latin characters present in
>> that document. Each item in the list contains the character, its Unicode
>> canonical name, and its hexadecimal code. For example:

Uwe> Very very nice,

Uwe> Till now I used only a very simple search function

Uwe> (defun my-search-no-ascii ()
Uwe> "Simple function to search for no ASCII symbols in a file."
Uwe>   (interactive)
Uwe>   (skip-chars-forward "\001-\177"))

Equivalently you can do
 (skip-chars-forward "[[:ascii:]]")

(or use `re-search-forward' with the [:nonascii:] character class.)

Robert
-- 



[BUG] Org parser error [9.5.4 (9.5.4-ge36c3c @ /Users/apc/.emacs.d/straight/build/org/)]

2022-09-09 Thread Alejandro Pérez Carballo


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 was asked to submit this to the mailing list. Not sure exactly what the 
nature of the problem is, but I have been getting a number of errors concering 
the org-element cache.

Thanks,

APC

Emacs  : GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 
Version 12.5 (Build 21G72))
 of 2022-09-01
Package: Org mode version 9.5.4 (9.5.4-ge36c3c @ 
/Users/apc/.emacs.d/straight/build/org/)

current state:
==
(setq
 org-archive-location "~/org/agenda/archives/%s_archive.org::datetree/"
 org-mac-link-brave-app-p nil
 org-roam-db-location "/Users/apc/.emacs.d/var/org/org-roam.db"
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled 2
 org-after-refile-insert-hook '(org-gcal--refile-post)
 org-roam-db-gc-threshold 2305843009213693951
 org-hide-emphasis-markers t
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-log-done 'time
 org-roam-mode-hook '(my/read-mode-indicator)
 org-agenda-custom-commands '(("d" "Default (ignore @sched and @hold)"
   ((agenda ""
 ((org-agenda-span 'day)
  (org-super-agenda-groups
   '((:name none :time-grid t)
 (:name "To do" :and
  (:not (:tag ("@hold")) :not (:tag 
("@sched")))
  :discard (:anything t))
 )
   )
  )
 )
)
   )
  ("z" "Work: focused"
   ((agenda ""
 ((org-agenda-span 'day)
  (org-agenda-files
   `(,(concat my/agenda-dir "/work.org")))
  (org-super-agenda-groups
   '((:name "First and foremost" :and
  (:tag ("@today") :priority "A"))
 (:name "The rest" :tag ("@today") :discard
  (:anything t))
 )
   )
  )
 )
)
   )
  ("p" "Planning view"
   ((agenda ""
 ((org-agenda-span 'day)
  (org-super-agenda-groups
   '((:name "Up next" :and
  (:todo "NEXT" :not (:scheduled past)))
 (:name "New today" :and
  (:not (:todo ("WAIT" "KILL")) :not
   (:tag ("@sched")) :scheduled today)
  :deadline today)
 (:name "In progress" :todo "STRT")
 (:name "Overdue" :and
  (:not (:todo ("DONE" "KILL" "WAIT")) :not
   (:tag ("@sched")) :deadline past)
  )
 (:name "Backlog" :and
  (:not (:todo ("STRT" "DONE" "KILL" 
"WAIT")) :not
   (:tag ("@sched")) :scheduled past)
  :discard (:anything t))
 )
   )
  )
 )
(alltodo ""
 ((org-agenda-overriding-header "")
  (org-super-agenda-groups
   `((:name "Refile" :and
  (:not (:todo ("DONE" "KILL" "WAIT")) :tag
   ("refile") :not (:tag ("read" "gkry")))
  )
 (:name "Next available actions" :and
  (:todo "NEXT" :scheduled future) :and
  (:todo "NEXT" :deadline future))
 (:name "Coming up" :and
  (:todo "TODO" 

Re: Org mode "style sheet" for software documentation

2022-09-09 Thread Max Nikulin

On 08/09/2022 23:20, Perry Smith wrote:

I’d like to be able to separate out things like file 
paths, code samples (both in line and block), keywords, environment 
variables, code variables, etc.

...
It would also help me to be more 
consistent while I write because I’m (currently) having to remember “Ok… 
how did I format variables?  Was that ‘code' or ‘italics'? … Hmm…”


Depending on export backend and desired output quality you may use
info "(org) Macro Replacement" 
https://orgmode.org/manual/Macro-Replacement.html or you may define 
custom link type with :export property and type e.g. 
[[style:file-path][/dev/null]]. The latter is a kind of hack, but it 
might be more convenient in some cases.


E.g. macros are used in the doc/org-manual.org file
 {{{kbd(M-x list-packages)}}}
see doc/doc-setup.org for its definition.