Re: Culling org files (notion of Types, many small vs few big files)

2021-03-05 Thread Samuel Wales
i should maybe point out that my focus in op is merely, literally
something like "possibilities for code for helping the user archive or
delete stuff in existing bloated org files".

but i am also ok with tangents like other ideas for speed and less
clutter and organizational tricks and so on.  this mailing list in the
old days used to talk about such things.

like, what's a project, what does next mean, "is gtd for me", "at some
point you have to actually /do/ a task", and will the org system get
bloated and slow for users in the future.


On 3/5/21, Samuel Wales  wrote:
> the closest thing i have to types is merely this
>
> - some files go in org-agenda-files, by basename pattern
> - some to text search extra files, pattern, don't need the tses
> - some to neither, no pattern [blog.org]
> - some get put manually in refile targets
>
> which has no real connection to either ontology [like hvac], or
> types/purposes/statuses [like your project type] as you have.
>
> it is merely what things i need in ts agenda vs. search agenda view.
>
> to me the outline is a forest with the tree problem [i.e. the fact
> that we want graphs not trees] kludged using id links and searching.
> files are major categories.  too many and i get confused what is
> where.  tree structure is by ontology, not types.
>
> i think my agenda views therefore wouldn't be any less cluttered or
> confusing if i had more files or shallower trees.  [assuming i set
> category property which i do.]  so that is why i was confused by your
> comment.
>
> i find that the more complex a system i develop, the more i regret it
> later because i can't just reverse it, i can't do maintenance at
> anything close to a sufficient rate, and i get confused.
>
> the ts comment i made is merely that i do like "* LOG [2021-03-05
> Fri 13:44] hi" usefully.  not sure if relevant.
>
>
> On 3/5/21, TRS-80  wrote:
>> On 2021-03-04 16:11, Samuel Wales wrote:
>>>> tim> naming convention ... to determine what is included
>>>
>>> this is also what i do.  org-agenda-files is just set at startup
>>> according to basename pattern.
>>
>> I find it very interesting that all three of us seem to have
>> independently arrived at some of same conclusions.
>>
>> Originally I did not want to go off on this tangent, but now I wonder
>> how close what I am doing is to what you guys are doing.
>>
>> In my case, I came up with some notion of "Types."  Each Org file MAY
>> use one of a list of defined Types at the beginning of the file name
>> (which is also the first top level headline in the file, starting at
>> position 0), followed by a delimiter (currently ": ").[0]
>>
>> I keep experimenting with my list of Types (I probably have too many),
>> but there are a few that definitely seem useful so far.  For example:
>>
>> - Project: Pretty self-explanitory.
>>
>> - Area: A concept lifted straight from PARA Method ("a sphere of
>>activity with a standard to be maintained over time").[1]
>>
>>- Equipment: A special type of Area: that pertains to a single major
>>  piece of equipment (like a vehicle) or some group of related
>>  equipment (e.g. "small shop equipment" or "home appliances",
>>  etc.).
>>
>> - HowTo: Literally "how to do x" which is great for remembering those
>>obscure command line invocations (or whatever) that you only use 2x
>>per year.  Combined with headline level completing-read search (see
>>below) this becomes very powerful/handy.
>>
>> So then, by default, any of Org files starting with either Area:,
>> Equipment:, or Project: are the only ones that are considered "active"
>> for purposes of agenda and scanned for TODOs (implemented as a simple
>> `directory-files' function and a regexp).  I use my system as a
>> combination of TODO and PIM[2], so this makes a nice logical split
>> where all those PIM "random notes" do not impact the agenda
>> performance whatsoever.
>>
>> I have some other custom agenda functions as well, for things like
>> periodic reviews (in the GTD sense) and others.  Org's Agenda really
>> is essentially just like a database query engine when you get right
>> down to it (except storing in plain text of course).
>>
>>>> trs> [smaller files] My agenda is not cluttered.
>>>
>>> it is not clear to me why more smaller files and shallower trees in
>>> the outline would improve the agenda.  sounds good though.
>>
>> I somewhat addressed this above

Re: Culling org files (notion of Types, many small vs few big files)

2021-03-05 Thread Samuel Wales
the closest thing i have to types is merely this

- some files go in org-agenda-files, by basename pattern
- some to text search extra files, pattern, don't need the tses
- some to neither, no pattern [blog.org]
- some get put manually in refile targets

which has no real connection to either ontology [like hvac], or
types/purposes/statuses [like your project type] as you have.

it is merely what things i need in ts agenda vs. search agenda view.

to me the outline is a forest with the tree problem [i.e. the fact
that we want graphs not trees] kludged using id links and searching.
files are major categories.  too many and i get confused what is
where.  tree structure is by ontology, not types.

i think my agenda views therefore wouldn't be any less cluttered or
confusing if i had more files or shallower trees.  [assuming i set
category property which i do.]  so that is why i was confused by your
comment.

i find that the more complex a system i develop, the more i regret it
later because i can't just reverse it, i can't do maintenance at
anything close to a sufficient rate, and i get confused.

the ts comment i made is merely that i do like "* LOG [2021-03-05
Fri 13:44] hi" usefully.  not sure if relevant.


On 3/5/21, TRS-80  wrote:
> On 2021-03-04 16:11, Samuel Wales wrote:
>>> tim> naming convention ... to determine what is included
>>
>> this is also what i do.  org-agenda-files is just set at startup
>> according to basename pattern.
>
> I find it very interesting that all three of us seem to have
> independently arrived at some of same conclusions.
>
> Originally I did not want to go off on this tangent, but now I wonder
> how close what I am doing is to what you guys are doing.
>
> In my case, I came up with some notion of "Types."  Each Org file MAY
> use one of a list of defined Types at the beginning of the file name
> (which is also the first top level headline in the file, starting at
> position 0), followed by a delimiter (currently ": ").[0]
>
> I keep experimenting with my list of Types (I probably have too many),
> but there are a few that definitely seem useful so far.  For example:
>
> - Project: Pretty self-explanitory.
>
> - Area: A concept lifted straight from PARA Method ("a sphere of
>activity with a standard to be maintained over time").[1]
>
>- Equipment: A special type of Area: that pertains to a single major
>  piece of equipment (like a vehicle) or some group of related
>  equipment (e.g. "small shop equipment" or "home appliances",
>  etc.).
>
> - HowTo: Literally "how to do x" which is great for remembering those
>obscure command line invocations (or whatever) that you only use 2x
>per year.  Combined with headline level completing-read search (see
>below) this becomes very powerful/handy.
>
> So then, by default, any of Org files starting with either Area:,
> Equipment:, or Project: are the only ones that are considered "active"
> for purposes of agenda and scanned for TODOs (implemented as a simple
> `directory-files' function and a regexp).  I use my system as a
> combination of TODO and PIM[2], so this makes a nice logical split
> where all those PIM "random notes" do not impact the agenda
> performance whatsoever.
>
> I have some other custom agenda functions as well, for things like
> periodic reviews (in the GTD sense) and others.  Org's Agenda really
> is essentially just like a database query engine when you get right
> down to it (except storing in plain text of course).
>
>>> trs> [smaller files] My agenda is not cluttered.
>>
>> it is not clear to me why more smaller files and shallower trees in
>> the outline would improve the agenda.  sounds good though.
>
> I somewhat addressed this above with Types (which improve
> performance), but as to your specific point (clutter)...
>
> OK, so maybe not /directly/.  But rather the whole system have
> improved my engagement, by way of no longer feeling lost/overwhelmed
> as I did with very deep trees in only a few files.  I think it is just
> easier to reason about some small subset of the whole at one time, as
> represented in a single file.  In theory, I guess you could accomplish
> the same by narrowing subtrees or other methods, but for whatever
> reason separate files seem to appeal more to me than those other ways
> (probably because they are also faster to navigate, among other
> benefits).  However, to each their own here, I suppose.
>
> I think I was also responding to some specific comment you made about
> time stamps (re: "cluttered").
>
> There is also this whole "inter linking" / "atomicity" thing.  I came
>

Re: org-refile failed due to default option stored by org-goto

2021-03-04 Thread Samuel Wales
if you are willing to try something as a complete stab in the dark,
here is something i have had from many years ago that fixed issues
possibly including a defaulting issue.  the issues include other stuff
too, but i do not understand the code now for health reasons to rule
this out as a solution to your problem in addition to the problem i
put in the comment and name.  i havce carried along this patch for
eyars.

commit deaa14b6ed264c259a1f3b805b67b2db3951ba20
Author: Your Name 
Date:   2020-09-20 13:30:55 -0700

=== alpha remove the parens from ido completion of olpaths

Modified lisp/org-refile.el
diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 1e6872b46..8f98e9cf9 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -617,7 +617,9 @@ this function appends the default value from
 (tbl (mapcar
   (lambda (x)
 (if (and (not (member org-refile-use-outline-path
-  '(file full-file-path)))
+   ;; === alpha remove the parens
from ido completion of olpaths
+  '(nil full-file-path)))
+  ;; '(file full-file-path)))
  (not (equal filename (nth 1 x
 (cons (concat (car x) extra " ("
   (file-name-nondirectory (nth 1 x)) ")")



On 3/4/21, Maxim Nikulin  wrote:
> On 03/03/2021 00:15, Maxim Nikulin wrote:
>>
>> There is one issue however. Default option option does not work if after
>> cache clean other command is called, e.g.
>> - jump using C-u C-c C-j
>> - clean cache C-u C-u C-u C-c C-w
>> - try to jump or to refile [C-u] C-c C-w to default offered option
>> - "user-error: Invalid target location"
>
> I have realized that this issue is rather loosely related to
> org-refile-use-cache and I have seen it in a worse variant with disabled
> cache.
>
> file init-refile.el:
>
> (package-initialize)
>
> (custom-set-variables
>   '(org-agenda-files (quote ("~/examples/org/test-notes.org")))
>   '(org-capture-templates
> (quote
>  (("t" "Test" entry
>(file "")
>"* %?\n\n%U\n" :empty-lines 1
>   '(org-default-notes-file "~/examples/org/capture.org")
>   '(org-directory "~/examples/org/")
>   '(org-modules (quote (org-refile)))
>   '(org-outline-path-complete-in-steps nil)
>   '(org-refile-targets (quote ((nil :maxlevel . 5) (org-agenda-files
> :maxlevel . 5
>   '(org-refile-use-outline-path t)
> )
>
> emacs -Q -L ~/src/emacs/org-mode/lisp/ -L
> ~/src/emacs/org-mode/contrib/lisp/ -l ~/examples/org/init-refile.el
> ~/examples/org/test-notes.org
>
> - C-u C-c C-j (org-goto) to some heading in the test-notes.org, e.g.
> "Two" / "Third" / "Theme"
> - M-x org-capture RET t to capture some note
> - Let's assume that target of previously executed org-goto suits for
> this note
> - C-c C-w RET to refile the note from capture.org file to the heading in
> test-notes.org offered as the default option.
>
> Actual result:
> - "Invalid target location"
> - Captured note is still in the capture.org file but it is not apparent
> since capture frame is closed.
>
> Expected result:
> - Default option works for refile even if it is remained from org-goto
> command
>
> Side note. In some cases it not so easy to close capture frame. If
> org-default-note-file is configured to a file in a non-existing
> directory then C-c C-k asks to create that directory but does not
> discards the note.
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Culling org files

2021-03-04 Thread Samuel Wales
trs> [smaller files] My agenda is not cluttered.

it is not clear to me why more smaller files and shallower trees in
the outline would improve the agenda.  sounds good though.

tim> naming convention ... to determine what is included

this is also what i do.  org-agenda-files is just set at startup
according to basename pattern.

On 3/4/21, Tim Cross  wrote:
>
> TRS-80  writes:
>
>> On 2021-03-03 16:59, Samuel Wales wrote:
>> I have come to similar conclusion about "don't let org files get too
>> big."  Besides agenda speed, I think it is just easier to
>> conceptualize things when each file covers only a limited scope, trees
>> are more shallow, etc.
>>
>> So, lately (last year or more), I have been trying a "many small (up
>> to perhaps medium)" instead of "few big" files approach (along with
>> some custom tooling) and it has been working /a lot/ better for me.  I
>> really feel on top of things for the first time in a long time.  My
>> agenda is not cluttered.  I can focus on important things, while not
>> losing track of the rest, etc.
>>
>
> I agree with this. I have a similar approach. I consider the file system
> and org files to be the initial 'structure' and have many smaller files
> rather than a couple of very large ones. Only a subset of files play a
> role in the agenda (I'm still experimenting with two different
> approaches for this - one uses a couple of functions which can
> dynamically change the agenda list and the other uses a naming
> convention which is used as the basis of a search to determine what is
> included in the agenda. Final rsult will likely be a combination).
>
> My use pattern also constantly evolves as my requirements and priorities
> change. It is and probably always will be, a work in progress!
>
> --
> Tim Cross
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: org-refile-use-cache and jumps using org-refile or org-goto

2021-03-04 Thread Samuel Wales
interesting.  that would be great to speed it up.  [i just meant that
the file list used to be correct.]

but it is slow these days.  for me, (benchmark-run 1 (length
(org-refile-get-targets))) is 8s for 5886 targets.

i presume you mean something like that up heading is unnecessary
because you can keep a running olpath as you search.


On 3/4/21, Maxim Nikulin  wrote:
> On 03/03/2021 09:34, Samuel Wales wrote:
>>
>> until recently in maint, ido and ido hacks with both refile and refile
>> goto [note: org-refile with a goto arg, not org-goto] has worked
>> perfectly.  with no cache.  now, there is an issue, where with no
>> cache that i know of, the first use, or the first use in a long time,
>> will actually present a huge file list that includes crazy elements
>> and is not constrained by even the verify function.
>
> Concerning performance. After reading your message I have realized that
> it should be really fast to extract several thousand headings from a
> buffer using regexp. However actually it is not so:
>
> (benchmark-run 10 (and (org-refile-get-targets) nil))
> | 9.86874253399 | 40 | 2.3275596 |
>
> So preparing the list of refile targets currently takes almost precisely
> 1 second. It is slow. Results are same for org-9.1.6 and
> release_9.4.4-231-gf46925. I am surprised however that 9.1.6 and 9.3.1
> are installed as system packages and have compiled files. I have not
> compiled git version but it works with the same speed.
>
> (length (org-refile-get-targets))
> : 3220
>
> Preferences:
>
>(require 'org-refile)
>(setq org-agenda-files '("~/notes/notes.org"))
>(setq org-refile-use-cache nil)
>(setq org-refile-use-outline-path t)
>(setq org-outline-path-complete-in-steps nil)
>(setq org-refile-targets '((org-agenda-files :maxlevel . 5)))
>
> Some lines from profile:
>
> - org-refile-get-targets   8414  74%
> ...   - org-get-outline-path   7403  65%
> ... - org--get-outline-path-1  7286  64%
> ...   - org-up-heading-safe6328  56%
>
> There is a room for improvement. Outline paths could be obtained in a
> single pass without backward search. It should speed up building the
> list of targets by 2 or 3 times.
>
> Though it is unrelated to issues with default option and cache entries
> when both ways to call org-refile are used: directly and through org-goto.
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Culling org files

2021-03-03 Thread Samuel Wales
along lines of reducing logbook entries, i often want to reduce org
files, and i wonder if anybody already had the same desire.

here are some random ideas.  my org files are so
large i might have written this list a few times

  1) list links to duplicate headlines
  2) list links to duplicate body text
  3) list links to duplicate entries
  4) list links to duplicate entries, body text, or
 headlines using fuzzy matching
 - suppose you captured an email slightly differently a
   few times
  5) show in agenda the biggest few tasks so you can go to
 them and reduce them or doneify them
  6) (waves hands) git magic to find old entries that might
 be stale
  7) show in agenda the tasks with biggest logbook drawers
 so you can go to them and reduce them
  8) find similar body text that are in distant subtrees
 that might be candidates for refactoring using org-id
 linking
  9) show in agenda deepest olpath levels
  10) indicate deep, shallow, text-filled, etc. top levels
  11) show in agenda entries with most children
  12) archive logbook drawer entries older than 1 year
  - get rid of drawer if empty
  - put the drawer entries into a logbook drawer in a
new task, with a similar header, that then gets
doneified.  then that gets archived when you archive
stuff.
  13) operate on lines matching a pattern
  - e.g. "* [2021-02-17 Wed 20:35]  whatever" lines
might be insubstantial notes that do not need to
clutter the inactive timestamp display in the agenda
and thus should be moved to a target location with
query
  - that target location would presumably not be in an
agenda file
  14) function to lint all agenda files
  15) reduce false positives in lint

well, idk if htese are good ideas.  just thought maybe we
could form a cult of "don't let org files get too big".

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: org-refile-use-cache and jumps using org-refile or org-goto

2021-03-02 Thread Samuel Wales
idk if thi will help buit a fwe not3es.  just in case they are
relevant to your case.

fwiw i have not heard of interactions between org-goto and the refile
mechanism and the cache.  i hafve not heard that the latter used a
cache but i do not use it.  refile with and withoyut the goto prefix
should normatively be congruent and both use cache.

i used to use the refile cache, then discovered that ido-hacks sped
ido so much that i didn't need it.  it would cache one fileset and
then be potentially not usable for another.  sort of like one cache
and multiple callers.  idk if htat got fixed.  probably not used much.

until recently in maint, ido and ido hacks with both refile and refile
goto [note: org-refile with a goto arg, not org-goto] has worked
perfectly.  with no cache.  now, there is an issue, where with no
cache that i know of, the first use, or the first use in a long time,
will actually present a huge file list that includes crazy elements
and is not constrained by even the verify function.  thus if i type
faster than it goes, the wrong item gets selected.  even if i use the
same selectors as normal.  so there's some bug or race condition.  it
is slow at those times.  this might not be relevant to your case but
seems worth mentioning.  i think i have not filed a bug report as i
don't know how to repro it at this time.


On 3/2/21, Maxim Nikulin  wrote:
> It seems, something goes a bit wrong. However it is rather confusion
> than anything really broken.
>
> Maybe everybody uses helm, ivy, etc., so nobody is affected.
>
> Usually I jump from one note to another heading with C-u C-c C-j
> (org-goto interface with target completion). I have not setup helm or
> other similar package. Completion works, maybe it is not really perfect
> (e.g. completion of top-level headings and deeper ones differ a bit). I
> have heard that C-u C-c C-w (org-refile) could work in a similar way. I
> did not like the latter variant due to mandatory file name in the
> beginning of a target.
>
> I have tried to enable org-refile-use-cache. Now completion options
> depends on what method was called earlier: org-refile or org-goto. If
> after cache clean up (C-u C-u C-u C-c C-w) first command was C-u C-c C-j
> (org-goto) than there is no file name as a prefix for both commands.
> However file name is prepended for both C-u C-c C-j and C-u C-c C-w if
> at first org-refile was called.
>
> There is one issue however. Default option option does not work if after
> cache clean other command is called, e.g.
> - jump using C-u C-c C-j
> - clean cache C-u C-u C-u C-c C-w
> - try to jump or to refile [C-u] C-c C-w to default offered option
> - "user-error: Invalid target location"
>
> I have just one file in the org-agenda-files list. It is becoming
> larger, that is why I decided to try org-refile-use-cache. My
> customization is minimal (besides org-default-dir and org-agenda-files):
>
> (org-refile-targets (quote ((org-agenda-files :maxlevel . 5
> (org-outline-path-complete-in-steps nil)
>
> I have tried to add (nil :maxlevel . 5) to org-refile-targets to check
> if options without file name will appear in addition to ones with file
> name for org-refile, but it has not happened. It was not clear at first
> that it is possible to start query with "/" and file name is added when
> TAB is pressed.
>
> Is it expected that with cache enabled, command that causes cache update
> affects appearance of completion options to its sibling (org-refile and
> org-goto)?
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



archiving speed [was Re: Tips on maintaining history in Org Mode]

2021-02-28 Thread Samuel Wales
thank you for your detaild reply.

more below.

On 2/28/21, Ihor Radchenko  wrote:
> details why). So, many org commands tend to lag on large archives.

that makes sense.  but why would appending to an archive as the result
of bulk archiving lag?  if the problem is large archive files, which
i'd bet is the case for a lot of users and not just me, then could org
in principle be changed so that all it does is append?  thus not lag?
like, build the entry in a temporary buffer?

as i see it, having more than one archive file per org file is good
for speed, but doesn't work in existing org, because iirc e.g. v A in
the agenda goes org agenda file -> corresponding archive file and will
miss the archive files that do not have a corresponding org file with
exactly the same basename sans extension.

i'd be ok with released org either allowing hte user to make
year-based archives by having all of org recognize them, or my just
append thing above.  maybe i am missing something.

> The lags can be solved in several ways:
> 1. Reduce the archive file size

this implies to me e.g. year-based archives, which would fail the v A
test iiuc.  thus needed extra code.

> 2. Use optimised folding mechanism [1] (this will speed up org-mode in
> general as well)

i look forward to this filtering down to maint.  :]  [i used to follow
master but too much for me now for health reasons.]

> 3. (untested) Put #+STARTUP: showeverything at the beginning of the
>archives, so that nothing is going to be folded

good idea.  my included-by-agenda archive files do seem to be in
showeveryting mode already for some reason.  but perhaps not when bulk
archiving.

would it be a silly idea for an fr that org make this an option for
bulk archiving?  hmm or for archive files in general?

>> i will keep in mind disabling font lock in archive files.  any
>> suggested code for that?
>
> Note that it will mostly affect find-file performance. To disable

if so, then i figure it's a one-time thing per file so no big deal.
but thanks for hte font lock stuff i didnt' know about.

> Sorry, the config is actually not yet formatted for public use. You can
> search for the code block containing "defun org-archive--compute-location".

firefox find does not seem to find it.

>
> You will need that code block and the following code block.
>
> [1] https://github.com/yantar92/org
>
> Best,
> Ihor
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Tips on maintaining history in Org Mode

2021-02-28 Thread Samuel Wales
Hi Ihor,

it never occurred to me that bulk archiving could be sped up by
changing anything about the archive files.  i assumed that archiving
worked by appending to those files, so once the initial find-file was
performed, there should be no additional slowness.

yet i tried a new file with no archive file, and bulk archiving took
less than a second for 9 entries.  before it would take idk a minute.

i will keep in mind disabling font lock in archive files.  any
suggested code for that?  your config is impressively [and for me
dauntingly] comprehensive.  the Archiving anchor does not seem to have
a referent.  I searched for archiving, but didn't seem to find what
you were probably pointing me to.

thanks.



Re: text search and restriction lock bugs

2021-02-28 Thread Samuel Wales
On 9/5/17, Samuel Wales  wrote:
> is it expected behavior that if you do a restriction lock on
> a subtree, then do a text search, it will include matches
> from org-agenda-text-search-extra-files?  imo it should not.

this was fixed, but i am starting to see it in maint again.  if i
create a new file, set restriction lock to subtree using < in the
stars, then run a text search, text search extra files entries show
up.  i have not tried it in -Q because of hte setup required that i
can't do atm.



Re: Tips on maintaining history in Org Mode

2021-02-26 Thread Samuel Wales
note that there is an issue when you try to name your archive files
using years like computer-2000.org_archive.  it can take seconds to
find-file big files so it is understandable to want to name files like
that.

however, if you change the name of an archive file, it will not be
found by org when you tell it to do certain things with archive files.
some code in org derives the basename to search from the basename of
the original file like computer,org.

in principle, maybe org could allow year suffixes/prefixes or it could
search all archive files in dirs that have org files.

perhaps also changing org-archive-file-header-format to allow a format
thingie for a timestamp would allow you to take parts of an archive
file and move them into one per year without having to put the date in
each archived entry.


On 2/26/21, David Masterson  wrote:
> Tim Cross  writes:
>
>> David Masterson  writes:
>>
>>> What would you use to then make a list of all meetings you had last
>>> year?
>>
>> For me, archiving is about data I'm unlikely to need again, but just in
>> case I do, it is in the archive. I rarely look at my archives. However,
>> when I do archive, I will usually archive into a 'year' file. So, to
>> find all the meetings held in 2015, I would open that archive file and
>> search for entries with the tag MEETING (I also have a tag for PHONE).
>
> Got it.  Thanks.
> --
> David Masterson
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-yank in stars corrupts outline

2021-02-26 Thread Samuel Wales
*** kill any header (with newline) then try yanking in various places
in the stars of any indented header that has things above it.  you
should get multiple demotions that do not conform to outline.

On 2/26/21, Samuel Wales  wrote:
> it is neither raw yank behavior nor org syntax
>
> in recent maint
>
> i have org-yank-adjusted-subtrees t
>
> * org-yank is funny
> *** kill this line (with newline) then try yanking at ^ places (remove
> the ^ first)
> the fault lies in the stars
> insertion above and arbitrary demotion
> *** x
> asdfnaksdj fnkadsn fkjans df
> ^a^sdkfjnaksdfn kajsndfk ajdnsf
> askdjfkasjdn fkajfdns
> *^*^* y
> *** [[https://go^ogle.com]]
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



[bug] org-yank in stars corrupts outline

2021-02-26 Thread Samuel Wales
it is neither raw yank behavior nor org syntax

in recent maint

i have org-yank-adjusted-subtrees t

* org-yank is funny
*** kill this line (with newline) then try yanking at ^ places (remove
the ^ first)
the fault lies in the stars
insertion above and arbitrary demotion
*** x
asdfnaksdj fnkadsn fkjans df
^a^sdkfjnaksdfn kajsndfk ajdnsf
askdjfkasjdn fkajfdns
*^*^* y
*** [[https://go^ogle.com]]



Re: Tips on maintaining history in Org Mode

2021-02-26 Thread Samuel Wales
org does indeed have a lot of related features, maybe too many even.
here is some of what i do.

- if i doneify, it means i will likely not need to search for it.
archived to a file.
  [currently the archiver is so slow i can't use it]
  CLOSED: [2012-11-08 Thu 19:40]
- state logging for repeaters in logbook
- your question: notes to keep around like this
  * LOG [2021-02-26 Fri 14:18] talked to bill gates; he uses linux now
  these get sorted at bottom by timestamp using user-defined
  this is the main thing
- bare inactive free form as needed

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Using lexical-binding

2021-02-23 Thread Samuel Wales
just a thanks to maintainers of emacs and org including those of you
fixing this and those who wrote the tests.  i had no idea org wasn't
fully lexical yet.  i look forward to whatever good that brings.


On 2/23/21, Kyle Meyer  wrote:
> Kyle Meyer writes:
>
>> Stefan Monnier writes:
> [...]
>>   ;; (org-agenda-list); fails: void-variable date
>>
>> There are also some `make test' failures:
>>
>>   7 unexpected results:
>>  FAILED  test-org-agenda/diary-inclusion
>>  FAILED  test-org-agenda/empty
>>  FAILED  test-org-agenda/one-line
>>  FAILED  test-org-agenda/scheduled-non-todo
>>  FAILED  test-org-agenda/set-priority
>>  FAILED  test-org-agenda/sticky-agenda-name
>>  FAILED  test-org-agenda/sticky-agenda-name-after-reload
>>
>>> or "pretends everything is fine but doesn't do the right thing any
>>> more", or (even better) actual feedback about the code itself and the
>>> approach(es) I chose to use.
>>
>> While I'm not sure I can provide any useful feedback about approaches,
>> I'll see if I can tweak your patch to resolve the org-agenda-list
>> failure or any of the above test failures.
>
> With the changes below on top of your patch, the simple org-agenda-list
> call from above works and the test failures are gone.
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 16ec70c77..81409d6ac 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -5448,27 +5448,29 @@ (defun org-agenda-get-day-entries (file date 
> args)
> (setf args (cons :deadline* (delq :deadline* args)
>   ;; Collect list of headlines.  Return them flattened.
>   (let ((case-fold-search nil) results deadlines)
> -   (dolist (arg args (apply #'nconc (nreverse results)))
> - (pcase arg
> -   ((and :todo (guard (org-agenda-today-p date)))
> -(push (org-agenda-get-todos) results))
> -   (:timestamp
> -(push (org-agenda-get-blocks) results)
> -(push (org-agenda-get-timestamps deadlines) results))
> -   (:sexp
> -(push (org-agenda-get-sexps) results))
> -   (:scheduled
> -(push (org-agenda-get-scheduled deadlines) results))
> -   (:scheduled*
> -(push (org-agenda-get-scheduled deadlines t) results))
> -   (:closed
> -(push (org-agenda-get-progress) results))
> -   (:deadline
> -(setf deadlines (org-agenda-get-deadlines))
> -(push deadlines results))
> -   (:deadline*
> -(setf deadlines (org-agenda-get-deadlines t))
> -(push deadlines results)))
> +  (org-dlet
> +  ((date date))
> + (dolist (arg args (apply #'nconc (nreverse results)))
> +   (pcase arg
> + ((and :todo (guard (org-agenda-today-p date)))
> +  (push (org-agenda-get-todos) results))
> + (:timestamp
> +  (push (org-agenda-get-blocks) results)
> +  (push (org-agenda-get-timestamps deadlines) results))
> + (:sexp
> +  (push (org-agenda-get-sexps) results))
> + (:scheduled
> +  (push (org-agenda-get-scheduled deadlines) results))
> + (:scheduled*
> +  (push (org-agenda-get-scheduled deadlines t) results))
> + (:closed
> +  (push (org-agenda-get-progress) results))
> + (:deadline
> +  (setf deadlines (org-agenda-get-deadlines))
> +  (push deadlines results))
> + (:deadline*
> +  (setf deadlines (org-agenda-get-deadlines t))
> +  (push deadlines results
>
>  (defsubst org-em (x y list)
>"Is X or Y a member of LIST?"
> @@ -6710,6 +6712,7 @@ (defun org-agenda-format-item (extra txt 
> level category tags dotime
> (get-text-property 1 'effort txt)))
>(tag (if tags (nth (1- (length tags)) tags) ""))
>(time-grid-trailing-characters (nth 2 org-agenda-time-grid))
> +  (extra (or (and (not habitp) extra) ""))
>time
>(ts (when dotime (concat
>  (if (stringp dotime) dotime "")
> @@ -6793,7 +6796,6 @@ (defun org-agenda-format-item (extra txt 
> level category tags dotime
>(concat time-grid-trailing-characters "
> ")
>  time-grid-trailing-characters)))
>(t ""))
> -   extra (or (and (not habitp) extra) "")
> category (if (symbolp category) (symbol-name category) category)
> level (or level ""))
>   (if (string-match org-link-bracket-re category)
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.

Re: 'false' list item

2021-02-21 Thread Samuel Wales
perhaps if there is no blank line above or below, then it could be not a list.


On 2/21/21, Diego Zamboni  wrote:
> Juan Manuel,
>
> YMMV depending on your needs and habits, but another workaround for this
> problem would be to use visual-line-mode instead of filling paragraphs.
>
> --Diego
>
>
>
>
> On Sun, Feb 21, 2021 at 8:34 PM Juan Manuel Macías 
> wrote:
>
>> Kyle Meyer  writes:
>>
>> > It seems that your approach would do a good job of helping you catch
>> > cases that you don't want to be treated as lists.  I'm not aware of any
>> > related functionality in Org, so I don't think you're missing something
>> > there.
>> >
>> > Once you know that there is a particular spot that you want to prevent
>> > from being interpreted as a list, you could add a zero-width space in
>> > front of it:
>> >
>> > (info "(org)Escape Character")
>> >
>> > I'm not sure if that's the sort of solution you're asking for, though.
>>
>> Thanks for your advice, Kyle. Adding the U+200B char. works fine to
>> avoid false positives. Anyway, like Tim Cross says, that situation
>> maybe should be considered as a bug. I think the ideal behavior would
>> be for Org to consider a list only when there is a blank line above.
>> But, well thought out, I am afraid that it would not prevent false
>> positives, as one may want perfectly write a list at the beginning of
>> the document, or start a plain paragraph with (for example) a digit + a
>> period + a space...
>>
>> Best regards,
>>
>> Juan Manuel
>>
>>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



filling quoted email in org does not infer a fill prefix

2021-02-19 Thread Samuel Wales
i'd like to fill things like this

  > asdfka sdfnl akjs dnflkajs ndfkjasdn kfj ansdkj nfaksjdfn
  > sadj nflakjs ndfklaj ndsfkjans dkfjna skdjfn aklsjd nfkajdnsf

in org.

i always had no problem with it, and when i did, i could use
filladapt, with a little alist change from long ago.

but recently, at least in maint with my .emacs on emacs 25, it all
gets bunched up into a single paragraph with "> " not a prefix.

i know emacs has developed filladapt-like features to infer a fill
prefix, but my cognition is just not figuring any of this out.

any ideas?

thank you.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Org failing to format a link with verbatim text

2021-02-17 Thread Samuel Wales
in maint for regular emacs i get link face for the link.:

The link [[phrase with =verbatim text 1=][a phrase with =verbatim text 2=]]
  face (org-link org-verbatim org-link)

followed by a phrase in =verbatim text 3= followed by
normal text.
  face (org-verbatim org-verbatim)

=verbatim=
  face (org-verbatim)


On 2/17/21, Okam  wrote:
> On 2/17/21 1:00 PM, Berry, Charles wrote:
>>
>>
>>
>>> On Feb 17, 2021, at 6:48 AM, Okam 
>>> wrote:
>>>
>>> On 2/16/21 6:52 PM, Berry, Charles" via "General discussions about
>>> Org-mode. wrote:



> On Feb 16, 2021, at 1:20 PM, Okam 
> wrote:
>
> I am using the Emacs gccemacs branch with Org version "9.5-dev".
> I have noticed that when I try to insert the stored link
>
>  file:doc/loopy-doc.org::*Destructuring with =dash=
>
> and use the heading as the link description, that Org cannot format
> this
> link correctly in all circumstances, and tries to make the verbatim
> text
> break out from the link.

 The last para of (info "(org) External Links") says in part:

 #+begin_quote
 If spaces must be part of the link (for example in
 ‘bbdb:R.*Stallman’), or if you need to remove ambiguities about the
 end of the link, enclose the link in square or angular brackets.
 #+end_quote

 To me, this sounds like advice not to drop external links amid normal
 text. i.e. put them in brackets instead.

 HTH,

 Chuck


>>>
>>> Hello,
>>>
>>> The link is being insert with the command `org-insert-link`, and the
>>> information is gotten by the command `org-store-link`.  The link is
>>> being surrounded by square brackets when `org-insert-link` inserts the
>>> link.  However, Org mode does not format the link correctly, as seen in
>>> the pictures I sent.
>>>
>>> I am wondering whether I should report this as a bug, or whether this
>>> problem is already fixed, as I do not update Org frequently.
>>>
>>> Thank you.
>>>
>>
>> I cannot reproduce this. These keystrokes:
>>
>> #+begin_example
>> M-x org-insert-link file:doc/loopy-doc.org::*Destructuring with =dash= RET
>> Destructuring with =dash= RET
>> #+end_example
>>
>> yield a link displayed as underlined `Destructuring with =dash=' and show
>> the actual link when the cursor hovers over the description.  Further,
>> when I run `org-fill-paragraph' I sometimes get newlines inserted in the
>> description, but the link is still functional.
>>
>> What is needed is an ECM [1] that will lead to the problem you describe.
>>
>> Screenshots do not help very much as the precise sequence of keystrokes
>> that results in the issue cannot be reverse engineered, so others cannot
>> easily trace the action.
>>
>> Chuck
>>
>> p.s. Using Org version 9.4.3
>>
>> [1] https://orgmode.org/worg/org-faq.html#ecm
>>
>
> Hello,
>
> I have attached a minimum working example.  The bad formatting also
> occurs when just pasting the link.  In the example, Org mode highlights
> from beginning of the phrase "=verbatim text 1=" to the end of the
> phrase "=verbatim text 3=" in the verbatim font style. Part of the link
> is hidden as normal, but the text within the region of now verbatim text
> is not hidden, including some of the brackets.
>
> I have reproduced this without loading a configuration, so it is present
> in version of Org included in the Gccemacs branch of Emacs.
>
> Does that help?
>
> Thank you.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
still not what i am saying.  nefver mind.  thanks.

On 2/16/21, Tim Cross  wrote:
>
> Samuel Wales  writes:
>
>> hi tim,
>>
>> tanks for your replies.
>>
>> 1.  the same problem occurs without any * in the buffer.
>
> It will occur with any of the markup special characters e.g. *, =, _, +, /
>
>>
>> 2.  the emphasis regexps are supposed to be limited to a few lines.
>
> Are they? What is 'a few'? This also won't work if you use
> visual-line-mode and don't use auto-fill (as your paragraphs are then
> just one long line).
>
>>
>> 3.  they are also supposed to not try to match dissimilar delimiiters.
>>
>
> Not quite sure what you mean here.
>
>> the problem is that
>>
>> hi =something
>>
>> stops all emphasis of all types in the entire rest of hte bguffer even
>> if the buyffer contains many lines.  this sems unusual to me.
>>
>> it does not break anything befofre it.
>>
>> so i think your hypothesis of what i am talking about might possibly
>> not match what i am talking about at all.
>>
>
> I'm not disagreeing with what your saying. I think the reason the rest
> of the file doesn't get parsed correctly is because the single markup
> character has made the syntax inconsistent and broken.
>
> The problem is I don't think there is a good fix for this which doesn't
> introduce other problems. If the regexp which does the matching is
> supposed to limit its search to just a specific number of lines, then
> perhaps it is broken. However, I'm not sure what 'a few lines' really
> means (2?, 5?, 10?). I also know from past experience that trying to
> define font-lock matches which work in such a way is complex, error
> prone and often results in a considerable performance hit.
>
> Bottom line, if you want to use the characters reserved for markup
> purposes as just plain characters, you have to somehow quote them or
> mark them as being 'verbatim' characters. I do think it would be useful
> to have something in the manual on this under the markup section.
>
> --
> Tim Cross
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
to understant, perahsp try to look at the op and remove the line that says *hi*?


On 2/16/21, Samuel Wales  wrote:
> hi tim,
>
> tanks for your replies.
>
> 1.  the same problem occurs without any * in the buffer.
>
> 2.  the emphasis regexps are supposed to be limited to a few lines.
>
> 3.  they are also supposed to not try to match dissimilar delimiiters.
>
> the problem is that
>
> hi =something
>
> stops all emphasis of all types in the entire rest of hte bguffer even
> if the buyffer contains many lines.  this sems unusual to me.
>
> it does not break anything befofre it.
>
> so i think your hypothesis of what i am talking about might possibly
> not match what i am talking about at all.
>
> i am limited in coputer ue and will have to stop.
>
> tahnks for your replies.
>
>
> On 2/16/21, Tim Cross  wrote:
>>
>> Samuel Wales  writes:
>>
>>> to answer your question: i expected it to just skip the non-emphasis.
>>> not emphasizing the rest of the buffer seemed quite unusual.
>>>
>>
>> I guess the problem is the same - how does org know when it is just a *
>> and when it is the beginning of some emphasis text? We could make it
>> that such markup only works on words, allowing the code to only consider
>> two * as emphasis if there are no spaces, otherwise treat as just a *,
>> but that would be inconvenient when you want to emphasis a phrase or a
>> couple of words. We could change the regexp to only consider it an
>> emphasis block if both markers are on the same line, but again,
>> potentially inconvenient and it would fail for those who use visual-line
>> mode where there paragraphs are just 1 long line.
>>
>> In short, can understand what your saying, but not sure there is a
>> viable fix which doesn't have a heap of other consequences. Basically,
>> if you want to use the 'markup' characters as normal characters, you
>> need to either escape them or put them inside a verbatim directive.
>>
>> --
>> Tim Cross
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
hi tim,

tanks for your replies.

1.  the same problem occurs without any * in the buffer.

2.  the emphasis regexps are supposed to be limited to a few lines.

3.  they are also supposed to not try to match dissimilar delimiiters.

the problem is that

hi =something

stops all emphasis of all types in the entire rest of hte bguffer even
if the buyffer contains many lines.  this sems unusual to me.

it does not break anything befofre it.

so i think your hypothesis of what i am talking about might possibly
not match what i am talking about at all.

i am limited in coputer ue and will have to stop.

tahnks for your replies.


On 2/16/21, Tim Cross  wrote:
>
> Samuel Wales  writes:
>
>> to answer your question: i expected it to just skip the non-emphasis.
>> not emphasizing the rest of the buffer seemed quite unusual.
>>
>
> I guess the problem is the same - how does org know when it is just a *
> and when it is the beginning of some emphasis text? We could make it
> that such markup only works on words, allowing the code to only consider
> two * as emphasis if there are no spaces, otherwise treat as just a *,
> but that would be inconvenient when you want to emphasis a phrase or a
> couple of words. We could change the regexp to only consider it an
> emphasis block if both markers are on the same line, but again,
> potentially inconvenient and it would fail for those who use visual-line
> mode where there paragraphs are just 1 long line.
>
> In short, can understand what your saying, but not sure there is a
> viable fix which doesn't have a heap of other consequences. Basically,
> if you want to use the 'markup' characters as normal characters, you
> need to either escape them or put them inside a verbatim directive.
>
> --
> Tim Cross
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
to answer your question: i expected it to just skip the non-emphasis.
not emphasizing the rest of the buffer seemed quite unusual.


On 2/16/21, Samuel Wales  wrote:
> hi tim,
>
> it isn't malformed, so definitely not looking to be told it's
> malformed.  it is just text that is not emphasis.
>
> if you think the function works as expected by skipping the rest of
> the buffer, then never mind.
>
> i was, in that case, just emphasizing that the code floating around
> that is used to fontify the agenda is going to break.  so nm.
>
>
> On 2/16/21, Tim Cross  wrote:
>>
>> Samuel Wales  writes:
>>
>>> in fundamental mode [to eliminate any extra stuff]:
>>>
>>> ===
>>> hi
>>> /hi/
>>> hi =test
>>> hi
>>> hi
>>> hi
>>> /hi/
>>> hi
>>> *hi*
>>> hi
>>> hi
>>> hi
>>> ===
>>>
>>> m-: (org-do-emphasis-faces nil) RET
>>>
>>> everything after =test does not get emphasized.
>>>
>>> there is code floating around that calls hte function directly instead
>>> of via font lock.  so even if font lock or org mode forgive this, that
>>> code does not seem to.  and idk whether it is forgiven or if there are
>>> unintended consequences.
>>>
>>> e.g. to emphasize in agenda.  which, not sure why it isn't?
>>
>> I'm not clear on what you are expecting/wanting here. If you have badly
>> formed markup, syntax highlighting and other functions can be expected
>> to fail.
>>
>> Are you expecting something more informative, like an error message
>> saying you have an unterminated emphasis marker or similar? If so, while
>> it might be possible, I suspect it would come at a high cost from a
>> performance perspective, especially in large org files. For example, at
>> what point do you decide the closing marker is missing rather than just
>> a little further along? At what point do you begin doing the checking -
>> after typing the first marker, after the first character, after the
>> first space (noting that all this checking comes at a performance cost)?
>>
>> What does org-lint tell you when you have such malformed markup in your
>> document? Would that be sufficient to track down issues when they occur?
>> If org-lint is not picking it up or is not providing enough detail to
>> help resolve the issue, perhaps tweaking it would be worthwhile.
>>
>> --
>> Tim Cross
>>
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
hi tim,

it isn't malformed, so definitely not looking to be told it's
malformed.  it is just text that is not emphasis.

if you think the function works as expected by skipping the rest of
the buffer, then never mind.

i was, in that case, just emphasizing that the code floating around
that is used to fontify the agenda is going to break.  so nm.


On 2/16/21, Tim Cross  wrote:
>
> Samuel Wales  writes:
>
>> in fundamental mode [to eliminate any extra stuff]:
>>
>> ===
>> hi
>> /hi/
>> hi =test
>> hi
>> hi
>> hi
>> /hi/
>> hi
>> *hi*
>> hi
>> hi
>> hi
>> ===
>>
>> m-: (org-do-emphasis-faces nil) RET
>>
>> everything after =test does not get emphasized.
>>
>> there is code floating around that calls hte function directly instead
>> of via font lock.  so even if font lock or org mode forgive this, that
>> code does not seem to.  and idk whether it is forgiven or if there are
>> unintended consequences.
>>
>> e.g. to emphasize in agenda.  which, not sure why it isn't?
>
> I'm not clear on what you are expecting/wanting here. If you have badly
> formed markup, syntax highlighting and other functions can be expected
> to fail.
>
> Are you expecting something more informative, like an error message
> saying you have an unterminated emphasis marker or similar? If so, while
> it might be possible, I suspect it would come at a high cost from a
> performance perspective, especially in large org files. For example, at
> what point do you decide the closing marker is missing rather than just
> a little further along? At what point do you begin doing the checking -
> after typing the first marker, after the first character, after the
> first space (noting that all this checking comes at a performance cost)?
>
> What does org-lint tell you when you have such malformed markup in your
> document? Would that be sufficient to track down issues when they occur?
> If org-lint is not picking it up or is not providing enough detail to
> help resolve the issue, perhaps tweaking it would be worthwhile.
>
> --
> Tim Cross
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



[bug] org-do-emphasis-faces breaks with incomplete emphasis

2021-02-16 Thread Samuel Wales
in fundamental mode [to eliminate any extra stuff]:

===
hi
/hi/
hi =test
hi
hi
hi
/hi/
hi
*hi*
hi
hi
hi
===

m-: (org-do-emphasis-faces nil) RET

everything after =test does not get emphasized.

there is code floating around that calls hte function directly instead
of via font lock.  so even if font lock or org mode forgive this, that
code does not seem to.  and idk whether it is forgiven or if there are
unintended consequences.

e.g. to emphasize in agenda.  which, not sure why it isn't?

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Typing latency

2021-02-10 Thread Samuel Wales
i have a note that in org 8.0+ they have to be after the todo kw.
however, i /always/ interpret this to mean after the todo kw position
i.e. after where the todo kw would go if it is not there.  thus "*
#[A] take out garbage" is legit.  "* #[A] NEXT take out garbage" is
wrong.

"* NEXT take out #[A] garbage" feels wrong to me as an assignment of
priority to that entry.  org maint seem to agree with me.


On 2/10/21, Eric S Fraga  wrote:
> On Tuesday,  9 Feb 2021 at 23:33, Ihor Radchenko wrote:
>> I have the following in my config to speed things up:
>>
>> (setq org-priority-regexp "^\\*+.*\\(\\[#\\([A-Z0-9]+\\)\\] ?\\)")
>
> Should this not be the default setting?  Reading the documentation,
> priority cookies must be in a headline with a TODO item.  The current
> default setting is not anchored to headlines so does seem to be both
> expensive and not consistent with the documentation.  Your suggestion is
> more consistent.
>
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-213-g49364f
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [WDYT, mini] key h in agenda for quick help

2021-02-05 Thread Samuel Wales
i guess i was merely saying: instead of h, which a new user might not
try, something that works for everything in emacs might be a
possibility.  but c-h m and c-h b could perhaps be improved a bit and
include mode-specific text [details left to reader as exercise].


On 2/5/21, Marco Wahl  wrote:
> Samuel Wales  writes:
>
>> are there precedents?  calc?  h in dired does c-h m.
>
> Looks to me like calc shines brightest with its help system which btw
> one enters with key h.
>
> Up to now I see the precedents
>
> - dired
> - help-mode
> - view-mode
> - Buffer-menu-mode
>
> They all have h be the same as C-h m (describe-mode) AFAICS.
>
>> just a brainstorm but maybe c-h m and c-h b can be more friendly for all
>> modes?
>
> I don't get this.  Would you like to elaborate, please?
>
>
> Ciao,
> -- Marco
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [WDYT, mini] key h in agenda for quick help

2021-02-05 Thread Samuel Wales
are there precedents?  calc?  h in dired does c-h m.

just a brainstorm but maybe c-h m and c-h b can be more friendly for all modes?


On 2/5/21, Marco Wahl  wrote:
> Robert Pluim  writes:
>
>>> On Fri, 05 Feb 2021 11:34:41 +0100, Marco Wahl
>>>  said:
>>
>> Marco> Hi all!
>> Marco> What do you think about binding key h to function describe-mode
>> in Org
>> Marco> agenda?  Basically pressing key h would open a window showing
>> the key
>> Marco> bindings in the agenda.  There would also be additional
>> information.
>>
>> Marco> The implementation could be just the line
>>
>> Marco> (org-defkey org-agenda-mode-map (kbd "h") #'describe-mode)
>>
>> Marco> Also not that key h has no default binding in Org agenda yet!
>>
>> Itʼs bound to 'org-agenda-holidays'
>
> OMG!  How could I not see this?  Thanks!
>
>> Marco> The connoisseur of course knows that describe-mode is already
>> just a
>> Marco> {C-h m} away from the Org agenda.  Anyway I think having {h} in
>> the
>> Marco> agenda would be nice.  This would also be consistent with
>> Marco> e.g. help-mode.
>>
>> Meh. People should learn. Bah humbug ;-)
>
> :)
>
> I just see that with the Org default org-agenda-holidays can be called
> with either key h or key H.
>
> What luxury for org-agenda-holidays is this?!
>
> I recreate this suggestion and propose to sacrifice the current default
> binding of h.  Let h open the quick help!
>
>
> Ciao,
> --
> Marco
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



batch archiving is too slow for my computer ... is it really intensive?

2021-02-02 Thread Samuel Wales
maint.

i have an old computer, which usually has no problems if i am careful,
except org is recently somewhat slower.

with agenda batch archiving, however, even for just a few entries, the
cpu overheats.

the cpu never gets above 28% in a dual core in gkrellm, meaning that
only 1/4 of total capacity in a dual core is used.  i don't know why
that makes it overheat.

here is a profiler report for archiving 2 entries.  then 2 entries again.

is this kind of a normal profiler report?

thanks.

- command-execute 297,963,432  99%
 - call-interactively 297,963,432  99%
  - funcall-interactively 297,963,432  99%
   - org-agenda-bulk-action   273,550,028  91%
- org-agenda-archive  272,853,572  91%
 - funcall-interactively  272,853,508  91%
  - org-agenda-archive-with   272,853,508  91%
   - org-archive-subtree  272,828,828  91%
- org-show-all262,058,419  87%
 - org-cycle-hide-drawers 260,230,547  87%
  - #  260,226,323  87%
   - org-element-at-point 254,156,375  85%
- org-element--parse-to   251,281,887  84%
 - org-element--current-element   247,748,793  83%
  - org-element-planning-parser13,355,147   4%
   - org-element-timestamp-parser  11,180,859   3%
- org-parse-time-string 5,781,180   1%
   string-to-number 3,726   0%
  match-string-no-properties2,206,416   0%
  match-string  1,863   0%
  - org-at-heading-p  841,472   0%
 outline-on-heading-p 106,496   0%
  + org-element--list-struct  528,710   0%
org-element-property-drawer-parser414,880   0%
org-element--collect-affiliated-keywords   348,220   0%
  + org-element-drawer-parser 340,004   0%
org-element-paragraph-parser  296,720   0%
org-element-plain-list-parser 155,040   0%
org-element-item-parser18,496   0%
org-element-comment-parser  8,192   0%
   outline-previous-heading   106,574   0%
+ org-at-heading-p  1,374,384   0%
   + org-hide-drawer-toggle 5,006,924   1%
 + org-flag-region  1,827,872   0%
+ find-file-noselect9,965,693   3%
+ org-entry-put   233,830   0%
+ org-get-category118,306   0%
+ org-reveal   78,080   0%
+ org-update-statistics-cookies65,870   0%
+ org-get-outline-path 54,804   0%
+ org-entry-get50,410   0%
+ org-paste-subtree32,604   0%
+ org-cut-subtree  27,552   0%
+ org-archive--compute-location25,772   0%
+ org-copy-subtree 21,428   0%
  abbreviate-file-name 16,432   0%
  org-string-nw-p  12,524   0%
  do-after-load-evaluation 11,682   0%
+ jit-lock-after-change 8,696   0%
+ org-get-tags  5,408   0%
  org-up-heading-safe   4,096   0%
+ substitute-env-in-file-name   1,154   0%
+ find-buffer-visiting  1,048   0%
+ org-back-to-heading   1,024   0%
   + org-remove-subtree-entries-from-agenda 8,240   0%
 #   1,604   0%
+ org-unlogged-message693,000   0%
+ read-char-exclusive   1,456   0%
   + save-some-buffers 15,634,438   5%
   + ido-hacks-execute-extended-command 8,770,778   2%
+ tooltip-show-help-non-mode   

[bug] erratic behavior of org refile

2021-02-02 Thread Samuel Wales
in recent maint [past few weeks perhaps?].

when i refile a task or goto a task using org-refile, sometimes refile
is quite slow.  then it sometimes sends me to an impossible location.

by "impossible" i mean that either my refile targets variable is not
respected or my refile verify function is not respected.

for example, it can take me to "please" and it will take me to a
doneified entry.

does refile use a timer?  the occasional slowness suggests it is
filling a cache or something, but i have refile caching turned off.

it seems to be erratic according to elapsed time or speed of typing or
something.  this is just a subjective impression.

this is not a perfect bug report.  i am using my own code, which has
not changed.  i use ido and ido-hacks, which also have not changed.
my habits also have not changed.  and i can't produce a repro for you
at this time.

so i just wnat to know if:

1] anybody experiences this recently
2] anybody can think of any change to refile code that could cause this
3] anybody can think of any reason why this might occur

thank you.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Refile Targets Custom Function Support

2021-01-29 Thread Samuel Wales
oops, i meant org-refile-target-verify-function variable.

On 1/29/21, Samuel Wales  wrote:
> alpha-org-refile-target-verify-function is all i know of.
>
> On 1/29/21, Kevin Foley  wrote:
>> I'd like to use an `org-ql' query in order to get eligible targets when
>> calling `org-refile'.
>>
>> It doesn't seem `org-refile-targets' supports something like passing a
>> function that returns the desired targets.  Is it possible through some
>> other means?
>>
>> If not, would a patch to `org-refile-get-targets' controlled by a new
>> type in `org-refile-targets' be welcome?
>>
>> Thanks,
>> Kevin Foley
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Refile Targets Custom Function Support

2021-01-29 Thread Samuel Wales
alpha-org-refile-target-verify-function is all i know of.

On 1/29/21, Kevin Foley  wrote:
> I'd like to use an `org-ql' query in order to get eligible targets when
> calling `org-refile'.
>
> It doesn't seem `org-refile-targets' supports something like passing a
> function that returns the desired targets.  Is it possible through some
> other means?
>
> If not, would a patch to `org-refile-get-targets' controlled by a new
> type in `org-refile-targets' be welcome?
>
> Thanks,
> Kevin Foley
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: How can I keep Org-id links from breaking when moving files?

2021-01-19 Thread Samuel Wales
(defvar org-id-locations nil
  "List of files with IDs in those files.")

(defvar org-id-files nil
  "List of files that contain IDs.")

you are in a maze of twisty little passages.

you are in a twisty maze of little passages.


On 1/19/21, doltes  wrote:
>
> aroz...@gmail.com writes:
>
>> This question is in the context of using Org-id UUIDs for linking between
>> files. If I understand correctly, Org-id knows where to look for UUIDs
>> (generated by org-id-get-create) by looking at the org-id-locations
>> variable. But what if I move an .org file that I've generated a UUID into
>> another folder? I know I can run org-id-update-id-locations, and there's
>> an
>> org-id-extra-files variable, but is there a way to list all the folders
>> on
>> the system where Org-id should look for UUIDs?
>>
>> Thanks,
>> Alan
>
> After reading the docstring of the function
> =org-id-update-id-locations=, I found that the files which are scanned
> are defined by 6 variables.
>
> The following was retrieved from the docstring
>
> #+begin_quote
> This will scan all agenda files, all associated archives, and all
> files currently mentioned in ‘org-id-locations’.
> #+end_quote
>
> This implies that when that function is executed, the files whose
> content is searched for IDs (i.e. they are scanned) are
>
> + The files mentioned in =org-agenda-files=.
> + The archives associated to the files in =org-agenda-files=.
> + The files mentioned in =org-id-locations=.
> + The files provided as arguments to the =org-id-update-id-locations=.
>
> The following are not mentioned in the documentation of
> =org-id-update-id-locations=, but when looking at the source code, you
> can see that the value of the following variables is used
>
> + =org-id-extra-files=
> + =org-id-files=
>
> As we could see, the files which are scanned are defined by 6 variables.
>
> Now, apparently, you want to get a list of the files which are
> scanned. You can do that by executing what
> =org-id-update-id-locations= executes in order to get the list of
> files to scan. The following was retrieved from that function with
> some modifications
>
> #+begin_src elisp :results output
> (let ((files (delete-dups
>  (mapcar #'file-truename
>  (append
>   (org-agenda-files t org-id-search-archives)
>   (unless (symbolp org-id-extra-files)
> org-id-extra-files)
>   org-id-files)
>   (dolist (file files) (princ (format "%s\n" file
> #+end_src
>
> #+RESULTS:
> #+begin_example
> /home/username/my/org/Statistics.org
> /home/username/my/org/Programming languages/Elisp.org
> /home/username/my/org/Programming languages/R.org
> #+end_example
>
> Hope that helps. Let me know if that answers your question.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



bug#42484: 26.1: org-mode should display value of links in mini-buffer

2021-01-14 Thread Samuel Wales
by activate i mean display, in echo area, whatever it is i want to
display.  i think help-echo is a text property, and i might or might
not want to display it, depending.  and i might want to display the
other stuff even if there is no help-echo.

i use [and adore] org-link-minor mode in elisp mode.  it highlights
links and timestamps and makes links followable.  i even use
[[target]] <> within elisp buffers, and org id links that go
from elisp to org and vice-versa.

if org-link-minor-mode is active in an elisp buffer, i can run the
following to detect whether cursor is over an org ts.

(defun hoka-eldoc-at-point ()
  (when (eq 'org-date (get-text-property (point) 'face))
(format "%s"
(when (fboundp 'alpha-org-time-span)
  (with-no-warnings
(alpha-org-time-span))

then i get the time span in the echo area.  a time span is e.g. -1 for
yesterday.  it could just as well be a timestamp in a different format
or lang.  so that's great.  but i want mouse hover to do the same
thing, and to do so with a delay.  and i want links of course.

more generally, i might occasionally want /some/ eldoc type stuff and
/some/ help-echo stuff.

so org-link-minor-mode was useful in my case because it [i think it is
it] adds face property which can be used.  and i thought that might be
useful to you.  idk though.

in my case i find it a bit overwhelming to get whatever solution i use
for cursor to also work for mouse [with appropriate delays].  and get
whatever else to work and to not have anything annoyingly display.


On 1/14/21, Juri Linkov  wrote:
>> this is an interesting discussion.  is there any side discussion that
>> takes into account both mouse and cursor?
>
> Indeed, you can see a side discussion at
> https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00885.html
> where we discussed highlighting the completion candidate
> the same way whether the mouse pointer hovered over it,
> or the cursor moved to its buffer position.
>
> That discussion also mentions another way to display
> help-text using cursor-sensor-mode, i.e. after enabling it,
> cursor-sensor-functions can detect when the cursor enters
> the help-text property, then display it in the echo area.
>
>> 1] displaying value of link in echo area [the problem you are
>> discussing -- don't let me derail it] with a short nonzero delay
>> 2] doing so *for both cursor and mouse* -- too much futzing here
>> 3] also doing other stuff -- also futzing
>>
>> other stuff includes maybe [or maybe not] showing function signature
>> or docstrings in elisp buffers [possibly with longer delay], and
>> showing the time span in number of days from now to the org timestamp
>> at point or under mouse in any mode.
>
> This looks like the 5th possible way to implement this using eldoc,
> in addition to tooltips, post-command-hook, help-at-pt, cursor-sensor-mode.
>
>> i have code for the last thing.  the problem is figuring out making
>> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse
>> and keyboard without verbose help-echo like in dired.  also the
>> major/minor modes and
>
> help-at-pt has an option to ignore verbose help-echo in dired.
> post-command-hook can be enabled locally only in org-mode buffers.
> I don't know how to do the same in eldoc.
>
>> i guess i am saying [back to topic] this is a bit complex and i wonder
>> if a more orthogonal solution is called for?  as some might want mouse
>> activation also, and eldoc already shows elisp stuff.
>>
>> and another suggestion: org-link-minor-mode is what i might use to
>> identify when to activate org links and timestamps.
>
> You mean to activate is to display their help-echo?
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html





bug#42484: 26.1: org-mode should display value of links in mini-buffer

2021-01-13 Thread Samuel Wales
[and whether it is upon typing vs. movement.]

On 1/13/21, Samuel Wales  wrote:
> [my point aboutg orthogonal solution is that different mechanisms
> would not be needed for mouse and cursor and different stuff to
> display in the echo area.  to complete my incomplete sentence,
> major/minor modes and potentially differing delays.]
>
> On 1/13/21, Samuel Wales  wrote:
>> this is an interesting discussion.  is there any side discussion that
>> takes into account both mouse and cursor?  i have had a devil of a
>> time trying to get:
>>
>> 1] displaying value of link in echo area [the problem you are
>> discussing -- don't let me derail it] with a short nonzero delay
>> 2] doing so *for both cursor and mouse* -- too much futzing here
>> 3] also doing other stuff -- also futzing
>>
>> other stuff includes maybe [or maybe not] showing function signature
>> or docstrings in elisp buffers [possibly with longer delay], and
>> showing the time span in number of days from now to the org timestamp
>> at point or under mouse in any mode.
>>
>> i have code for the last thing.  the problem is figuring out making
>> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse and
>> keyboard without verbose help-echo like in dired.  also the
>> major/minor modes and
>>
>> i guess i am saying [back to topic] this is a bit complex and i wonder
>> if a more orthogonal solution is called for?  as some might want mouse
>> activation also, and eldoc already shows elisp stuff.
>>
>> and another suggestion: org-link-minor-mode is what i might use to
>> identify when to activate org links and timestamps.
>>
>>
>> On 1/13/21, Juri Linkov  wrote:
>>>> Still, I would like to continue to promote my solution, because it's
>>>> much simpler and is instantaneous upon key-press. It might also be more
>>>> efficient: The help-at-pt solution runs code in all buffers, let's say
>>>> every 0.1 seconds, all the time; my solution only runs in the selected
>>>> mode(s) buffers but after every key-press, which for an 'average'
>>>> touch-typist taking a speed test would be 0.3 seconds.
>>>
>>> I agree.  Overhead of needlessly running the global timer is what
>>> concerns
>>> me too.  But using an idle timer by help-at-pt is not that bad either.
>>> It runs code only after the last key-press in a sequence of many
>>> key-presses.
>>> So with idle timer in help-at-pt and the default delay, code runs less
>>> often
>>> than by using post-command-hook.  Here are a brief comparison of
>>> advantages and disadvantages of these two approaches:
>>>
>>> 1. help-at-pt idle timer
>>>
>>> Pros:
>>> 1.1. runs code once a sequence of key-presses is finished,
>>>  and 1 second has passed after the last key-press,
>>>  where 1 second is the default value of help-at-pt-timer-delay.
>>>  Customizing it to 0.1 removes this advantage because on average
>>>  there is more time between key-presses than 0.1 seconds.
>>>
>>> Cons:
>>> 1.1. With a bigger value of help-at-pt-timer-delay (by default, 1
>>> second)
>>>  that helps code to run less often (not after every key-press),
>>>  the effect of the primary goal of this feature to display
>>>  the help-echo string is not instantaneous;
>>> 1.2. the timer runs globally in all modes (this could be mitigated
>>>  by checking major mode in the timer function).
>>>
>>> 2. post-command-hook
>>>
>>> Pros:
>>> 1.1. can be activated locally only in org-mode buffers;
>>> 1.2. display of the help-echo string is instantaneous.
>>>
>>> Cons:
>>> 1.1. runs code after every key-press.
>>>
>>> So your approach has more advantages.  The only problem with your code
>>> is that it displays the garbled mojibake on URLs with Unicode symbols,
>>> that need to be decoded to UTF-8 with:
>>>
>>>   (message "%s" (decode-coding-string (url-unhex-string msg) 'utf-8))
>>>
>>> Also not to step on other more important minibuffer echo-area messages,
>>> help-at-pt-maybe-display has better handling with:
>>>
>>>(or (not (current-message))
>>>(string= (current-message) "Quit"))
>>>
>>>
>>>
>>>
>>
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html





bug#42484: 26.1: org-mode should display value of links in mini-buffer

2021-01-13 Thread Samuel Wales
[my point aboutg orthogonal solution is that different mechanisms
would not be needed for mouse and cursor and different stuff to
display in the echo area.  to complete my incomplete sentence,
major/minor modes and potentially differing delays.]

On 1/13/21, Samuel Wales  wrote:
> this is an interesting discussion.  is there any side discussion that
> takes into account both mouse and cursor?  i have had a devil of a
> time trying to get:
>
> 1] displaying value of link in echo area [the problem you are
> discussing -- don't let me derail it] with a short nonzero delay
> 2] doing so *for both cursor and mouse* -- too much futzing here
> 3] also doing other stuff -- also futzing
>
> other stuff includes maybe [or maybe not] showing function signature
> or docstrings in elisp buffers [possibly with longer delay], and
> showing the time span in number of days from now to the org timestamp
> at point or under mouse in any mode.
>
> i have code for the last thing.  the problem is figuring out making
> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse and
> keyboard without verbose help-echo like in dired.  also the
> major/minor modes and
>
> i guess i am saying [back to topic] this is a bit complex and i wonder
> if a more orthogonal solution is called for?  as some might want mouse
> activation also, and eldoc already shows elisp stuff.
>
> and another suggestion: org-link-minor-mode is what i might use to
> identify when to activate org links and timestamps.
>
>
> On 1/13/21, Juri Linkov  wrote:
>>> Still, I would like to continue to promote my solution, because it's
>>> much simpler and is instantaneous upon key-press. It might also be more
>>> efficient: The help-at-pt solution runs code in all buffers, let's say
>>> every 0.1 seconds, all the time; my solution only runs in the selected
>>> mode(s) buffers but after every key-press, which for an 'average'
>>> touch-typist taking a speed test would be 0.3 seconds.
>>
>> I agree.  Overhead of needlessly running the global timer is what
>> concerns
>> me too.  But using an idle timer by help-at-pt is not that bad either.
>> It runs code only after the last key-press in a sequence of many
>> key-presses.
>> So with idle timer in help-at-pt and the default delay, code runs less
>> often
>> than by using post-command-hook.  Here are a brief comparison of
>> advantages and disadvantages of these two approaches:
>>
>> 1. help-at-pt idle timer
>>
>> Pros:
>> 1.1. runs code once a sequence of key-presses is finished,
>>  and 1 second has passed after the last key-press,
>>  where 1 second is the default value of help-at-pt-timer-delay.
>>  Customizing it to 0.1 removes this advantage because on average
>>  there is more time between key-presses than 0.1 seconds.
>>
>> Cons:
>> 1.1. With a bigger value of help-at-pt-timer-delay (by default, 1 second)
>>  that helps code to run less often (not after every key-press),
>>  the effect of the primary goal of this feature to display
>>  the help-echo string is not instantaneous;
>> 1.2. the timer runs globally in all modes (this could be mitigated
>>  by checking major mode in the timer function).
>>
>> 2. post-command-hook
>>
>> Pros:
>> 1.1. can be activated locally only in org-mode buffers;
>> 1.2. display of the help-echo string is instantaneous.
>>
>> Cons:
>> 1.1. runs code after every key-press.
>>
>> So your approach has more advantages.  The only problem with your code
>> is that it displays the garbled mojibake on URLs with Unicode symbols,
>> that need to be decoded to UTF-8 with:
>>
>>   (message "%s" (decode-coding-string (url-unhex-string msg) 'utf-8))
>>
>> Also not to step on other more important minibuffer echo-area messages,
>> help-at-pt-maybe-display has better handling with:
>>
>>(or (not (current-message))
>> (string= (current-message) "Quit"))
>>
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html





bug#42484: 26.1: org-mode should display value of links in mini-buffer

2021-01-13 Thread Samuel Wales
this is an interesting discussion.  is there any side discussion that
takes into account both mouse and cursor?  i have had a devil of a
time trying to get:

1] displaying value of link in echo area [the problem you are
discussing -- don't let me derail it] with a short nonzero delay
2] doing so *for both cursor and mouse* -- too much futzing here
3] also doing other stuff -- also futzing

other stuff includes maybe [or maybe not] showing function signature
or docstrings in elisp buffers [possibly with longer delay], and
showing the time span in number of days from now to the org timestamp
at point or under mouse in any mode.

i have code for the last thing.  the problem is figuring out making
tooltips, eldoc, help-at-pt, or post-command-hook work with mouse and
keyboard without verbose help-echo like in dired.  also the
major/minor modes and

i guess i am saying [back to topic] this is a bit complex and i wonder
if a more orthogonal solution is called for?  as some might want mouse
activation also, and eldoc already shows elisp stuff.

and another suggestion: org-link-minor-mode is what i might use to
identify when to activate org links and timestamps.


On 1/13/21, Juri Linkov  wrote:
>> Still, I would like to continue to promote my solution, because it's
>> much simpler and is instantaneous upon key-press. It might also be more
>> efficient: The help-at-pt solution runs code in all buffers, let's say
>> every 0.1 seconds, all the time; my solution only runs in the selected
>> mode(s) buffers but after every key-press, which for an 'average'
>> touch-typist taking a speed test would be 0.3 seconds.
>
> I agree.  Overhead of needlessly running the global timer is what concerns
> me too.  But using an idle timer by help-at-pt is not that bad either.
> It runs code only after the last key-press in a sequence of many
> key-presses.
> So with idle timer in help-at-pt and the default delay, code runs less
> often
> than by using post-command-hook.  Here are a brief comparison of
> advantages and disadvantages of these two approaches:
>
> 1. help-at-pt idle timer
>
> Pros:
> 1.1. runs code once a sequence of key-presses is finished,
>  and 1 second has passed after the last key-press,
>  where 1 second is the default value of help-at-pt-timer-delay.
>  Customizing it to 0.1 removes this advantage because on average
>  there is more time between key-presses than 0.1 seconds.
>
> Cons:
> 1.1. With a bigger value of help-at-pt-timer-delay (by default, 1 second)
>  that helps code to run less often (not after every key-press),
>  the effect of the primary goal of this feature to display
>  the help-echo string is not instantaneous;
> 1.2. the timer runs globally in all modes (this could be mitigated
>  by checking major mode in the timer function).
>
> 2. post-command-hook
>
> Pros:
> 1.1. can be activated locally only in org-mode buffers;
> 1.2. display of the help-echo string is instantaneous.
>
> Cons:
> 1.1. runs code after every key-press.
>
> So your approach has more advantages.  The only problem with your code
> is that it displays the garbled mojibake on URLs with Unicode symbols,
> that need to be decoded to UTF-8 with:
>
>   (message "%s" (decode-coding-string (url-unhex-string msg) 'utf-8))
>
> Also not to step on other more important minibuffer echo-area messages,
> help-at-pt-maybe-display has better handling with:
>
>(or (not (current-message))
>  (string= (current-message) "Quit"))
>
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html





Re: ol-plo.el --- Orgmode Link type for navigating Ordered Plain Lists

2021-01-12 Thread Samuel Wales
one option is to name your targets with <>.  i think, but
have not tested, that these will disappear upon export, but they might
or might not be annoying to you in the org buffer.  you can get to
them with [[my-target]] which can export to list number or so.


On 1/12/21, TRS-80  wrote:
> On 2021-01-12 15:33, Daniele Nicolodi wrote:
>> On 12/01/2021 21:21, TRS-80 wrote:
>>> Hello *,
>>>
>>> I just banged out a bit of Elisp implementing a new Orgmode link type
>>> for navigating Ordered (i.e., numbered/lettered) Plain Lists.[0]
>>
>> How do you deal with the lists being re-numbered when you edit them?
>
> Currently, just manually updating the links.
>
> I guess in my usage, I mostly keep adding on to the bottom of the Plain
> List (taking notes) so I rarely need to re-order anything.
>
> However you raise a good point, and suddenly I realize I have written an
> "80% solution."  Adding that other 20% would increase the complexity and
> amount of code by...?  For me, not worth it (for the time being).
>
> However, you are helping me to answer the question about where it should
> "live."  I now no longer[0] think it appropriate for that to be within
> Orgmode itself (and perhaps not even in contrib).  So, thanks for that.
> :)
>
> Basically, what I wrote so far is a "first pass."
>
> Cheers,
> TRS-80
>
> [0] Not that I necessarily did in the first place.  ;)
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



ox variable not set when it should be?

2021-01-10 Thread Samuel Wales
this must be user error, but i am not sure where.

i have:

(with-eval-after-load 'ox
  ;; a whole bunch of settings and defuns and stuff that
  ;; would cause compiler warnings if it were not after load ox
  (setq org-export-with-tasks nil))

and yet, when i export a subtree, the value of that variable (and the
others) are not what i set them to.  they are default.  the variable
is set in the ox library.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: advanced search for patterns [SOLVED]

2021-01-06 Thread Samuel Wales
you're welcome.

things like (setq org-agenda-search-view-always-boolean t)
(setq org-agenda-search-view-force-full-words t) in manual.

On 1/6/21, HJ  wrote:
>
>   Yes Samuel! This does work! Thank you! ( Although I haven't figured
> out yet which variable(s) you might be referring to ... )
>
>   - HJ
>
> On 1/4/21 11:38 PM, Samuel Wales wrote:
>> correction:
>>
>>*{pat1} {pat2} {pat3} -{pat4}
>>
>> should do the trick iiuc and if you have the varialbe setc.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Possibility to copy text outside EMACS and send it to orgmode document

2021-01-05 Thread Samuel Wales
there is a tricky org-protocol thing you can do with emacsclient and a
capture template, but i suspect that chrome has an extension just like
firefox does called org-capture that does some of that in the browser
itself.  in firefox-esr, i select text and click the unicorn icon.

you will have to read about capture templates to create your own to
match the one that the org-capture extension uses [a single letter].

On 1/5/21, Gerardo Moro  wrote:
> Basically that: as I copy (Control-C) text from the browser (Chrome), I
> would like those copied sentences to be sent to a ordered list in an
> OrgMode document:
>
> - copied text 1
> - copied text 2
> - etc.
>
> Any ideas? This would be very useful.
> Thanks!
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: advanced search for patterns

2021-01-04 Thread Samuel Wales
correction:

  *{pat1} {pat2} {pat3} -{pat4}

should do the trick iiuc and if you have the varialbe setc.



Re: advanced search for patterns

2021-01-04 Thread Samuel Wales
with the correct variable settings, i think you can do

  {pat1} {pat2} {pat3} -{pat4}

you can check the manual for the search settings.


On 1/4/21, hj-orgmod...@hj.proberto.com  wrote:
> hello, I have been using orgmode for a while , and noticed that I can
> find headings based on tags, but I haven't figured out whether there is
> a way to say in emacs org-mode :
>
>    find me all the (lowest-level) headings [ or heading-paths ] that
> contains text (whether formatted as source code blocks or whatever) that
> matches, say three, (regexp) patterns, e.g. :
>
>     (M|m)artha
>     ((buy|bought)[^\n]*milk(s?))
>     (pay|paid|USD)
>
>   How would one ask org-mode to find all such headings (in all opened
> org-mode buffers , preferably :) )
>
>   I guess one could try to connect the three regexps with something like
> a negative-lookahead "does not contain '\n\*'" string, like
>
>     (M|m)artha (:!\n\*){0}   ((buy|bought)[^\n]*milk(s?)) (:!\n\*){0}
> (pay|paid|USD)  |  \
>     (pay|paid|USD)  (:!\n\*){0} (M|m)artha (:!\n\*){0}
> ((buy|bought)[^\n]*milk(s?))    |  \
>     ((buy|bought)[^\n]*milk(s?))  (:!\n\*){0}   (M|m)artha (:!\n\*){0}
> (pay|paid|USD)  |  \
>     (pay|paid|USD)  (:!\n\*){0} (M|m)artha (:!\n\*){0}
> ((buy|bought)[^\n]*milk(s?))    |  \
>      ...
>
>   but that's just ugly. And would it work at all? Would it not be so
> slow to make it impractical?
>
>    Or is there a way to say "search all headings for pattern1" in all
> files, then filter the results by pattern2, then filter the results by
> pattern3 ?? How? Someone surely must have done this before ...
>
>
>     thx!!
>
>      HJ
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



following links disables sparse tree highlighting

2021-01-04 Thread Samuel Wales
when i do org-sparse-tree regexp search, keywords are highlighted and
i can use next-error.  when i then click on a link with mouse, the
highlighting disappears.  i have set org-remove-highlights-with-change
to nil.  can i do anything to make the highlights stay?



Re: accounting

2021-01-04 Thread Samuel Wales
i don't know if this is the best, but for some reason i had it so that
ledger goes into a block [used to be example or so, now is ledger],
and then post-process it with a shell source block.  perhaps this will
make more sense [in the distant past it made more sense to me].

when i process it, i call the source block, which means to run the
shell, which calls the ledger command on the data i keep in org.  for
some reason it outputs each line to the minibuffer, which is a bit
slow.  but it is not a big deal.  and i am not sure about searches.


On 1/4/21, Uwe Brauer  wrote:
 "DN" == Daniele Nicolodi  writes:
>
>> On 04/01/2021 09:54, Uwe Brauer wrote:
>>> Hi
>>>
>>>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html
>>>
>>> Points out how to use ledger within org mode.
>>>
>>> Is there any simpler solution?
>
>> As other pointed out, you are not describing what you want to
>> accomplish, thus is impossible to suggest anything concrete. However,
> I
>> would like to suggest to look at Beancount and beancount-mode as
>> alternatives to Ledger as plain text accounting tools.
>
> Thanks, it seems that beancount is not in Ubuntu, and beancount-mode is
> not available as a emacs package.
>
> Do you have any pointers?
>
> Thanks
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



org-export-with-tasks stops top level subtree export

2021-01-03 Thread Samuel Wales
org-export-with-tasks is a great setting.  i set it to nil to make
notes that will not be exported.

===
  * REF ^A poem
* NEXT fix this, or else keep it as is
* Poem
In Xanadu Kubla Khan did
In a crass Ozymandian bid
A huge dome decree
That washed out to sea
And was home to a tentacled squid
===

If

  - point is at ^
  - the variable is set to nil
  - i export the SUBTREE,

then it exports nothing.  which is not particularly useful.  i want
REF to be there.

i expected org to know i wanted to export, so it took me a long time
to figure out why it did not.  surprising.

on the other hand, i have to admit the variable does what it says.
and so would also be surprising if it did export something.

so should SUBTREE exporting pointlessly export nothing in this case,
or should it usefully export something?  for me, it should violate
consistency for just the top level.  is there some filter magic to do
that?

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2021-01-01 Thread Samuel Wales
angels fear to tread but imo the degree to which one can say /a
priori/ that a personal ui preference is "WRONG" can have limits?

org spreadsheets can have strengths and weaknesses.  whether they
matter depends on the user.  example: for me, they are:

- i use them infrequently and have to learn their syntax and commands
anew every time.  that is /just me/.  [dunno if this could be improved
such as with ergonomics/accessibility improvements and more standard
and less horizontal using interfaces.]
- for some reason, ses and excel are intuitive /for me/.  i can't give
a song and dance about why, but i can say that it is not because i
have huge experience with those.  i do not.  they just are quicker to
pick up again after years of non-use.  /for me/.
- i like elisp [this is /just me/] and unfortuately do not know r, so
elisp is great
- calc is awe inspiring even though i almost never use it.  it would
be great if it, or org, or both, had even better and
intuitive/convenient /for me/ chart producing ability.
- plain text is great [few on the org list will disagree]
- [perhaps a compromise would include a new feature in which gui
spreadsheet data or ses gets saved entirely in org blocks?  dunno.]
- i suppose i vary between needing only a little data and data size
that org is unlikely to deal with in an org table [as opposed perhaps
to an enormous block or something]

but that is merely my experience.  reference to authorities or
argumentation is unlikely to change that much.  what might help imo is
figuring out if org can accommodate different use cases, including
basic gui/ses-mode type spreadsheet learning curve.



Re: [PATCH] Apply emacs manual css to org pages

2020-12-27 Thread Samuel Wales
yes, presumably some of these topics apply to emacs style.

On 12/27/20, TEC  wrote:
>
> Hi Samuel,
>
> We could add some of our own CSS, but that would have us deviate from
> the Emacs manual. It's worth asking if we want to do that IMO.
>
> --
> Timothy
>
> Samuel Wales  writes:
>
>> i wonder if css makes it possible to have wider margins /except/ for
>> tables and stuch.  or perhaps that is consiedered bad style.  but it
>> would be accessible/functional.  but i am just glad that it is only
>> tables that need horizontal scrolling.
>>
>> On 12/27/20, Samuel Wales  wrote:
>>> if i were to make any /tiny nit-level/ suggestions from my pov it
>>> would be somewhat wider margins, not pure white but slightly [so still
>>> /very/ high contrast] warmer for fg, and some less-blue for links [but
>>> i realize blue is common].
>>>
>>> i would also do [ha ha, as if i knew what to do or even whether it is
>>> possible] wrapping for left columns that go under text rather than
>>> bullet for e.g this line: "• Extracting Agenda Information  
>>> Post-processing agenda information."  set fonts large.
>>>
>>> these are without regard for emacs manual as i have not seen that
>>> online recently.  great job.  thank you.
>>>
>>>
>>> On 12/27/20, Samuel Wales  wrote:
>>>> i like the black bg, the no issues with paragraph width.
>>>>
>>>>
>>>> On 12/22/20, TEC  wrote:
>>>>> Hi all,
>>>>>
>>>>> This is a quick patch to use the Emacs manual CSS with our generated
>>>>> Org
>>>>> manual.
>>>>>
>>>>> You can see what the single-page version of this looks like here:
>>>>> https://tecosaur.com/resources/org/doc/manual.html and the multi-page
>>>>> here: https://tecosaur.com/resources/org/doc/manual/
>>>>>
>>>>> This should be an easy upgrade to our online documentation :)
>>>>>
>>>>> --
>>>>> Timothy
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> The Kafka Pandemic
>>>>
>>>> Please learn what misopathy is.
>>>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>>>
>>>
>>>
>>> --
>>> The Kafka Pandemic
>>>
>>> Please learn what misopathy is.
>>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [PATCH] Apply emacs manual css to org pages

2020-12-27 Thread Samuel Wales
i wonder if css makes it possible to have wider margins /except/ for
tables and stuch.  or perhaps that is consiedered bad style.  but it
would be accessible/functional.  but i am just glad that it is only
tables that need horizontal scrolling.

On 12/27/20, Samuel Wales  wrote:
> if i were to make any /tiny nit-level/ suggestions from my pov it
> would be somewhat wider margins, not pure white but slightly [so still
> /very/ high contrast] warmer for fg, and some less-blue for links [but
> i realize blue is common].
>
> i would also do [ha ha, as if i knew what to do or even whether it is
> possible] wrapping for left columns that go under text rather than
> bullet for e.g this line: "• Extracting Agenda Information
>   Post-processing agenda information."  set fonts large.
>
> these are without regard for emacs manual as i have not seen that
> online recently.  great job.  thank you.
>
>
> On 12/27/20, Samuel Wales  wrote:
>> i like the black bg, the no issues with paragraph width.
>>
>>
>> On 12/22/20, TEC  wrote:
>>> Hi all,
>>>
>>> This is a quick patch to use the Emacs manual CSS with our generated Org
>>> manual.
>>>
>>> You can see what the single-page version of this looks like here:
>>> https://tecosaur.com/resources/org/doc/manual.html and the multi-page
>>> here: https://tecosaur.com/resources/org/doc/manual/
>>>
>>> This should be an easy upgrade to our online documentation :)
>>>
>>> --
>>> Timothy
>>>
>>>
>>
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [PATCH] Apply emacs manual css to org pages

2020-12-27 Thread Samuel Wales
if i were to make any /tiny nit-level/ suggestions from my pov it
would be somewhat wider margins, not pure white but slightly [so still
/very/ high contrast] warmer for fg, and some less-blue for links [but
i realize blue is common].

i would also do [ha ha, as if i knew what to do or even whether it is
possible] wrapping for left columns that go under text rather than
bullet for e.g this line: "• Extracting Agenda Information  
Post-processing agenda information."  set fonts large.

these are without regard for emacs manual as i have not seen that
online recently.  great job.  thank you.


On 12/27/20, Samuel Wales  wrote:
> i like the black bg, the no issues with paragraph width.
>
>
> On 12/22/20, TEC  wrote:
>> Hi all,
>>
>> This is a quick patch to use the Emacs manual CSS with our generated Org
>> manual.
>>
>> You can see what the single-page version of this looks like here:
>> https://tecosaur.com/resources/org/doc/manual.html and the multi-page
>> here: https://tecosaur.com/resources/org/doc/manual/
>>
>> This should be an easy upgrade to our online documentation :)
>>
>> --
>> Timothy
>>
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [PATCH] Apply emacs manual css to org pages

2020-12-27 Thread Samuel Wales
i like the black bg, the no issues with paragraph width.


On 12/22/20, TEC  wrote:
> Hi all,
>
> This is a quick patch to use the Emacs manual CSS with our generated Org
> manual.
>
> You can see what the single-page version of this looks like here:
> https://tecosaur.com/resources/org/doc/manual.html and the multi-page
> here: https://tecosaur.com/resources/org/doc/manual/
>
> This should be an easy upgrade to our online documentation :)
>
> --
> Timothy
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Yet another browser extension for capturing notes - LinkRemark

2020-12-25 Thread Samuel Wales
maxim, it is great to see new work in this area.  thanks for sharing.

russell, i use the org-capture extension for firefox, which is on the
firefox extensions site.  it is for if you want a different set of
data captured [it uses your org capture template].  it works well for
me.

[not a suggestion for maxim to integrate into everything; ignore
please.  i can imagine great things possible with such extensions. for
example, you could have sets of tabs, selected by right click in
firefox, to save to a bunch of org entries.  then you could load that
particular set of entries into firefox whenever you want.  and you
could keep notes on each page and move the entries wherever you want.
this would be useful for such things as "i am researching rice
cookers; these are my tabs, but i don't want them cluttering firefox
and i want them with my org notes and to make notes on them and will
re-load them into firefox when i want to revisit".]

[now if i can only debug the extra-blank-lines-in-capture problem.]


On 12/25/20, Russell Adams  wrote:
> On Fri, Dec 25, 2020 at 07:44:22PM +0700, Maxim Nikulin wrote:
>> I am experimenting with a browser add-on that is intended
>> to be a bridge between browser and Org mode.
>> In the family of Org mode capture helpers it is among ones
>> that adds web page metadata to the note.
>> Source code repository: https://github.com/maxnikulin/linkremark
>
> That's a really neat idea!
>
> I hadn't previously considered having a Firefox plugin to capture
> information. Now I must look!
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: overloading of internal priority calculations in agenda

2020-12-22 Thread Samuel Wales
if my opinion is worth anything [perhaps not much here :]], i like
your proposals and the idea of being able to re-sort an existing
agenda assuming that is your goal.

i don't use any priority sorting except in user-customizable but it
makes sense to decouple them for those who do.  and i frequently want
to differently sort an existing agenda view.


On 12/22/20, Adam Spiers  wrote:
> Hi again,
>
> On Wed, Dec 02, 2020 at 02:20:53PM +, Adam Spiers wrote:
>>Hi all,
>>
>>I'm currently working on adding a feature to org-agenda which allows
>>manual ordering of entries in combination with the existing automatic
>>ordering (as dictated by `org-agenda-sorting-strategy').
>>
>>During my investigations I noticed that while `org-get-priority' converts
>>[#B] style cookies into a numeric priority which is a multiple of
>>1000, further adjustments are made in functions like
>>`org-agenda-get-scheduled' before adding this numeric priority as a
>>text property on the entry:
>>
>>'priority (if habitp (org-habit-get-priority habitp)
>>(+ 99 diff (org-get-priority item)))
>>
>>In this case `diff' refers to the number of days between now and when
>>the item was scheduled.  A slightly different calculation is made in
>>`org-agenda-get-timestamps':
>>
>>(org-add-props item props
>>  'priority (if habit?
>>(org-habit-get-priority (org-habit-parse-todo))
>>  (org-get-priority item))
>>
>>I further noticed that this overloading of the internal priority by
>>including timestamp and habit data causes disruption to the behaviour
>>I imagine most users would expect from `org-agenda-sorting-strategy'.
>>For example, if you have `priority-down' as the first entry in the
>>`agenda' section and `category-keep' as the second, then differences
>>in the SCHEDULED timestamp are included in the priority calculation
>>and can therefore prevent sorting of two adjacent [#B] items by
>>category.  This seems like a bug to me, or at least breaks the
>>Principle of Least Surprise.
>
> [snipped]
>
>>Given that `org-agenda-sorting-strategy' now supports all manner of
>>sorting criteria, many of which are time-sensitive, I would like to
>>know if there is any reason not to remove this overloading of the
>>priority calculation, i.e. decoupling it to depend purely on the
>>result of `org-get-priority' and `org-habit-get-priority'?
>>
>>If fact, perhaps we could go one step further and add support for new
>>habit-priority-{up,down} sorters to `org-agenda-sorting-strategy', so
>>that the priority-{up,down} sorters sort purely by the priority cookie
>>and nothing else?
>
> Gently bumping this as I didn't get any replies yet.  I would like to
> continue working on a solution, but obviously don't want to waste time
> on something which would be rejected.
>
> If it is considered important to preserve the exact behaviour
> currently offered by `org-agenda-sorting-strategy' then I would
> propose the following:
>
> - Keep the existing priority-{up,down} which combine priority cookies
>with timestamp data and the result from `org-habit-get-priority',
>but probably also deprecate it and remove it from the default value.
>
> - Introduce new priority-cookie-{up,down} sorters which operate purely
>on [#A] and [#1] style priority cookies and nothing else.
>
> This would facilitate decoupling of the sortable criteria whilst
> remaining backwards compatible.
>
> Does this sound reasonable?  I am keen to proceed very soon (ideally
> over the Xmas break).  I have already written some new ert tests for
> `org-agenda-sorting-strategy' which would be included in any submitted
> patches.
>
> Thanks!
> Adam
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: did behaviour of RET change again?

2020-12-22 Thread Samuel Wales
in case not obvious, i am suggesting a nil value for org adapt indentation.

thus no physical indentation of all lines including planning lines.

i'd even suggest no physical indentation as default for example and
source blocks, but that is a can of worms.

On 12/22/20, Samuel Wales  wrote:
> there are just a few defaults i think are better for new users,
> despite discoverability.
>
> no indentation is one such.
>
> 1 changes org files less [better for e.g. merging]
>
> 2 requires less filling maintenance [for the body text; bastien's
> change works here]
>
> 3 requires less adjustment when plain-text changes are made
>
> 4 is parseable by third party code that has whitespace line prefixes
> in derived formats
>
>
> another default i'd change is sub-superscript, which has littered
> variable_[name as a subscript] all over the web -- even when highly
> experienced org users on this mailing list export to html.  :)
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: did behaviour of RET change again?

2020-12-22 Thread Samuel Wales
there are just a few defaults i think are better for new users,
despite discoverability.

no indentation is one such.

1 changes org files less [better for e.g. merging]

2 requires less filling maintenance [for the body text; bastien's
change works here]

3 requires less adjustment when plain-text changes are made

4 is parseable by third party code that has whitespace line prefixes
in derived formats


another default i'd change is sub-superscript, which has littered
variable_[name as a subscript] all over the web -- even when highly
experienced org users on this mailing list export to html.  :)



Re: Release Org 9.4.2

2020-12-17 Thread Samuel Wales
i just wanted to say thanks to everybody who maintains org.

somebody said a counter for donations might be useful even if nobody
collects it.  i am not able to follow this discussion closely for
health reasons, but one possibility, which you can reject if you like,
but which i mention because nobody has mentioned it yet,  is to have
that counter go to e.g. biomedical research or another good cause.
then org becomes associated with "help find a treatment for (insert
disease]"or similar.

i know from the other end [viz. biomedical research desperately
needed] that such things can be used for very good purposes very
efficiently.  the scientists eat pizza, not fancy food, and they think
hard about making their assays efficient etc.

and i know that it can be motivating to donate to such things.  to me
at least.  i could suggest a few that are likely highly relevant to
long covid and one or more of my own serious medical issues that are
not getting adequate research.  or maintainers could choose.


On 12/17/20, Greg Minshall  wrote:
> Eric,
>
>> Sure, and I do use it this way, but I had the impression that it was the
>> non-git aspects that were being put forward as being somehow helpful.  I
>> could be wrong.
>
> i'm not a git-spert.  but, the "pull requests" mechanism and "issues"
> (but reports), are maybe bits of git*.com that people like?  (i find
> them useful myself.)
>
> Greg
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: unwanted files found by what exactly?

2020-12-16 Thread Samuel Wales
perhaps the list of existing buffers can be bound, then set-difference
run on it before and after.  then kill-buffer on the ones that remain.
assuming no thread issues.

commit 37a5020bbec1887f954ea61855e17b409ee7c5d0
Author: Nicolas Goaziou 
Date:   2020-05-14 22:48:17 +0200


On 12/15/20, Samuel Wales  wrote:
> could it be 37a5020bbec1887f954ea61855e17b409ee7c5d0 that does this by
> finding instead of inserting into a temp buffer?
>
> On 12/15/20, Samuel Wales  wrote:
>> i suspect org-id-update-id-locations is finding but then failing to
>> kill the buffers.
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: unwanted files found by what exactly?

2020-12-15 Thread Samuel Wales
could it be 37a5020bbec1887f954ea61855e17b409ee7c5d0 that does this by
finding instead of inserting into a temp buffer?

On 12/15/20, Samuel Wales  wrote:
> i suspect org-id-update-id-locations is finding but then failing to
> kill the buffers.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: unwanted files found by what exactly?

2020-12-15 Thread Samuel Wales
i suspect org-id-update-id-locations is finding but then failing to
kill the buffers.



unwanted files found by what exactly?

2020-12-15 Thread Samuel Wales
recent-ish org maint.

i frequently get all my .org_archive files and whatever.org files in
emacs as buffers, without my calling find-file.

i thought perhaps this was agenda, so

(defun alpha-org-kill-agenda-loaded-buffers ()
  (interactive)
  (org-release-buffers org-agenda-new-buffers)
  (setq org-agenda-new-buffers nil))

but that doesn't seem to always work.

so, is org-id loading buffers when it searches for an id target, or
something like that?

regardless of source, is there a timer i can set to delete all these things?

if it is the agenda i don't mind the occasional miss if i try to go to
a killed buffer.  whatever agenda habits i have aren't likly to change
and i'd rather not have the buffers not stick around.

if it is org-id or something else, could they all be killed once the
target has been found?

thanks.



Re: [org-save-all-org-buffers] Saving is not reliable?

2020-12-12 Thread Samuel Wales
an undo-boundary bug can make something unexpected get undone as part
of a batch or make an org operation require two undos.  the agenda is
one place where these bugs have existed.


On 12/9/20, Eric S Fraga  wrote:
> On Wednesday,  9 Dec 2020 at 11:16, Mikhail Skorzhisnkii wrote:
>> It's kind of reproduction scenario. Basically I need to
>> modify buffer from search-type agenda.
>
> In the past, anecdotally I have seen something similar: adjust the
> scheduled date for an entry via the agenda view and ask to save all org
> buffers.  The change to the scheduled date is sometimes forgotten.  I
> haven't tried with emacs -Q so it could, as in Mikhail's case, be
> configuration dependent and it's also not entirely reproducible (i.e. it
> sometimes happens, sometimes doesn't).
>
> But I've not seen this happen recently so maybe it was a bug along the
> way.  Sorry for vagueness but I thought I'd chime in just in case it
> helps.
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4-160-g7c8dce
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [PATCH] org-agenda.el: Add a M-, binding for org-priority-show

2020-12-11 Thread Samuel Wales
off topic, but as a separate change, perhaps the 2 things named
priority could have separate names?

On 12/8/20, Kyle Meyer  wrote:
> [ Sorry, all, for the recent string of duplicate messages from me :x ]
>
> Adam Spiers writes:
>
>> This offers an easy way to check the internal numeric priority
>> used for sorting within the agenda.
>
> Thanks for the patch.  Please include a changelog entry in your commit
> message.
>
>> ---
>>  doc/org-manual.org | 8 
>>  lisp/org-agenda.el | 1 +
>>  2 files changed, 9 insertions(+)
>>
>> diff --git a/doc/org-manual.org b/doc/org-manual.org
>> index 5a84a6de6..e914af42d 100644
>> --- a/doc/org-manual.org
>> +++ b/doc/org-manual.org
>> @@ -9891,6 +9891,14 @@ the other commands, point needs to be in the
>> desired line.
>>Set tags for the current headline.  If there is an active region in
>>the agenda, change a tag for all headings in the region.
>>
>> +- {{{kbd(M-\,)}}} (~org-priority-show~) ::
>> +
>> +  #+kindex: M-,
>> +  #+findex: org-priority-show
>> +  Show the numeric priority for the current item.  This priority is
>> +  composed of the main priority given with the =[#A]= cookies, and by
>> +  additional input from the age of a schedules or deadline entry.
>> +
>>  - {{{kbd(\,)}}} (~org-agenda-priority~) ::
>
> With a C-u, org-agenda-priority calls org-priority-show.  So perhaps
> instead of adding a new binding, the documentation should be improved.
> What do you think?
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: stability of toc links

2020-12-09 Thread Samuel Wales
just so everybody is on the same page, i think carsten is talking
about tec's code that generates html id's that are then used in urls?

imo great idea.


On 12/9/20, Carsten Dominik  wrote:
> I think we should merge this code into Org.
>
> Kind regards
>
> Carsten
>
> On Wed, Dec 9, 2020 at 3:54 AM TEC  wrote:
>
>>
>> Hi Sam, link stability is a concern I've had too. I currently have a fix
>> (or at the very least, an improvement) for this in my config where I
>> overwrite org-export-get-reference. (see:
>> https://tecosaur.github.io/emacs-config/config.html#nicer-generated-heading
>> ).
>>
>> I raised this on the list a while ago ---
>> https://orgmode.org/list/e1jxajq-0004dk...@lists.gnu.org/ but there
>> didn't seem to be much interest.
>>
>> All the best,
>> Timothy
>>
>> Samuel Wales  writes:
>>
>> > when you link to a section using toc, you get a link like
>> >
>> >
>> https://thekafkapandemic.blogspot.com/2020/02/crimes-against-humanity_3.html#org080f0ab
>> >
>> > will these links break if somebody copies them and pastes them
>> > elsewhere?  what if you add a section?
>> >
>> > there doesn't seem to be a perfect solution, short of adding custom id
>> > or id to everything, but perhaps a fuzzy hash of the header and
>> > contents of the section could be used?  or a strict hash of the
>> > header?  is anything like this being done?  just curious.
>>
>>
>>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: stability of toc links

2020-12-08 Thread Samuel Wales
just thought of a better, still bad, solution.

you could use the header text itself.

then if the link breaks, the user can at least go to the document and
manually look for somethnign similar.

On 12/8/20, Samuel Wales  wrote:
> when you link to a section using toc, you get a link like
>
>
> https://thekafkapandemic.blogspot.com/2020/02/crimes-against-humanity_3.html#org080f0ab
>
> will these links break if somebody copies them and pastes them
> elsewhere?  what if you add a section?
>
> there doesn't seem to be a perfect solution, short of adding custom id
> or id to everything, but perhaps a fuzzy hash of the header and
> contents of the section could be used?  or a strict hash of the
> header?  is anything like this being done?  just curious.
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



stability of toc links

2020-12-08 Thread Samuel Wales
when you link to a section using toc, you get a link like

  
https://thekafkapandemic.blogspot.com/2020/02/crimes-against-humanity_3.html#org080f0ab

will these links break if somebody copies them and pastes them
elsewhere?  what if you add a section?

there doesn't seem to be a perfect solution, short of adding custom id
or id to everything, but perhaps a fuzzy hash of the header and
contents of the section could be used?  or a strict hash of the
header?  is anything like this being done?  just curious.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



bulk archive slow

2020-11-22 Thread Samuel Wales
in recent maint, bulk archive is slow for me.  not a huge deal but
org-element--current-element takes up 92 percent of cpu time in
profiler.  6 entries took a few minutes.  this is just a heads up in
case anybody can confirm.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: export select tag behavior and documentation

2020-10-31 Thread Samuel Wales
huh, in exporting the email, i found a possible export bug.

here is the original.  please reply to this one.

notice that a whole paragraph got deleted in the previous email.  that
is the exported version.  dunno why.


9.4 maint docstring

===
org-export-select-tags is a variable defined in ‘ox.el’.

...

If any such tag is found in a buffer, all trees that do not carry
one of these tags will be ignored during export.
===

1) does this take into account subtree export, region
   export, and narrowed buffers?  if so, perhaps the
   docstring should change.

   my expectation is that just having :export: in a huge
   buffer should not affect exporting a tiny part of it.
   by the principle of least surprise.

   it is sorta surprising enough that something buried in a
   subtree can affect the whole export of that subtree.  :)

2) org-export-with-tasks set to

   - nil will not export a task subtree regardless of :export: tag underneath
   - t will export regardless

   thus basically overriding the export tag feature with the
   export with tasks feature.  is that intended?  i can see
   that it could be the best choice, but could also see it
   being useful to use the export tag even with tasks.

   i wonder when was the last time there was a change to
   this variable or its behavior?  i suspect there might
   have been a change, at least wrt top level todo kw
   stopping export, but i don't know.


On 10/31/20, Samuel Wales  wrote:
> [2020-10-31 Sat 20:59]  =x
>
> bug
> ===
>
>   9.4 maint docstring
>
>   === org-export-select-tags is a variable defined in
>   ‘ox.el’.
>
>   ...
>
>
> 1) does this take into account subtree export, region
>export, and narrowed buffers?  if so, perhaps the
>docstring should change.
>
>my expectation is that just having :export: in a huge
>buffer should not affect exporting a tiny part of it.
>by the principle of least surprise.
>
>it is sorta surprising enough that something buried
>in a subtree can affect the whole export of that
>subtree.  :)
>
> 2) org-export-with-tasks set to
>
>- nil will not export a task subtree regardless of
>  :export: tag underneath
>- t will export regardless
>
>thus basically overriding the export tag feature with
>the export with tasks feature.  is that intended?  i
>can see that it could be the best choice, but could
>also see it being useful to use the export tag even
>with tasks.
>
>i wonder when was the last time there was a change to
>this variable or its behavior?  i suspect there might
>have been a change, at least wrt top level todo kw
>stopping export, but i don't know.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



export select tag behavior and documentation

2020-10-31 Thread Samuel Wales
[2020-10-31 Sat 20:59]  =x

bug
===

  9.4 maint docstring

  === org-export-select-tags is a variable defined in
  ‘ox.el’.

  ...


1) does this take into account subtree export, region
   export, and narrowed buffers?  if so, perhaps the
   docstring should change.

   my expectation is that just having :export: in a huge
   buffer should not affect exporting a tiny part of it.
   by the principle of least surprise.

   it is sorta surprising enough that something buried
   in a subtree can affect the whole export of that
   subtree.  :)

2) org-export-with-tasks set to

   - nil will not export a task subtree regardless of
 :export: tag underneath
   - t will export regardless

   thus basically overriding the export tag feature with
   the export with tasks feature.  is that intended?  i
   can see that it could be the best choice, but could
   also see it being useful to use the export tag even
   with tasks.

   i wonder when was the last time there was a change to
   this variable or its behavior?  i suspect there might
   have been a change, at least wrt top level todo kw
   stopping export, but i don't know.



Re: org-sort-entries sorting by top-level with first entry at bob

2020-10-30 Thread Samuel Wales
yes, you understood my points.  if you already understood them and
they are not useful to you, then please disregard them.


On 10/30/20, Gustavo Barros  wrote:
> Hi Samuel,
>
> On Fri, 30 Oct 2020 at 17:43, Samuel Wales  wrote:
>
>> i always have everyting under a top level, so taht files are trees not
>> forests and org can work treeishly even at toplevel.
>
> This would be a workaround, not a solution.  Is it a formal requirement
> of Org that files must be kept in this form?
>
>> but to not use
>> the mark, typically you supply point-min and point-max to some
>> function.
>
> `org-sort-entries' does not take beg/end as arguments, it uses the
> active region, as reported.
>
> Regards,
> Gustavo.
>
>
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: org-sort-entries sorting by top-level with first entry at bob

2020-10-30 Thread Samuel Wales
i always have everyting under a top level, so taht files are trees not
forests and org can work treeishly even at toplevel.  but to not use
the mark, typically you supply point-min and point-max to some
function.  major changes to o-s-r migth not be needed, merely that.


On 10/30/20, Gustavo Barros  wrote:
> Hi All,
>
> `org-sort-entries' provides no easy way to sort by top-level when the
> first entry is at the beginning of buffer.  This is true for both
> interactive and non-interactive uses of the function, but a little more
> inconvenient in the latter case.
>
> Indeed, `org-sort-entries', when deciding what to sort, first tests for
> `org-region-active-p', then `org-at-heading-p' (or if after a heading),
> failing those tests, it falls back to top-level sorting.  However, if
> the first heading is at the beginning of buffer and we want to sort by
> top-level, we'll never get to the fall back case, because
> `org-at-heading-p' will return non-nil, and the children of the first
> entry will be sorted instead.
>
> Not an ECM, just an use case with the situation at hand.  Consider a
> buffer with contents:
>
> #+begin_src org
> ,* B Foo
> ,** B Baz
> ,** A Foo
> ,* A Bar
> #+end_src
>
> How to sort by top-level?
>
> The currently existing alternative is to `mark-whole-buffer', and let
> `org-sort-entries' sort by region.  While this is reasonable in the
> interactive case, it is less so if `org-sort-entries' is being called in
> code.  Using `mark-whole-buffer' in your code will grant you a nice
> compiler warning and pretending you don't use it by doing the same thing
> yourself is explicitly advised against in its docstring: "it is usually
> a mistake for a Lisp function to use any subroutine that uses or sets
> the mark".  Behind the scenes, Org is using `use-region-p', which means
> the region must not only exist but transient-mark-mode must be on and
> the mark must be active.  It can be made to work, of course, but it is
> clearly less than ideal.  Either way, currently the only way to ensure
> that sorting is done by top-level when you don't know whether there is
> something before the first heading (including possible narrowing) is to
> rely on the region case.
>
> What to do with it is somewhat tricky, though.  My first thought was to
> test if we are actually looking at a heading regexp, and sort on the
> heading's level in this case.  But, on second thought, I believe this is
> not a good idea, because it will conflict with current and expected
> behavior for speed-keys, in particular.  Perhaps test if point is at
> beginning of buffer, and handle this case specially?
>
>
> Best regards,
> Gustavo.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: bugs in the new release of org

2020-10-13 Thread Samuel Wales
a little more information in case it is useful:

in emacs25 -Q with recent maint, this code fails to export; it errors
if there is an org-id link anywhere in the tree.

  (org-export-as 'html 'subtree nil 'body-only nil)

the same bug arises with ascii export.

it seems like a bug that a link should make the export fail.  the link
is to another file not being exported.  note also that this is a
subtree export with body only.

[btw, the docstring says "When optional argument BODY-ONLY is non-nil,
only return body
code, without surrounding template."  it does not way what template
means.  perhaps the docstring could say?]


with my regular .emacs instead of -Q, it does not error but returns an
empty string.  this made debugging confusing.


it scrolls the buffer slightly for unknown reasons.  this could
perhaps be called a minor bug.

random testcase.  you can run using m-: on the top line.

===
* NAKA cables :export:
*** NAKA hdmi :export:
text
* NOTE buy from a company who makes the connectors ---
[[https://www.stereo.net.au/forums/topic/251889-hdmi-shielding/][HDMI
shielding? - General AV Discussion - StereoNET]]
* test no body :export:
* test body :export:
text
* noexport monoprice if nothing else but i must have rejected it.
ferrite core.
text
* 
[[http://www.alphawire.com/en/Company/Blog/2014/July/Outgassing%2520and%2520Cables][Outgassing
and Cables]] A very handy resource is the NASA Outgassing Database
:export:
text
http://outgassing.nasa.gov/cgi/uncgi/search/search_html.sh.
===


On 10/2/20, Samuel Wales  wrote:
> a couple of corrections to my previous post.
>
> the keystrokes are C-c C-e t A after setting subtree and body only.
>
> pointer actually works for showing the link.  just not cursor.
>
> On 10/2/20, Samuel Wales  wrote:
>> a few things are broken for me in the new version of maint.  my
>> computer use is limited, so i am taking them slowly..
>>
>> emacs 25.
>>
>> any hints are welcome.  i am not able to proceed further.
>>
>>
>> 1.
>>
>> this export does nothing, with no errors or warnings:
>>
>>   (org-export-to-buffer 'ascii "alpha-org-export-output.txt" nil
>> 'subtree nil 'body-only)
>>
>> prior to the recent release, it exported.
>>
>> i tried emacs -Q with C-c C-e A, this said that it was unable to
>> resolve a link.  however, the link was outside the subtree.  i do not
>> know why it would look there.  also i do not know why it woul dtry to
>> resolve a link.  or rather i don't know what that means.
>>
>> the link seems ok.  it is an org id link.  so why is it erroring?  i
>> don't know.  does this have anything to do with the errorless
>> no-result problem i am trying to debug?  i could not be sure.
>>
>> i also tried edebug, but that quickly exceeds my limits.  i did
>> unwisely do a few levels, but everything returned nothing.  for
>> example, the export-as function returned an empty string.
>>
>>
>> any comments or hints, even small ones, would be appreciated.  i am
>> not able to debug this.
>>
>>
>> 2.
>>
>> another broken thing, in case it rings a bell for anybody, is that i
>> had eldoc set up to emit link target when hovering cursor/pointer.  i
>> think this uses
>> help echo.  that stopped working.  if this does not trigger a priori
>> ideas, i will let it stay broken.
>>
>>
>> thank you.
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: yank in middle of text a headline

2020-10-08 Thread Samuel Wales
thanks for trying it.  i am using 9.4.  perhaps one of my settings has
a different interpretation from 9.3?  if that's not hte issue then


On 10/4/20, Ihor Radchenko  wrote:
>> if i copy x and yank it where | is, it yanks immediately above y.  i
>> prefer that it yanks at |.  is this possible?
>
> I cannot reproduce it on my side. What is the org-mode version you are
> using?
>
> Best,
> Ihor
>
> Samuel Wales  writes:
>
>> ===
>> * x
>> hi
>> |
>> there
>> * y
>> ===
>>
>> if i copy x and yank it where | is, it yanks immediately above y.  i
>> prefer that it yanks at |.  is this possible?
>>
>> is this new behavior?
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Bug: [PATCH] org-agenda: "Invalid face reference: t" errors [9.4 (release_9.4-49-g4b150d @ /home/n/.emacs.d/straight/build/org/)]

2020-10-06 Thread Samuel Wales
i can confirm these errors in maint [didn't confirm the patch or
workaround].  thanks for debugging what i could not.


On 10/5/20, No Wayman  wrote:
>
> I noticed recently that my message buffer was getting clobbered
> with thousands of Invalid face reference errors when moving point
> around an org-agenda buffer. e.g.:
>
>> Invalid face reference: t [4519 times]
>
> Git bisect points to commit
> 7a12e149907b5921011710d869b7554c35859c89
>
>> org.el (org-display-outline-path): Fix faces of the message
>>
>> * lisp/org.el (org-display-outline-path): Set :height as the
>> default face height, and don't change other face attributes.
>>
>> See a3576543f for a previous fix, and this discussion:
>> 
>
> As a workaround, setting `org-agenda-show-outline-path' to nil
> prevents the errors.
> I believe the face spec in the call to `add-face-text-property' in
> `org-display-outline-path' is incorrect.
> The attached patch replaces it with an anonymous face, which works
> on my end.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Bug: (bug?) org-id-find-id-in-file doesn't close files after finding id [9.4 (9.4-7-g3eccc5-elpaplus @ ~/spacemacs/elpa/develop/org-plus-contrib-20200921/)]

2020-10-06 Thread Samuel Wales
thank you to both of you from me too.

i have noticed that the same problem occurs for me with refile targets
alist.  putting a file there seems to open the buffer for some reason
and not close it even if it had not been closed.  this might require a
refile or an id lookup or so.

however, it does not require doing anything with that file.

i frequently get org archive files sticking around.  i am guessing
this is due to id lookup.


On 10/6/20, Nicolas Goaziou  wrote:
> Hello,
>
> this nkk  writes:
>
>> when running org-id-find-id-in-file on an id and an unvisited file, the
>> buffer it creates to visit file isn't
>> closed after finding id.
>>
>> ** what should have happened
>> I was expecting it to close the buffer if the
>> file wasn't already visited by another buffer.
>>
>> Is this desired behavior?
>
> It depends. If MARKERP is non-nil, you certainly don't want to close the
> newly created buffer. Otherwise, it could be closed, indeed.
>
> I patched master along these lines. Thank you.
>
> Regards,
> --
> Nicolas Goaziou
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



yank in middle of text a headline

2020-10-03 Thread Samuel Wales
===
* x
hi
|
there
* y
===

if i copy x and yank it where | is, it yanks immediately above y.  i
prefer that it yanks at |.  is this possible?

is this new behavior?



Re: bugs in the new release of org

2020-10-02 Thread Samuel Wales
a couple of corrections to my previous post.

the keystrokes are C-c C-e t A after setting subtree and body only.

pointer actually works for showing the link.  just not cursor.

On 10/2/20, Samuel Wales  wrote:
> a few things are broken for me in the new version of maint.  my
> computer use is limited, so i am taking them slowly..
>
> emacs 25.
>
> any hints are welcome.  i am not able to proceed further.
>
>
> 1.
>
> this export does nothing, with no errors or warnings:
>
>   (org-export-to-buffer 'ascii "alpha-org-export-output.txt" nil
> 'subtree nil 'body-only)
>
> prior to the recent release, it exported.
>
> i tried emacs -Q with C-c C-e A, this said that it was unable to
> resolve a link.  however, the link was outside the subtree.  i do not
> know why it would look there.  also i do not know why it woul dtry to
> resolve a link.  or rather i don't know what that means.
>
> the link seems ok.  it is an org id link.  so why is it erroring?  i
> don't know.  does this have anything to do with the errorless
> no-result problem i am trying to debug?  i could not be sure.
>
> i also tried edebug, but that quickly exceeds my limits.  i did
> unwisely do a few levels, but everything returned nothing.  for
> example, the export-as function returned an empty string.
>
>
> any comments or hints, even small ones, would be appreciated.  i am
> not able to debug this.
>
>
> 2.
>
> another broken thing, in case it rings a bell for anybody, is that i
> had eldoc set up to emit link target when hovering cursor/pointer.  i
> think this uses
> help echo.  that stopped working.  if this does not trigger a priori
> ideas, i will let it stay broken.
>
>
> thank you.
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



bugs in the new release of org

2020-10-02 Thread Samuel Wales
a few things are broken for me in the new version of maint.  my
computer use is limited, so i am taking them slowly..

emacs 25.

any hints are welcome.  i am not able to proceed further.


1.

this export does nothing, with no errors or warnings:

  (org-export-to-buffer 'ascii "alpha-org-export-output.txt" nil
'subtree nil 'body-only)

prior to the recent release, it exported.

i tried emacs -Q with C-c C-e A, this said that it was unable to
resolve a link.  however, the link was outside the subtree.  i do not
know why it would look there.  also i do not know why it woul dtry to
resolve a link.  or rather i don't know what that means.

the link seems ok.  it is an org id link.  so why is it erroring?  i
don't know.  does this have anything to do with the errorless
no-result problem i am trying to debug?  i could not be sure.

i also tried edebug, but that quickly exceeds my limits.  i did
unwisely do a few levels, but everything returned nothing.  for
example, the export-as function returned an empty string.


any comments or hints, even small ones, would be appreciated.  i am
not able to debug this.


2.

another broken thing, in case it rings a bell for anybody, is that i
had eldoc set up to emit link target when hovering cursor/pointer.  i
think this uses
help echo.  that stopped working.  if this does not trigger a priori
ideas, i will let it stay broken.


thank you.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Reciprocal links between items

2020-10-01 Thread Samuel Wales
Hi Victor,

Currently Org-ID can only be placed on entries.  This uses the
properties drawer.  When we are talking about entries, what I do is,
use Org-ID links to entries to go in one direction, and an agenda
search to go in the opposite direction as follows.


(define-key org-mode-map (kbd "C-c w") 'alpha-org-what-links-here)
(defun alpha-org-what-links-here ()
  "Show all links that point to the current node.
Possibly also show the target node itself.

I think this gets all archive files in $dorg, including ones with
no corresponding .org file.  See `alpha-org-all-org-files'.

  - fixme produce error if no id or fix non-id search
  - fixme Bug in Org: g in agenda removes entries =maybe fixed
  - fixme org text search does not work in non-org-mode files or
in org files text above the outline tree ka
- we might want to search in del and dsh also via grep

This makes Org ID links quasi-bidirectional.
"
  (interactive)
  (let ((org-agenda-files (alpha-org-all-org-files))

org-agenda-skip-comment-trees
org-agenda-skip-archived-trees

(search-string (or
;; inherits id from ancestors
;; raw id so it will pick up target
(alpha-awhen (org-entry-get nil "ID" t)
  (regexp-quote it))
(concat "{\\("
;; tries searching a link to id
;; not sure if useful
(regexp-quote (org-store-link nil))
"\\|\\<"
;; not sure if useful
(regexp-quote (org-get-heading))
"\\>\\)}"
(org-search-view nil search-string)))


When you say item, do you mean list item, or thing?  In either case,
Org cannot currently do this.

To do that, you can search the mailing list for ID markers and
implement them, which pretty much do what you want, or try
implementing something with the new link mechanism to include Org-ID.
This would allow them as link targets.

I think Org-ID is likely to be part of your mix, regardless of what
you do to implement this, if you do.

One concern I have is that Org-ID is already slow in searching.
Making it search for anything of a lower syntactic status than entries
might or might not make it slower.  Perhaps it would be necessary to
tell the search engine what it is looking for.


On 10/1/20, Victor A. Stoichita  wrote:
>
> Le 01 Oct 2020, Alan Schmitt 
> a écrit :
>> You might want to have a look at org-roam, that implements such
>> backlinks.
>
> Thanks Alan! That’s interesting!
>
> I watched the introductory video and started reading the org-roam
> docs. They begin with the rationale of Zettelkasten note taking,
> which implies one org file per note, and an sqlite database…
> I think that org-roam can be a great tool, but it takes too big
> a change for what I need (basically just the ability to insert
> backlinks).
>
> I guess that if I want something simple which avoids using an
> external database, I could write a function that inserts and
> deletes the links in both items. Maybe a good way to train my
> lisp-foo.
>
> Kind regards,
> Victor
>
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: opening a 0.5 MB org file is slow

2020-09-29 Thread Samuel Wales
a long time ago i discovered that drawers were the bottleneck.  i
removed a lot of them and got much faster loading speeds.  idk if that
is still true.

i think there is an effort to speed logbook and properties up by
changing from overlays to text properties or so.

recent maint is perhaps twice as fast at loading for me as the
previous release was.


On 9/29/20, Ihor Radchenko  wrote:
>> I'm afraid I don't know how to profile the opening of a file. Does
>> anybody know a function that would do the profiling like
>> elp-instrument-function for functions?
>
> There is elp-instrument-package. Also, I did successful profiling with
> simple profiler-start/profiler-report before and after opening the file.
>
> In general, time for opening org files depends on many factors [1].
> Profiling is the way to go if one wants to find the bottlenecks.
>
>
> [1]
> https://www.reddit.com/r/orgmode/comments/ivifjv/a_question_about_orgagenda_performance_and_org/g5rxzf6/
>
> Best,
> Ihor
>
>
>
> Jeremie Juste  writes:
>
>> Hello Uwe,
>>
>> Can you test with emacs -Q ?
>>
>> A 1.6M org file took a little under 7 sec on my computer.
>> It probably depends on the number of minor modes are being loaded,
>> font-lock,
>> auto-completion, etc.
>>
>> I'm afraid I don't know how to profile the opening of a file. Does
>> anybody know a function that would do the profiling like
>> elp-instrument-function for functions?
>>
>> --
>> HTH
>> Jeremie Juste
>>
>>
>>
>> On Tuesday, 29 Sep 2020 at 21:11, Uwe Brauer wrote:
>>> Hi
>>>
>>> maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
>>> 0.5MB org file takes around 15 sec.
>>>
>>> Any change to speed this up?
>>>
>>> Thanks and regards
>>>
>>> Uwe Brauer
>>>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-27 Thread Samuel Wales
well, fwiw, i am still getting empty lines for capture buffers with a
final newline and empty capture buffers.  idk if htat helps by
iutself.  recent maint [new org version] emacs 25.

On 9/27/20, Samuel Wales  wrote:
> ... but i want to know what is expected.  it sopunds like org is
> intended to produce the desired result regardless.  so i will messa
> aroud more with my settings.
>
> i am limited in comput3er use so it might take a while for me to
> produce anything liek an mwe.  but i will check a few things.
>
> On 9/27/20, Samuel Wales  wrote:
>> hi nicolas,
>>
>> thanks, that helps to know that org adds a newline.  this prevents the
>> failure mode of corrupted headers.
>>
>> just to confirm, do you mean capture /templates/ [potentially
>> verifiable by org] vs. /finalized buffers/?
>>
>> it sounds like you mean templates, because otherwise org just does
>> whatever is necessary to create desired lines?
>>
>> the user can mess with the buffer, so might leave a trailing newline
>> or not.  might copy from a file that ensures trailing newline, or one
>> that does not, etc.
>>
>> thus finalized buffers can contain anything.  or nothing.
>>
>> at present, possibly due to my own errors, without the options
>> specified explicitly, i get blank lines below the header if i finalize
>> the buffer with a trailing newline, and blank lines below the target
>> header if i capture with an empty buffer.  in maint.
>>
>>
>> On 9/27/20, Nicolas Goaziou  wrote:
>>> Hello,
>>>
>>> Samuel Wales  writes:
>>>
>>>> thank you.  when i can, i will try explicitly setting all three to 0
>>>> to see if that prevents the unwanted newlines, in the buffer with
>>>> newline on last line, and empty buffer, cases.
>>>>
>>>> the docstring says empty-lines defaults to 0, which is what i want.
>>>> it does not say what the default for after and before are.
>>>>
>>>> it /sounds/ like capture is supposed to produce the desired number
>>>> [and position] of empty lines regardless of whether the buffer is
>>>> empty or there is or is not a trailing newline on the final line of
>>>> hte buffer.  is this more or less correct?
>>>
>>> I didn't read the whole thread, but a final newline is mandatory in all
>>> capture templates, independently on the number of desired blank lines.
>>> If such final newline is not provided, the capture mechanism will add
>>> one.
>>>
>>> The only exception is about empty capture templates, which are left
>>> as-is, i.e. a "final newline" is not added in that case.
>>>
>>> I don't know if that answers your question, but HTH.
>>>
>>> Regards,
>>> --
>>> Nicolas Goaziou
>>>
>>
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



org file loading speed possibly improved in maint

2020-09-27 Thread Samuel Wales
my .emacs loads org files.  went from maybe 7s to 3-4s.  this might be
due to the new maint version.  if this is so, thank you all!  my
longstanding 2-day agenda speed by the benchmark function is the same,
so i think it is loading speed.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-27 Thread Samuel Wales
... but i want to know what is expected.  it sopunds like org is
intended to produce the desired result regardless.  so i will messa
aroud more with my settings.

i am limited in comput3er use so it might take a while for me to
produce anything liek an mwe.  but i will check a few things.

On 9/27/20, Samuel Wales  wrote:
> hi nicolas,
>
> thanks, that helps to know that org adds a newline.  this prevents the
> failure mode of corrupted headers.
>
> just to confirm, do you mean capture /templates/ [potentially
> verifiable by org] vs. /finalized buffers/?
>
> it sounds like you mean templates, because otherwise org just does
> whatever is necessary to create desired lines?
>
> the user can mess with the buffer, so might leave a trailing newline
> or not.  might copy from a file that ensures trailing newline, or one
> that does not, etc.
>
> thus finalized buffers can contain anything.  or nothing.
>
> at present, possibly due to my own errors, without the options
> specified explicitly, i get blank lines below the header if i finalize
> the buffer with a trailing newline, and blank lines below the target
> header if i capture with an empty buffer.  in maint.
>
>
> On 9/27/20, Nicolas Goaziou  wrote:
>> Hello,
>>
>> Samuel Wales  writes:
>>
>>> thank you.  when i can, i will try explicitly setting all three to 0
>>> to see if that prevents the unwanted newlines, in the buffer with
>>> newline on last line, and empty buffer, cases.
>>>
>>> the docstring says empty-lines defaults to 0, which is what i want.
>>> it does not say what the default for after and before are.
>>>
>>> it /sounds/ like capture is supposed to produce the desired number
>>> [and position] of empty lines regardless of whether the buffer is
>>> empty or there is or is not a trailing newline on the final line of
>>> hte buffer.  is this more or less correct?
>>
>> I didn't read the whole thread, but a final newline is mandatory in all
>> capture templates, independently on the number of desired blank lines.
>> If such final newline is not provided, the capture mechanism will add
>> one.
>>
>> The only exception is about empty capture templates, which are left
>> as-is, i.e. a "final newline" is not added in that case.
>>
>> I don't know if that answers your question, but HTH.
>>
>> Regards,
>> --
>> Nicolas Goaziou
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-27 Thread Samuel Wales
hi nicolas,

thanks, that helps to know that org adds a newline.  this prevents the
failure mode of corrupted headers.

just to confirm, do you mean capture /templates/ [potentially
verifiable by org] vs. /finalized buffers/?

it sounds like you mean templates, because otherwise org just does
whatever is necessary to create desired lines?

the user can mess with the buffer, so might leave a trailing newline
or not.  might copy from a file that ensures trailing newline, or one
that does not, etc.

thus finalized buffers can contain anything.  or nothing.

at present, possibly due to my own errors, without the options
specified explicitly, i get blank lines below the header if i finalize
the buffer with a trailing newline, and blank lines below the target
header if i capture with an empty buffer.  in maint.


On 9/27/20, Nicolas Goaziou  wrote:
> Hello,
>
> Samuel Wales  writes:
>
>> thank you.  when i can, i will try explicitly setting all three to 0
>> to see if that prevents the unwanted newlines, in the buffer with
>> newline on last line, and empty buffer, cases.
>>
>> the docstring says empty-lines defaults to 0, which is what i want.
>> it does not say what the default for after and before are.
>>
>> it /sounds/ like capture is supposed to produce the desired number
>> [and position] of empty lines regardless of whether the buffer is
>> empty or there is or is not a trailing newline on the final line of
>> hte buffer.  is this more or less correct?
>
> I didn't read the whole thread, but a final newline is mandatory in all
> capture templates, independently on the number of desired blank lines.
> If such final newline is not provided, the capture mechanism will add
> one.
>
> The only exception is about empty capture templates, which are left
> as-is, i.e. a "final newline" is not added in that case.
>
> I don't know if that answers your question, but HTH.
>
> Regards,
> --
> Nicolas Goaziou
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-27 Thread Samuel Wales
hi richard,

thank you.  when i can, i will try explicitly setting all three to 0
to see if that prevents the unwanted newlines, in the buffer with
newline on last line, and empty buffer, cases.

the docstring says empty-lines defaults to 0, which is what i want.
it does not say what the default for after and before are.

it /sounds/ like capture is supposed to produce the desired number
[and position] of empty lines regardless of whether the buffer is
empty or there is or is not a trailing newline on the final line of
hte buffer.  is this more or less correct?


On 9/27/20, Richard Lawrence  wrote:
> Hi Samuel,
>
>> On 9/23/20, Samuel Wales  wrote:
>>> i have the same question for headline-only capture
>>> buffers.  i.e. what is the expected result with and without trailing
>>> newline.
>
> Just to clarify: are you aware of the :empty-lines, :empty-lines-before
> and :empty-lines-after keys that you can set in org-capture-templates?
> Are your questions about the default values of these keys?
>
> I just tried a simple setup in emacs -Q with Org 9.4, namely:
>
> (setq org-capture-templates
>   '(("s" "simple" entry (file+headline "~/org/notes.org" "Foo")
>   "* %?" :empty-lines 1)))
>
> and Org seems to correctly respect the value of these keys when they are
> specified explicitly. That is, with :empty-lines 0, no newlines are
> added; with :empty-lines 1, a blank line appears on each side of the
> captured entry; with :empty-lines-after 1, a blank line appears after,
> but not before, the new entry; and so on.
>
> Can you use these keys to get the behavior you are looking for? Or is
> your question about something else?
>
> --
> Best,
> Richard
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-26 Thread Samuel Wales
hi bastien,

another example is, whenever i capture a headline like "* test\n" and
finalize, it creates a blank line after the headline.

is it expected that users should remove the final newline in the
capture buffer, in a finalize hook, to prevent this?

it would heolp me figure out whether it is pebcak, expected, or a bug
if i know what is the expected result, and whether users are expected
to capture only capture buffers that do not have final newlines.  [bug
on empty buffer still exists.]

On 9/23/20, Samuel Wales  wrote:
> i have the same question for headline-only capture
> buffers.  i.e. what is the expected result with and without trailing
> newline.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



preserving marks upon org-agenda-redo-all

2020-09-25 Thread Samuel Wales
seems redoing the agenda by doing g in tags agenda view unmarks all.
perhaps it should persist those?

we have mark persistence for bulk actions.

just an idea.

thanks.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Fwd: expiring logbook

2020-09-25 Thread Samuel Wales
just wondering out loud what is usually done here.  open ended.

in principle one could sort in agenda by logbook size and have it show
the 20 biggest.

one could have a command to show logbook [in case any relevant notes
worth saving]
then ask user whether to archive.  archiving would consist of the
header prepended by "=logbook=" or so.  body = logbook.

idk.  not sure i want to keep logbook in agenda files at least for
some entries.  much of this is for speed and size.  some of this is to
eliminate clutter of low-value inactive timestamps for later timestamp
agenda ["daily/weekly"] with log mode.



Re: The Website Revamp: The final stretch

2020-09-24 Thread Samuel Wales
i am lost about a and b and 1-2 and so on.

but  i went to a tecosaur site and noticed that the old unicorn
covering text when you use large fonts or have a low dpi monitor is no
longer a problem, whihc is good.  i'd suggest high contrast, light on
dark, preferably with no glaring whites anywhere.

i probably didn't address any of hte questions though.  :)


On 9/24/20, Ihor Radchenko  wrote:
>> You can find the final 3 concepts here: https://0x0.st/ilFH.pdf, once
>> again I'd like to encourage any feedback, and ranking of the options.
>
> I like A and B with slight preference towards B.
>
> Also, the website renders strangely in qutebrowser (see the attached
> screenshot). Firefox renders everything just fine on the same system.
>
> Best,
> Ihor
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Cycling through TODO workflow joins the next line onto the current one

2020-09-23 Thread Samuel Wales
i can confirm visual [not physical] joining of entries [plausibly
doneified tasks] frequently since at least the previous maint, in
vanilla emacs 24 and 25.


On 9/23/20, Ihor Radchenko  wrote:
>> On my emacs 27, following demonstrates the problem.
>
> The patch is attached. It should fix the problem.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-23 Thread Samuel Wales
i have the same question for headline-only capture
buffers.  i.e. what is the expected result with and without trailing
newline.



Re: newline or no newline at end of capture: expected behavior

2020-09-23 Thread Samuel Wales
i have been trying various hooks so this might not be the worst case,
but i know that finalizing a completely empty buffer will insert a
newline after the target.  that can't be worked around with hooks.


On 9/23/20, Bastien  wrote:
> Hi Samuel,
>
> Samuel Wales  writes:
>
>> basically i am getting unwanted newlines all over the place when i
>> capture.  but i want to confirm expected behavior for all 4 questions.
>
> Let's take this one by one.
>
> Can you provide the *worst* use case of Org going completely insane
> regarding empty lines after captured notes?
>
> --
>  Bastien
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: newline or no newline at end of capture: expected behavior

2020-09-19 Thread Samuel Wales
third question:

if you capture a completely blank capture buffer, is it supposed to
insert a blank line right after the target headline, or is it supposed
to be a no-op?  [i prefer no-op.]

fourth question:

if you capture a capture buffer with a newline, [same options].  [i
prefer no-op.]


this is the complete set of questions now.

basically i am getting unwanted newlines all over the place when i
capture.  but i want to confirm expected behavior for all 4 questions.

thank you.


On 9/19/20, Samuel Wales  wrote:
> i want to check on what is /supposed/ to occur in 9.4 maint.
>
> if i capture an entry that has a newline at the end of the last line
> in the entry, is it supposed to end the entry with a blank line?  or
> is it supposed to end the entry with the last line?  [i want last
> line.]
>
> if i capture an entry that does NOT have a newline at the end of the
> last line in the entry, is it supposed to end the entry with the last
> line?  [i want last line but i never do this deliberately.]
>
> thank you.
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



newline or no newline at end of capture: expected behavior

2020-09-19 Thread Samuel Wales
i want to check on what is /supposed/ to occur in 9.4 maint.

if i capture an entry that has a newline at the end of the last line
in the entry, is it supposed to end the entry with a blank line?  or
is it supposed to end the entry with the last line?  [i want last
line.]

if i capture an entry that does NOT have a newline at the end of the
last line in the entry, is it supposed to end the entry with the last
line?  [i want last line but i never do this deliberately.]

thank you.

-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: basic org questions

2020-09-16 Thread Samuel Wales
On 9/16/20, Stefan Nobis  wrote:
> Marking paragraphs by blank lines and without indentation is deemed
> less readable (see for example section 3.10 "Marking Paragraphs" in
> https://komascript.de/~mkohm/scrguien.pdf).
>
> But if you really insist on using this style, still the variant of
> setting the length parindent and parskip is considered bad practise.

for my part, i appreciate your using the "wrong" style for your email
message, as my brain works significantly better with it.  [i am not
talking about anybody else's brain.]



Re: variable-pitch-mode misaligns org-mode heading tags

2020-09-16 Thread Samuel Wales
can emacs supply tools that would be useful?

On 9/16/20, Jeff Filipovits  wrote:
>
> Adam,
>
> Thanks. You are right of course and I realized the right-align
> issue right after I sent my email.
>
> Adam Spiers  writes:
>
>> But the whole point of this exercise is to support
>> variable-width
>> fonts.  In this case, the correct position for the end of the
>> single
>> space is most likely not even a multiple of the fixed column
>> width, so
>> it would probably need to be measured in pixels rather than
>> columns. And in order to calculate it, it is first necessary to
>> calculate the exact width in pixels of the colon-delimited list
>> of
>> tags. As I mentioned in the comment linked above, I searched for
>> a way
>> of calculating the pixel width of the tag list, and the best I
>> could
>> find was `pos-visible-in-window-p' which has some issues which I
>> mentioned there.  If you have thoughts on whether I'm right
>> about
>> those, and if so how to solve them, I'd love to hear! Cheers,
>> Adam
>
> It looks like (window-text-pixel-size) could be used to calculate
> the pixel length of the tags list? I am having trouble deciphering
> the manual
> (https://www.gnu.org/software/emacs/manual/html_node/elisp/Pixel-Specification.html#Pixel-Specification)
>
> for pixel specification for spaces, though. The right alignment
> specification for some reason sends the tags to the next line, as
> do most other solutions that I would expect to align the text to
> the right side of the window.
>
> I can experiment more in a couple days, but in the meantime maybe
> someone smarter than me give some hints on how to use the pixel
> specification properties.
>
>> BTW I tried your code and for some reason it didn't insert any
>> space
>> for me, but I didn't look into that yet.
>
> The way it’s written it would only reduce the gap between the
> headline and tags to a space, and it assumes there are multiple
> spaces there already. If there’s no space between the two, I don’t
> think it’ll insert one. Probably not the best way as it was thrown
> together to test the text property fix.
>
> I accepted long ago that the solution to using a variable pitch
> font for org headings was that the tags would not be aligned to
> the right and never looked back, so maybe this is not worth the
> price of fixing it if it is messy. And diving down to calculating
> the pixel width of text seems like it’s getting pretty messy.
>
> --
> Jeff Filipovits
> Spears & Filipovits, LLC
> 1126 Ponce de Leon Avenue
> Atlanta, GA 30306
> 678.237.9302 (direct)
> jrfilipov...@gmail.com
>
> All emails confidential to the fullest extent of the law.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: basic org questions

2020-09-15 Thread Samuel Wales
if it is in the buffer, asopposed to export, to align body text,
including stuff like planning lines, take a look at
org-adapt-indentation.

i prefer everything left-aligned as opposed to moving around with the
header indentation level, so i set this.

if it's export, check backends for vars.  ascii has one.

if centering really means centering then idk.

On 9/15/20, Emanuel Berg via General discussions about Org-mode.
 wrote:
> Matt Huszagh wrote:
>
>> Were you referring to the tables being centered
>> after export (I see from another part of this chain
>> that that's what you were referring to in the 3rd
>> question) when you wanted them left-aligned?
>> If that is the case, it would really help if you
>> specify that in your original question.
>> Appearance in an org-mode buffer and appearance in
>> the PDF, HTML, etc. after export are very different
>> things with very different configuration.
>
> Yes, after export to PDF, they are centered. they =
> the whole table items.
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



does org-capture need undo-boundary?

2020-09-13 Thread Samuel Wales
i have nothing for you to repro so this is just a heads up.  in maint
i have had org capture, run by firefox org capture extension, add some
notes, then i manually make a change in the location they add notes
to, then undo.  everything gets undone.



Re: Delay all occurences for a heading scheduled with repeater not work.

2020-09-10 Thread Samuel Wales
i see the problem.  but i get confused about the real-world purpose of
this feature.  is the idea that technically someplace in the real
world you are supposed to work on it but you have decided not to and
you don't want the agenda to show it until you will work on it?

On 9/10/20, Bastien  wrote:
> Hi,
>
> h...@protonmail.com writes:
>
>> It says:
>> "If you want to delay the display of this task in the agenda, use
>> ‘SCHEDULED: <2004-12-25 Sat -2d>’: the task is still scheduled on the
>> 25th but will appear two days later. In case the task contains a
>> repeater, the delay is considered to affect all occurrences; if you
>> want the delay to only affect the first scheduled occurrence of the
>> task, use ‘--2d’ instead."
>>
>> With headings below:
>> * delay in scheduled with repeater
>> ** TODO delay all occurences
>>SCHEDULED: <2020-01-30 Thu -1d +2d>
>> ** TODO delay only the first occurence
>>SCHEDULED: <2020-01-30 Thu --1d +2d>
>>
>> Both headings display in today's agenda (today is <2020-01-31>).
>> Which is correct.
>>
>> Then both display in agenda of <2020-02-01>.
>> Which is not correct for 'delay all occurences'.
>> It should display in agenda of <2020-02-02>.
>>
>> Please help check if this should be fixed.
>
> Just bumping up this thread to confirm the bug is still there.
>
> --
>  Bastien
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: bug#42484: org-mode should display value of links in mini-buffer

2020-09-10 Thread Samuel Wales
the problem for eldoc for me is that for some reason it gets pretty
confusing trying to implement lots of things all at once, at least
when emacs is already using it for something, or so.

here is my current jumble of code.  it does work.  and has comments
but idk if it is of any use.  or even understandable to anybody.

one other use for it that i have not gotten to in yeras but woulkd be
good is to have hovering over timestamps show you the number of days
from now to that timestamp.

so lots of uses for eldoc.

;; hover text
(with-no-warnings
  (if (< emacs-major-version 24)
  (setq tooltip-use-echo-area t)
(tooltip-mode -1)))

(unless (version< emacs-version "25")
  ;; i find this annoying in at least elisp, and prefer my
  ;; function enabled in elisp, which does interesting things for
  ;; org-link-minor-mode.  emacs 25 enables this by default.  it
  ;; might be itneresting to see where eldoc is useful.
  (global-eldoc-mode -1))
;; make pointer emit help-echo
;;   over org links
;; (setq eldoc-idle-delay 8.0)
;; (setq eldoc-idle-delay 0.0)
;; (add-hook 'prog-mode-hook 'eldoc-mode)
;; [[http://google.com][test]]
;; fixme why does this not work in either org or elisp?
;;   because there is no help-echo
;;   fixme add help-echo
;; [2017-01-16 Mon 12:48]
;; fixme why does this work on links in elisp without this hook?
;; (add-hook 'prog-mode-hook 'alpha-eldoc-help-echo-mode)
;; (add-hook 'org-link-minor-mode-hook 'alpha-eldoc-help-echo-mode)
(add-hook 'org-mode-hook 'alpha-eldoc-help-echo-mode)
;; in elisp we might want both link eldoc and elisp eldoc
;;   we also want org ts eldoc
(defun hoka-eldoc-help-echo-at-point ()
  "Eldoc thingy for help-echo text properties.
This works for links, should work for tses in at least
org-link-minor mode and org mode, and is/was broken by emacs 25
enabling eldoc at some point.  Fixing these things one by one."
  ;; does this mean we do this every movement?
  ;;   apparently eldoc does
  (let ((val
 (or (get-text-property (point) 'help-echo)
 ;; fixme if at a timestamp (alpha-eldoc-time-span)
 ;; adding help echo time span to every timestamp
 ;; seems like it would require org
 ;; ;; (add-hook 'alpha-eldoc-non-help-echo-hook
'alpha-eldoc-timestamp-hook)
 ;; (run-hooks alpha-eldoc-non-help-echo-hook)
 )))
val))
;; (alpha-eldoc-help-echo-mode)
(defun alpha-eldoc-help-echo-mode ()
  "Enable eldoc mode with e.g. org links to display in minibuffer
when cursor is over them.  Call in the relevant buffer.  M-x
eldoc-mode to turn off.  /Add this to mode hooks/."
  (interactive)
  (eval-when-compile (require 'eldoc))
  (setq-local eldoc-documentation-function 'hoka-eldoc-help-echo-at-point)
  (eldoc-mode))




On 9/10/20, Maxim Nikulin  wrote:
> 06.09.2020 21:18, Kévin Le Gouguec wrote:
>>> Boruch Baum  writes:
>>>
 In org-mode, when POINT is moved over an org-mode link, wouldn't it be
 reasonable for the value of that link to appear in the mini-buffer? The
 advantage of that is the user would know where the link points and what
 would happen if the link is opened (eg. would an external program open,
 would the network be queried).
>>
>> That would be very welcome, IMO.  FWIW, markdown-mode does that (when
>> markup is hidden) using ElDoc; cf. markdown-eldoc-function.
>
> There was a similar question in May. A message in the middle of that
> thread:
> https://orgmode.org/list/CAJ51ETo0x=zrav7lfudvap7d2pz-duhzcrut+guby0slssw...@mail.gmail.com/
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Any reason not to generate my own custom ID value (NOT CUSTOM_ID)?

2020-09-10 Thread Samuel Wales
this or something similar has definitely been discussed on this
mailing list.  so you are not alone.

although i undersatnd the whole thing as readable id's.  dunno if that
is the prupose.

maybe something like a timestamp and then the usual id would give you
pretty good uniqueness.


On 9/10/20, TRS-80  wrote:
> First, I want to express my sincere and heart-felt gratitude to Carsten
> (and other contributors) for making and sharing this wonderful piece of
> software.  I have come to refer to it as "one of the gateway drugs to
> Emacs" (the other being Magit, IMHO).  It was certainly one of (if not
> /the/) main reason(s) why I started using Emacs initially.
>
> I could in fact gush all day, however people are busy, so, on to the
> main issue...  :)
>
> It seems to me that there is nothing really stopping me from inserting
> whatever value I like for value of "ID" Property.  Based on brief
> experimentation, org-store-link and org-insert-link seem to happily
> accept whatever value is already there (which I entered manually, for
> testing purposes).
>
> However I seem to recall reading some warning somewhere about this,
> although I cannot seem to find it right now.
>
> What I would like to do, is generate my own ID values in a more human
> readable format, something "ISO-like" for example "2020-09-10-1433" (as
> opposed to the default "uuid" method).  These sort of ID are still
> "Unique" (well, within my own system, anyway) as long as I am not
> generating them more often than once per minute[0].  And they have the
> advantages of being shorter, human readable, and meaningful.
>
> Even when org-id-link-to-org-use-id and org-id-track-globally are both
> set to "t", org-id seems happy to insert my "ISO-like" ID right into the
> hash table and org-id-locations-file.
>
> I do need the "across files" functionality.  My understanding is that
> this is main difference between ID and CUSTOM_ID (the latter being local
> only to the file).  Unless I am misunderstanding?
>
> So, what am I missing here?  Any reason(s) /not/ to use my own custom ID
> value?
>
> In addition to the general case, one particular area I am unsure about
> (as I have yet to get it working) is how this all works out with HTML
> export, as that is something I also wanted to get working at some point.
>
> I tried studying some of the related sources (as well as mailing list
> archive), but could not seem to reach a conclusive answer.  I was hoping
> that some more knowledgeable people could confirm
> whether this is a really bad idea, or not.  Any feedback would be
> greatly appreciated!
>
> Cheers!
>
> TRS-80
>
> [0] It could easily be extended to second (or further) resolution, if
> needed.  For me, minute resolution will be fine.
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Support for simultaneous running clocks?

2020-09-10 Thread Samuel Wales
more than one clock can be useful, but maybe need not be org-related,
even if that would be nice?  for example, your laundry is due in 45m,
tea will be steeped in 8m, etc.

i believe there is a package that allow many non-org clocks and has a
list-timers or so that shows you what you have running.  i forgot its
name.  idk if htat would be useful.  presumably counts up and down and
possibly notifies.

On 9/10/20, TRS-80  wrote:
> On 2020-09-04 13:14, Bastien wrote:
>> Hi Carlo,
>>
>>> Carlo Tambuatco  writes:
>>>
>>> how long something takes to compile
>
> I have set my shell prompt with a timestamp for exactly this reason.  I
> have also seen someone who set it to reflect elapsed time since last
> command, instead.
>
> But I guess maybe you are referring to inside Emacs / Orgmode?  I'm just
> throwing out a possible alternative.
>
> Cheers,
>
> TRS-80
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



  1   2   3   4   5   6   7   8   9   10   >