Coder Social home page Coder Social logo

Org mode dates about denote HOT 12 CLOSED

protesilaos avatar protesilaos commented on July 28, 2024
Org mode dates

from denote.

Comments (12)

protesilaos avatar protesilaos commented on July 28, 2024 2

I like that approach. Thanks.

Great! Pushed the changes:

  commit e59b606e1924a7a3e536597cb309d1c71d67d380
  Author: Protesilaos Stavrou <[email protected]>
  Date:   Thu Jun 30 16:13:29 2022 +0300

      Use better default for file dates in front matter

      The old user option 'denote-front-matter-date-format' is deprecated.  It
      is superseded by 'denote-date-format'.

      Now we use an inactive timestamp for Org, the RFC3339 standard for
      Markdown (YAML or TOML), and the ISO 8601 format for plain text.

      The user can specify a string value for 'denote-date-format', which
      contains format specifiers as described in the doc string of
      'format-time-string'.

      Thanks to Peter Prevos and Kaushal Modi for the discussion in issue 27
      over at the GitHub mirror: <https://github.com/protesilaos/denote/issues/27>.

   README.org | 48 ++++++++++++++++++++++++------------------------
   denote.el  | 39 +++++++++++++++++++--------------------
   2 files changed, 43 insertions(+), 44 deletions(-)

I think this provides a better experience out-of-the-box.

Please let me know if there is something else that needs to be done.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024 2

I changed the default value of denote-link-use-org-id to t. I think
compatibility with the wider Org ecosystem is important and is one of
our goals to be a good Emacs citizen.

  commit 2193501cef4e91bb7b8d4d436484ea429ddd2084
  Author: Protesilaos Stavrou <[email protected]>
  Date:   Fri Jul 1 06:53:01 2022 +0300

      Change default value of denote-link-use-org-id

      This ensures that we provide the best experience for Org users
      out-of-the-box.  The 'id:' hyperlink type is standard, making our notes
      interoperable.

      This change should not have negative implications for existing users.
      We have already taken care to ensure that links from Org notes to other
      file type notes (e.g. Markdown) use the 'denote:' hyperlink type.  In
      other words, we apply the standard when appropriate, else fall back to
      our own mechanism.

      Thanks to Kaushal Modi and Peter Prevos for the feedback in issue 27
      over at the GitHub mirror: <https://github.com/protesilaos/denote/issues/27>.

   README.org     | 7 +++++--
   denote-link.el | 8 ++++----
   2 files changed, 9 insertions(+), 6 deletions(-)

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Hello @pprevos!

You are right. The user option denote-front-matter-date-format
provides the possibility to use an Org timestamp or a custom format.

Perhaps we should review the default value here. It is better if we do
the right thing out-of-the-box.

What do you think?

[I'll keep this open for a little while in case someone else wants to
join the discussion ]

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Related:

(defcustom denote-front-matter-date-format nil
(9bf1043)

I set that defcustom to org-timestamp as I like to record both date and time (helps sort the notes in chronological order if more than one note is written in a day).

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

@kaushalmodi What do you think about changing the defaults? Kind of how
the default for Markdown is different. It seems appropriate to use a
file-specific format for each case. We can retain the option of a
custom format.

The option could then be changed to something like denote-date-format.
Sample doc string:

When nil, use a file-type-specific format.

- For Org, an inactive timestamp is used, such as [2022-06-30 Wed 06:19].

- For Markdowmn, the RFC3339 standard is applied: 2022-06-30T15:48:00+03:00

- For plain text, the format is 2022-06-30.

If the value a string, use it as the argument of `format-time-string'.
Read the documentation of that function for valid format specifiers.

EDIT: Remove the quotes from nil.

EDIT2: Clarify that timestamp is inactive.

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

What do you think about changing the defaults? Kind of how
the default for Markdown is different. It seems appropriate to use a
file-specific format for each case.

I like that approach. Thanks.

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Thanks! Now my denote config is down to just one setting 😃

(setq denote-link-use-org-id t)

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Thanks! Now my denote config is down to just one setting 😃

Hehe! I am fine with this. In general, I believe we should strive to
have good defaults so that things "just work" out-of-the-box.

Should we start a new thread about it? Ideally, we can get feedback
from a few users before making any changes. Just to learn how they
approach the issue.

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Should we start a new thread about it?

No, let's see if there's a real need for that; let's see if someone opens an issue for that or emails on the mailing list. Thanks for all your work.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

No, let's see if there's a real need for that [...]

Okay.

Thanks for all your work.

You're welcome!

from denote.

pprevos avatar pprevos commented on July 28, 2024

Nice to see that when I wake up in Australia, all this work has been done.

By the way, I am an Org Roam experimenting with using both systems side-by-side for now. The denote header is fully compatible with Org roam, which will register any file with an ID tag.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

By the way, I am an Org Roam experimenting with using both systems
side-by-side for now. The denote header is fully compatible with Org
roam, which will register any file with an ID tag.

Good to know! This suggests that you might also want to opt in to links
between Denote's notes that use the standard id: hyperlink type
instead of denote:. The variable is denote-link-use-org-id and must
be set to t.

from denote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.