Re: [Bug] org-in-src-block-p returns t when not in source block

2023-11-28 Thread Jens Schmidt
On 2023-11-27  21:30, Ihor Radchenko wrote:

> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6d7c7917a

Which is currently my HEAD, and there are still edge cases that do not
seem to be handled well.

Start off from "make vanilla" and the following buffer

- test.org -
#+begin_src shell
foo
#+end_src

bar
- test.org -

Navigate to BOL of the "#+end_src" line and

  M-: (org-in-src-block-p t)
  => nil

As expected.  Now add a space on the empty line *after* the
"#+end_src" line, navigate back to BOL of the "#+end_src" line and

  M-: (org-in-src-block-p t)
  => t

When I wrote my own inner-boundary function, I looked with envy at
the elegance of the arithmetic done in `org-in-src-block-p' but thought
that this probably would not always work ... or did I misunderstand
something here?

Thanks  Jens

Here is the lossage corresponding to my test case, just in case:

 C-s  ;; isearch-forward
 #;; isearch-printing-char
 +;; isearch-printing-char
 e;; isearch-printing-char
 n;; isearch-printing-char
 d;; isearch-printing-char
 C-a  ;; org-beginning-of-line
 M-: (org-in-src-block-p t)
  ;; read--expression-try-read
 C-n  ;; next-line
 SPC  ;; org-self-insert-command
 C-a  ;; org-beginning-of-line
 C-p  ;; previous-line
 M-: (org-in-src-block-p t)
  ;; read--expression-try-read



Citations and basic processor: examples of some things that don't work

2023-11-28 Thread William Denton
Attached (I think attachments work on this list) is a small Org file that has a 
table that sets out all the various options possible with the basic processor 
for citations.  Most work, but not the author style, and the caps and bare-caps 
variants never do.


To test try changing parentheses to square brackets, for example 
(cite/t/c:@friends) to [cite/t/c:@friends], and exporting.  From what I see in 
oc-basic.el, everything in the table should work.  Changing the processor to use 
CSL, they all do.



Thanks,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 421.47 ppm (Mauna Loa Observatory, 2023-11-24)@book{chassellIntro,
  title = {An Introduction to Programming in {{Emacs Lisp}}},
  author = {Chassell, Robert},
  date = {2023},
  publisher = {{GNU Press}},
  location = {Boston},
  url = {https://www.gnu.org/software/emacs/manual/eintr.html}
}

@book{friends,
  title = {{{LaTeX}} and Friends},
  author = {van Dongen, M.R.C.},
  date = {2012},
  location = {Berlin},
  publisher = {Springer},
  doi = {10.1007/978-3-642-23816-1},
  isbn = {9783642238161}
}
#+title: Org citations with the basic processor
#+author:
#+date:

#+startup: showall align
#+options: num:nil ^:nil  toc:nil

#+bibliography: Basic.bib

#+cite_export: basic

Something like =(cite//c:@friends)= is a citation that does not work.  Test by 
changing the parentheses to square brackets and exporting.

#+attr_latex: :environment longtable
| style | variant| cite| result|
|---++-+---|
|   || :   | [cite:@friends]   |
|   | b (bare)   | //b:| [cite//b:@friends]|
|   | c (caps)   | //c:| (cite//c:@friends)|
| a (author)|| /a: | (cite/a:@friends) |
| a (author)| c (caps)   | /a/c:   | (cite/a/c:@friends)   |
| ft (note) || /ft:| [cite/ft:@friends]|
| ft (note) | b (bare)   | /ft/b:  | [cite/ft/b:@friends]  |
| ft (note) | bc (bare-caps) | /ft/bc: | (cite/ft/bc:@friends) |
| ft (note) | c (caps)   | /ft/c:  | (cite/ft/c:@friends)  |
| n (nocite)|| /n: | [cite/n:@friends] |
| na (noauthor) || /na:| [cite/na:@friends]|
| na (noauthor) | b (bare)   | /na/b:  | [cite/na/b:@friends]  |
| nb (numeric)  || /nb:| [cite/nb:@friends]|
| t (text)  || /t: | [cite/t:@friends] |
| t (text)  | b (bare)   | /t/b:   | [cite/t/b:@friends]   |
| t (text)  | bc (bare-caps) | /t/bc:  | (cite/t/bc:@friends)  |
| t (text)  | c (caps)   | /t/c:   | (cite/t/c:@friends)   |

* Bibliography

# You can specify "plain" or "numeric," and anything else turns into 
author-year.
#+print_bibliography:


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Martin Steffen



> "Ihor" == Ihor Radchenko  writes:

Ihor> alain.coch...@unistra.fr writes:

>> ... except when institution prohibits redirecting to another
>> email provider -- my case ...

Ihor> I would then simply use another email for most of the
Ihor> communication.  The institution email would then just be
Ihor> needed to communicate with institute-wide announcements.


That's a possibility I had indeed thought about, because also for me
it's forbidden to forward (automatically or not) stuff outwards from the
domain. I think it's not forbidden to "move" or sync emails to local
disk, as far as I can see, though I was not able to reasonably
automatize that (like with davmail, though that almost worked for a time
resp. partially...)

For institutional seasonal greetings or general announcements the
muddled outlook access would even be acceptable for me, who
cares. Unfortunately, there are many emails (from inside the
organization, a university) that are individual, relevant, and at times
urgent and requiring (re-)action and preferably efficient
organization, overview, and handling, but I cannot use alternative
email-addresses for that.



Martin






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




Re: Getting email from MS outlook into emacs

2023-11-28 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

> ... except when institution prohibits redirecting to another email
> provider -- my case ...

I would then simply use another email for most of the communication.
The institution email would then just be needed to communicate with
institute-wide announcements.

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



Re: Getting email from MS outlook into emacs

2023-11-28 Thread Alain . Cochard
Ihor Radchenko writes on Tue 28 Nov 2023 08:34:

 > ... except when institution also prohibits anything but MS Outlook
 > to access the MS Exchange protocol. In such dire scenario, the only
 > option left is redirecting all the emails to another email provider
 > that can be accessed via MSTP.

... except when institution prohibits redirecting to another email
provider -- my case ...

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




Re: Getting email from MS outlook into emacs

2023-11-28 Thread Ihor Radchenko
"Fraga, Eric"  writes:

> On Tuesday, 28 Nov 2023 at 08:34, Ihor Radchenko wrote:
>> ... except when institution also prohibits anything but MS Outlook to
>> access the MS Exchange protocol. 
>
> Indeed but my experience has often been that such restrictive practices
> are the result of blind clicking on the part of the IT department and
> can be rescinded through discussion with them.

Not for me :( But it is definitely worth trying to reach out the IT if
someone else runs into such problem.

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



Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
Hi Martin,

On Tuesday, 28 Nov 2023 at 09:40, Martin Steffen wrote:
> that leaves people like me out in the rain, someone who just wants a
> reliable, stable plain old email server which is widely compatible
> (even if only backward compatible) and the leaves the choice of
> mailreader(s)q to the user.  [...]  My current goal is not to get
> access to the server enabled properly again, but to get the emails
> (automatically) off the server, like 20+ years ago, when internet and
> access to servers was unrealiable over "modem" dial-ups. So back to
> the future, so to say.

I share your pain. :-( Hard to believe that the 80s or 90s were the
pinnacle of computing when it comes to email (not to mention newsgroups
although there is promise in ActivityPub related approaches).

Luckily, for me, davmail (currently) works.  And I use POP to make sure
I have copies of all of my emails.  Links from org to my emails will
always continue to work and I do not depend on the server once
downloaded.

eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
On Tuesday, 28 Nov 2023 at 08:34, Ihor Radchenko wrote:
> ... except when institution also prohibits anything but MS Outlook to
> access the MS Exchange protocol. 

Indeed but my experience has often been that such restrictive practices
are the result of blind clicking on the part of the IT department and
can be rescinded through discussion with them.  Over the years I have
been in my current institution, I have had these kinds of discussions
several times (using Linux, not Windows; using other MUAs, not Outlook;
etc.) and have managed to get the access I needed almost always.

But some places are probably a lost cause in this regard unfortunately.
Tail wagging the dog comes to mind...

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Martin Steffen



Hi,

not that I have a solution, but I would like to know one as well. Ever
since my organization moved to more or less exclusively Outlook, email
as working tool (for me) has constantly deteriorated. 2FA was one of the
last of the innovations, that was hard to "work with" as non
Microsoft/Outlook user (not Mac for me by emacs/linux). It's
increasingly frustrating, since it's a small drip-drip-drip downhill
experience. Once you get it sort of working again after it broke again,
they roll out a new "improvement" or feature after some time, which
perhaps adds some fancy wrinkles to the constellation of tremendous
things outlooks probably offers (I am just waiting for the
CHATGTP-plug-in that answers your emails for yourself...), but that
leaves people like me out in the rain, someone who just wants a
reliable, stable plain old email server which is widely compatible (even
if only backward compatible) and the leaves the choice of mailreader(s)q
to the user.

There seem to be features, that I don't want to get used to (seem like
auto-expire, emails vanish if read but not handled properly or
something), other emails I delete constantly re-awake (but in an expired
status, but still shown for me), other are undeletable (which leaves me
with a huge zombie-inbox), some are never shown in emacs-gnus.

So, I tried different approaches, all did not work (or stopped working
after a while, maybe after new "improvements" on the server side),
including davmail, procmail, and some other "sync" solutions if forgot,
but the main stumbling stone seemed 2FA ever since that was
introduced. I did not try mbsync though (maybe I will when I have time),
so I cannot really help.

But as said, I'd be likewise interested in directions for approaches. My
current goal is not to get access to the server enabled properly again,
but to get the emails (automatically) off the server, like 20+ years
ago, when internet and access to servers was unrealiable over "modem"
dial-ups. So back to the future, so to say.

best, Martin












Re: Getting email from MS outlook into emacs

2023-11-28 Thread Ihor Radchenko
"Fraga, Eric"  writes:

>> Does anybody have a workaround?  I just want the email message to be
>> linked to my todos, which is almost impossible.  
>
> My institution is the same.
>
> I solved this problem by using davmail [1] as an intermediary.  This
> works well interacting with MS Exchange servers with multi-factor
> authentication.  I then use gnus to read my emails.

... except when institution also prohibits anything but MS Outlook to
access the MS Exchange protocol. In such dire scenario, the only option
left is redirecting all the emails to another email provider that can be
accessed via MSTP. Of course, replying does not work then and one has to
use the browser to send emails from institution email.

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



Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
Hi Marvin,

On Tuesday, 28 Nov 2023 at 03:09, Doyley, Marvin M. wrote:
> I have been trying to configure mbsync to download email from MS
> Outlook.  Unfortunately, the new oauth2 authentication makes things
> difficult, especially since my institution has disabled the Azure App
> permission.
>
> Does anybody have a workaround?  I just want the email message to be
> linked to my todos, which is almost impossible.  

My institution is the same.

I solved this problem by using davmail [1] as an intermediary.  This
works well interacting with MS Exchange servers with multi-factor
authentication.  I then use gnus to read my emails.

HTH,
eric

Footnotes:
[1]  https://davmail.sourceforge.net/

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50