From: Heikki Lehvaslaiho <heikki.lehvaslaiho@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Cask-initialize messes up org table manipulation commands
Date: Sat, 24 Sep 2016 09:20:08 +0300 [thread overview]
Message-ID: <CAK=ukcbs3bae2Y2UR5rL6vsi618JZ6J+Lwb71WEmMUhpTzLyhw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2552 bytes --]
* Problem
I wanted to script org mode table manipulations. The most basic table
command is org-table-cut-region (C-c C-x C-w)[fn:1].
I tried this with simplest possible table:
| x |
The cell content disappears but to my surprise the cursor jumped out
of the table! Trying with different tables, it came clear that the
cursor always jumped one line down and left of the table). (Under the
left border if you have a box cursor.) That should not happen!
Can anyone reproduce this?
* Clean run
Running bare emacs did not show this problem. The cursor stayed
between the cell borders.
#+BEGIN_SRC sh
/usr/local/bin/emacs -Q
#+END_SRC
* Cleaning emacs config
Assuming the culprit was some package in my emacs config, I bisected
my init file to almost nothing and still had the problem!
I am using Cask and pallet to keep track of the packages installed.
I removed all depends-on statements from my Cask file including the
one for pallet before I found the source of the problem.
The Cask file looks now like this:
#+BEGIN_EXAMPLE
(source gnu)
(source melpa)
(source org)
(depends-on "cask")
#+END_EXAMPLE
The init.el file was down to:
#+BEGIN_EXAMPLE
(package-initialize)
(require 'cask "/usr/local/share/emacs/site-lisp/cask/cask.el")
(cask-initialize)
#+END_EXAMPLE
If I remove the (cask-initialize) line, the cursor stays inside the
org table cell.
* Order matters
The final twist to this story is that if I start emacs, create an org
buffer with a table, and run org-table-cut-region key combination
first before evaling the init.el content, the cursor behaviour does
not change even after cask has been initialized!
What is going on here?
* Setup
I have recently compiled version 25.1 of emacs using homebrew
in my Mac. I regularly update emacs packages from melpa.
My current setup is:
#+BEGIN_EXAMPLE
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.6
BuildVersion: 15G31
M-x emacs-version
GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version
10.11.6 (Build 15G31)) of 2016-09-18
M-x org-version
Org-mode version 8.3.6 (8.3.6-3-gf46b92-elpaplus @
/Users/lehvasho/src/emacs-literal-config/.cask/25.1/elpa/org-plus-contrib-20160919/)
$ cask --version
0.8.0
#+END_EXAMPLE
Incidentally, org-plus-contrib and plain org packages behave identically.
* Footnotes
[fn:1] The key binding actually calls org-cut-special that is a
context sensitive command. It calls org-table-cut-region only inside
table cells. (The org-cut-special document string has false
information claiming it calls org-table-copy.)
[-- Attachment #2: Type: text/html, Size: 3999 bytes --]
next reply other threads:[~2016-09-24 6:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-24 6:20 Heikki Lehvaslaiho [this message]
2016-09-29 3:53 ` Cask-initialize messes up org table manipulation commands Adam Porter
2016-10-01 7:08 ` Heikki Lehvaslaiho
2016-10-01 18:47 ` Adam Porter
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK=ukcbs3bae2Y2UR5rL6vsi618JZ6J+Lwb71WEmMUhpTzLyhw@mail.gmail.com' \
--to=heikki.lehvaslaiho@gmail.com \
--cc=emacs-orgmode@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/org-mode.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).