emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-macs ignoring stock functionality


From: Nicolas Goaziou
Subject: Re: org-macs ignoring stock functionality
Date: Mon, 19 Nov 2018 19:30:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Sam Steingold <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]