Re: Binding RET to org-return-and-maybe-indent

2020-07-23 Thread Jarmo Hurri


Hi Kévin.

Kévin Le Gouguec  writes:

>>> #+begin_src emacs-lisp
>>> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
>>> #+end_src
>>
>> Unfortunately this has side effects: it changes at least the way
>> parentheses and indentation interact when opening a Babel source code
>> block. It might be a good idea to mention this in ORG-NEWS.
>
> Could you give us a precise recipe?  (Starting from emacs -Q and an
> empty Org buffer)
>
> I've fiddled a bit with source blocks just now and I'm noticing some
> weirdness that I suspect might be due to electric-indent-mode
> re-indenting the previous line when hitting RET (or C-j when disabling
> electric-indent-mode), but nothing specific to parentheses.

At the minimum it changes the way parentheses indent automatically when
editing source code blocks. Below is a minimal demo, documented using
our favorite system.

All the best, and stay safe.

Jarmo

* Demo of the effect of disabling elint
  1. Save this org into file =org-elint-disable.org=
  2. Save the following elisp into =minimal-org.el=, replacing the
 location of org mode with your path:
 #+begin_src elisp
   (add-to-list 'load-path (expand-file-name "~/src/org-mode/lisp"))
   (add-to-list 'load-path (expand-file-name "~/src/org-mode/contrib/lisp" 
t))
   (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
 #+end_src
  3. Toggle the last line
 #+begin_src elisp
 (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
 #+end_src
 in =minimal-org.el= to see the following effect:
 1. Open this file with
#+begin_src sh
  emacs -Q -l minimal-org.el org-elint-disable.org
#+end_src
 2. Type C-c ' for (org-edit-special) in the source code block below,
and follow the instructions on the comment line.
#+begin_src java :exports none :classname Demo
  class Demo
  {
  // 1st press RET at the end of this line, then type TAB and }
#+end_src
  




FR: allow adding a deadline with warning days [was Re: deadline warning days entry]

2020-07-23 Thread Samuel Wales
i think the following boils down to:

i think it would be less error prone if we allowed c-u c-u to work
when adding a deadline to an entry.  in maint it errors.

thank you.

On 7/22/20, Samuel Wales  wrote:
> i tend to want either zero or some number [like 4 or 8] for deadline
> warning days for deadline timestamps [tses].
>
> so i set the deadline warning days variable to a nonzero positive
> number as a default.  and then manually add -0d to individual tses
> when i want -0d.
>
> however, manual editing feels quite error prone and it is
> typing/concentration-intensive.  the failure mode could include not
> being warned or even not showing the deadline at all.
>
>
> the existing command has a prefix option, but it does not solve the
> problem.
>
> c-u c-u will ask you for a warning date, but for less chance of error,
> i want an interval or number of dasys instead.  this would also be
> slightly more consistent with the variable, which takes an integer.  a
> warning date requires you to think about date arithmetic.
>
> another problem with c-u -cu is that it requires you to enter the ts,
> then do c-u c-u.  i.e. you can't enter a deadline with c-u c-u.
>
> if those two problems were fixed, i would have no issue.
>
>
> i'd like to know if anybody has any code for changing the deadline
> warning days of a deadline ts to an interval or ndays.  [the minus
> sign would not be needed.]  this would be for new tses and existing
> tses.  in my case it would default to my alternate interval [0d].
>
> this could be thought of as a feature request, but i don't know if it
> is of enough interest, and i figured perhaps somebody already has some
> code for this or likes the idea above also.
>
> thank you.
>
> --
> The Kafka Pandemic
>
> What is misopathy?
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: [PATCH] org: Update example in docstring to accommodate new name and new format

2020-07-23 Thread Kyle Meyer
Leo Vivier writes:

> I have already filled the paperwork, and I will send you the scan in
> a separate email.  Could you move me to the list of current
> contributors?

Sorry for the mix-up.  Updated.



Re: Binding RET to org-return-and-maybe-indent

2020-07-23 Thread Kévin Le Gouguec
Jarmo Hurri  writes:

>> #+begin_src emacs-lisp
>> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
>> #+end_src
>
> Unfortunately this has side effects: it changes at least the way
> parentheses and indentation interact when opening a Babel source code
> block. It might be a good idea to mention this in ORG-NEWS.

Could you give us a precise recipe?  (Starting from emacs -Q and an
empty Org buffer)

I've fiddled a bit with source blocks just now and I'm noticing some
weirdness that I suspect might be due to electric-indent-mode
re-indenting the previous line when hitting RET (or C-j when disabling
electric-indent-mode), but nothing specific to parentheses.

Since I'm a bit pressed for time ATM it would help if you could give a
step-by-step explanation of what goes wrong.



Re: Reposting Elgantt announcement

2020-07-23 Thread Eric S Fraga
This looks very impressive and, as Russell says, there is a fair bit of
potential demand for a good org based GANTT chart tool.  I don't have
time to have a serious look at it right now (preparing for teaching in a
COVID-19 world...) but will do so when I can.

A quick question, however.  My projects tend to be multi-year.  Does the
graphical presentation provide optional control of the date information
along the top?  We often use each year as a major divider with Q1..Q4
subdivisions for quarterly views of multi-year projects.  Even just
years with month labels (JFMA...D) would be good enough but full
month/day breakdowns as you currently have in the demo would be
unwieldy/ugly.

Thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-682-geac255



Re: Reposting Elgantt announcement

2020-07-23 Thread Jeff Filipovits

Eric S Fraga  writes:

A quick question, however.  My projects tend to be multi-year. 
Does the
graphical presentation provide optional control of the date 
information
along the top?  We often use each year as a major divider with 
Q1..Q4
subdivisions for quarterly views of multi-year projects.  Even 
just

years with month labels (JFMA...D) would be good enough but full
month/day breakdowns as you currently have in the demo would be
unwieldy/ugly.


Not currently an option but would not be hard to implement. Some 
of the code relies on the months to be displayed but they could be 
hidden in a text property somewhere. The vertical lines between 
months are important though, so there’s no way to get rid of 
those. 

Adding an option to hide the number line for the dates should not 
be difficult. 

If you gave me an idea of what you want it to look like I could 
figure out a way to make the top lines customizable in a way that 
could accommodate it.



--
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.



Re: Binding RET to org-return-and-maybe-indent

2020-07-23 Thread Jarmo Hurri


Hello again.

Kévin Le Gouguec  writes:

> As ORG-NEWS notes, if you want RET to stop indenting, you can disable
> electric-indent-mode in org-mode-hook:
>
> #+begin_src emacs-lisp
> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
> #+end_src

Unfortunately this has side effects: it changes at least the way
parentheses and indentation interact when opening a Babel source code
block. It might be a good idea to mention this in ORG-NEWS.

Next I will try to change the binding of RET.

All the best, and stay safe.

Jarmo




deadline warning days entry

2020-07-23 Thread Samuel Wales
i tend to want either zero or some number [like 4 or 8] for deadline
warning days for deadline timestamps [tses].

so i set the deadline warning days variable to a nonzero positive
number as a default.  and then manually add -0d to individual tses
when i want -0d.

however, manual editing feels quite error prone and it is
typing/concentration-intensive.  the failure mode could include not
being warned or even not showing the deadline at all.


the existing command has a prefix option, but it does not solve the problem.

c-u c-u will ask you for a warning date, but for less chance of error,
i want an interval or number of dasys instead.  this would also be
slightly more consistent with the variable, which takes an integer.  a
warning date requires you to think about date arithmetic.

another problem with c-u -cu is that it requires you to enter the ts,
then do c-u c-u.  i.e. you can't enter a deadline with c-u c-u.

if those two problems were fixed, i would have no issue.


i'd like to know if anybody has any code for changing the deadline
warning days of a deadline ts to an interval or ndays.  [the minus
sign would not be needed.]  this would be for new tses and existing
tses.  in my case it would default to my alternate interval [0d].

this could be thought of as a feature request, but i don't know if it
is of enough interest, and i figured perhaps somebody already has some
code for this or likes the idea above also.

thank you.

-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html