From: Carsten Dominik <carsten.dominik@gmail.com>
To: Michael Brand <michael.brand@alumni.ethz.ch>
Cc: emacs-orgmode@gnu.org
Subject: Re: table refresh: when should the buffer be marked modified?
Date: Mon, 22 Jun 2009 07:56:18 +0200 [thread overview]
Message-ID: <414DFC1C-65FE-4188-BF2C-8670A58856A0@gmail.com> (raw)
In-Reply-To: <4A3DFE89.7070508@alumni.ethz.ch>
On Jun 21, 2009, at 11:34 AM, Michael Brand wrote:
> I was not able to find a description about buffer modification after
> a table refresh.
A table refresh always *does* modify the buffer, even if the resulting
buffer is the same.
You have observed correctly that I am by-passing this when aligning
all tables on startup,
but I don't think I want to check this each time a table is being
aligned, this would
cause overhead.
If you really want this, you could use advice on org-table-align,
temporarily binding inhibit-read-only,
storing the value of buffer-modified-flag, doing the alignment and
then restoring the value of
buffer-modified-flag. SOmething like
(let ((inhibit-read-only t))
(org-unmodified ad-do-it) .....
What are the practical situations when you are reading read-only files
in Org-mode?
Maybe you can change this?
HTH
- Carsten
>
> When a table gets a refresh like after C-c C-c or moving around with
> Tab the buffer is marked modified also when no change for
> realignment of the table grid is necessary. Is this an
> implementation limitation for simplification? If yes my vote for
> which of the features to be next would be that during a table
> refresh there is a check if an automatic realignment changed the
> table grid. If the buffer's file does not need an update I would
> like the buffer to remain not modified. Beside other advantages it
> would make it possible to narrow columns in read-only buffers which
> are not narrowed before for any reason and I am not sure if it would
> eventually help me with multiple undo in tables which confused me
> sometimes.
>
> My opposite finding is that - interestingly only with org-startup-
> align-all-tables t ! - when I open a file with a misaligned table
> not in org-mode and then invoke org-mode the table gets aligned but
> the buffer does not get modified. I expected it modified, org-mode
> version is 6.27a.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
prev parent reply other threads:[~2009-06-22 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 9:34 table refresh: when should the buffer be marked modified? Michael Brand
2009-06-22 5:56 ` Carsten Dominik [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=414DFC1C-65FE-4188-BF2C-8670A58856A0@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=michael.brand@alumni.ethz.ch \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.