unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Sam Steingold <sds@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: org-macs ignoring stock functionality
Date: Mon, 19 Nov 2018 19:30:23 +0100	[thread overview]
Message-ID: <87ftvwex8g.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFsbZ7YPmoNw2awZT7qS4JJko-uWsai3_eJvWHX4QHMx+7jfEg@mail.gmail.com> (Sam Steingold's message of "Mon, 19 Nov 2018 09:13:23 -0500")

Hello,

Sam Steingold <sds@gnu.org> writes:

> I do not use org, but it
> accidentally(https://emacs.stackexchange.com/a/46083/795) came to my
> attention that org-macs.el duplicates some emacs stock functionality:
>
> 1. org-split-string - ignores split-string-default-separators; can
> probably be simplified to (split-string string separators nil t)

`org-split-string' and `split-string' are slightly different. The former
ignores separators at the beginning and at the end of the string, not
the latter. At some point, it used `split-string', but it happened to be
too slow for a core Org function.

> 2. org-current-line - can be replaced with line-number-at-pos

Indeed, it could be replaced by (line-number-at-pos nil t). I will
obsolete it in Org 9.2.

> 3. org-goto-line - can be replaced with goto-line

Function `goto-line' messes with the mark. From its docstring,

  This function is for interactive use only;
  in Lisp code use ‘forward-line’ instead.

and

  This function is usually the wrong thing to use in a Lisp program.

So, no, `goto-line' cannot replace `org-goto-line'.

Regards,

-- 
Nicolas Goaziou



  reply	other threads:[~2018-11-19 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 14:13 org-macs ignoring stock functionality Sam Steingold
2018-11-19 18:30 ` Nicolas Goaziou [this message]
2018-11-19 21:01   ` Sam Steingold
2018-11-19 22:13     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftvwex8g.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-devel@gnu.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).